Mercurial > hg > graal-compiler
diff c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java @ 1452:9b22e3e5df8e
Solved an issue with unresolved field patching.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Fri, 12 Nov 2010 18:04:27 +0100 |
parents | 8c121f2190f8 |
children | d603bdbec024 |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Thu Nov 11 14:42:14 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Fri Nov 12 18:04:27 2010 +0100 @@ -813,7 +813,7 @@ @Override public XirSnippet genResolveClass(XirSite site, RiType type, Representation rep) { - assert rep == Representation.ObjectHub || rep == Representation.StaticFields : "unexpected representation: " + rep; + assert rep == Representation.ObjectHub || rep == Representation.StaticFields || rep == Representation.JavaClass : "unexpected representation: " + rep; if (type instanceof HotSpotTypeResolved) { return new XirSnippet(resolveClassTemplates.get(site), XirArgument.forObject(type)); } @@ -995,6 +995,8 @@ asm.mark(MARK_DUMMY_OOP_RELOCATION); asm.jmp(patchStub); + // TODO(tw): Need a safepoint here? + // TODO: make this more generic & safe - this is needed to create space for patching asm.nop(5); @@ -1059,8 +1061,8 @@ asm.mark(MARK_DUMMY_OOP_RELOCATION); if (nullCheck) { asm.mark(MARK_IMPLICIT_NULL); - asm.safepoint(); } + asm.safepoint(); asm.jmp(patchStub); // TODO: make this more generic & safe - this is needed to create space for patching