Mercurial > hg > graal-jvmci-8
diff c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java @ 2285:762de4b26788
turn Compiler and HotSpotTypeResolved into interfaces
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Fri, 08 Apr 2011 13:43:05 +0200 |
parents | 569d3fe7d65c |
children |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Thu Apr 07 15:32:25 2011 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Fri Apr 08 13:43:05 2011 +0200 @@ -1146,7 +1146,7 @@ @Override public XirSnippet genResolveClass(XirSite site, RiType type, Representation rep) { assert rep == Representation.ObjectHub || rep == Representation.StaticFields || rep == Representation.JavaClass : "unexpected representation: " + rep; - if (type instanceof HotSpotTypeResolved) { + if (type.isResolved()) { return new XirSnippet(resolveClassTemplates.get(site), XirArgument.forObject(type)); } return new XirSnippet(resolveClassTemplates.get(site, UNRESOLVED)); @@ -1226,7 +1226,7 @@ @Override public XirSnippet genNewInstance(XirSite site, RiType type) { - if (type instanceof HotSpotTypeResolved) { + if (type.isResolved()) { int instanceSize = ((HotSpotTypeResolved) type).instanceSize(); return new XirSnippet(newInstanceTemplates.get(site, instanceSize), XirArgument.forObject(type)); } @@ -1236,7 +1236,7 @@ @Override public XirSnippet genNewArray(XirSite site, XirArgument length, CiKind elementKind, RiType componentType, RiType arrayType) { if (elementKind == CiKind.Object) { - if (arrayType instanceof HotSpotTypeResolved) { + if (arrayType.isResolved()) { return new XirSnippet(newObjectArrayTemplates.get(site), length, XirArgument.forObject(arrayType)); } return new XirSnippet(newObjectArrayTemplates.get(site, UNRESOLVED), length); @@ -1253,7 +1253,7 @@ @Override public XirSnippet genNewMultiArray(XirSite site, XirArgument[] lengths, RiType type) { - if (type instanceof HotSpotTypeResolved) { + if (type.isResolved()) { XirArgument[] params = Arrays.copyOf(lengths, lengths.length + 1); params[lengths.length] = XirArgument.forObject(type); return new XirSnippet(multiNewArrayTemplate.get(site, lengths.length), params);