# HG changeset patch # User Lukas Stadler # Date 1283373957 25200 # Node ID 949ade3f2ff33b7adab47270a62a030d5ff09ae3 # Parent abc670a709dc37bd41cc5f918072c2b745819109 added assertions, nop added to implicit exception sites diff -r abc670a709dc -r 949ade3f2ff3 c1x4hotspotsrc/HotSpotTest/src/jttTests.java --- a/c1x4hotspotsrc/HotSpotTest/src/jttTests.java Tue Aug 31 22:13:30 2010 -0700 +++ b/c1x4hotspotsrc/HotSpotTest/src/jttTests.java Wed Sep 01 13:45:57 2010 -0700 @@ -4,7 +4,7 @@ public class jttTests { public static void main(String[] args) { - runTests(0, 1000); + runTests(526, 526); Logger.info("total: " + executed + " tests executed, " + passed + " passed, " + failed + " failed"); } @@ -1630,13 +1630,13 @@ jtt_reflect_Class_getField01(); break; case 526: - //jtt_reflect_Class_getField02(); + jtt_reflect_Class_getField02(); break; case 527: jtt_reflect_Class_getMethod01(); break; case 528: - //jtt_reflect_Class_getMethod02(); + jtt_reflect_Class_getMethod02(); break; case 529: jtt_reflect_Class_newInstance01(); @@ -1681,19 +1681,19 @@ jtt_reflect_Invoke_except01(); break; case 543: - //jtt_reflect_Invoke_main01(); + jtt_reflect_Invoke_main01(); break; case 544: - //jtt_reflect_Invoke_main02(); + jtt_reflect_Invoke_main02(); break; case 545: - //jtt_reflect_Invoke_main03(); + jtt_reflect_Invoke_main03(); break; case 546: - //jtt_reflect_Invoke_virtual01(); + jtt_reflect_Invoke_virtual01(); break; case 547: - //jtt_reflect_Method_getParameterTypes01(); + jtt_reflect_Method_getParameterTypes01(); break; case 548: jtt_reflect_Method_getReturnType01(); @@ -1795,10 +1795,10 @@ jtt_jdk_Class_getName(); break; case 581: - //jtt_jdk_EnumMap01(); + jtt_jdk_EnumMap01(); break; case 582: - //jtt_jdk_EnumMap02(); + jtt_jdk_EnumMap02(); break; case 583: jtt_jdk_System_currentTimeMillis01(); diff -r abc670a709dc -r 949ade3f2ff3 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeResolved.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeResolved.java Tue Aug 31 22:13:30 2010 -0700 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeResolved.java Wed Sep 01 13:45:57 2010 -0700 @@ -145,7 +145,7 @@ @Override public boolean isSubtypeOf(RiType other) { - assert other instanceof HotSpotType; + assert other instanceof HotSpotType : "unexpected 'other' type: " + other; if (other instanceof HotSpotTypeResolved) return Compiler.getVMEntries().RiType_isSubtypeOf(vmId, other); // no resolved type is a subtype of an unresolved type diff -r abc670a709dc -r 949ade3f2ff3 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Tue Aug 31 22:13:30 2010 -0700 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Wed Sep 01 13:45:57 2010 -0700 @@ -242,6 +242,7 @@ private XirTemplate buildArrayLength() { XirOperand result = asm.restart(CiKind.Int); XirParameter object = asm.createInputParameter("object", CiKind.Object); + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); asm.pload(CiKind.Int, result, object, asm.i(config.arrayLengthOffset), true); return asm.finishTemplate("arrayLength"); @@ -274,6 +275,7 @@ XirOperand result = asm.restart(kind); XirParameter object = asm.createInputParameter("object", CiKind.Object); XirParameter fieldOffset = asm.createConstantInputParameter("fieldOffset", CiKind.Int); + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); asm.pload(kind, result, object, fieldOffset, true); resolved = asm.finishTemplate("getfield<" + kind + ">"); @@ -291,6 +293,7 @@ XirParameter object = asm.createInputParameter("object", CiKind.Object); XirParameter value = asm.createInputParameter("value", kind); XirParameter fieldOffset = asm.createConstantInputParameter("fieldOffset", CiKind.Int); + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); asm.pstore(kind, object, fieldOffset, value, true); if (genWriteBarrier) { @@ -311,6 +314,7 @@ XirOperand result = asm.restart(kind); XirParameter object = asm.createInputParameter("object", CiKind.Object); XirParameter fieldOffset = asm.createConstantInputParameter("fieldOffset", CiKind.Int); + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); asm.pload(kind, result, object, fieldOffset, true); resolved = asm.finishTemplate("getfield<" + kind + ">"); @@ -328,6 +332,7 @@ XirParameter object = asm.createInputParameter("object", CiKind.Object); XirParameter value = asm.createInputParameter("value", kind); XirParameter fieldOffset = asm.createConstantInputParameter("fieldOffset", CiKind.Int); + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); asm.pstore(kind, object, fieldOffset, value, true); if (genWriteBarrier) { @@ -500,6 +505,7 @@ length = asm.createInputParameter("length", CiKind.Int); } else { length = asm.createTemp("length", CiKind.Int); + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); asm.pload(CiKind.Int, length, array, asm.i(config.arrayLengthOffset), true); implicitNullException = false; @@ -565,6 +571,7 @@ length = asm.createInputParameter("length", CiKind.Int); } else { length = asm.createTemp("length", CiKind.Int); + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); asm.pload(CiKind.Int, length, array, asm.i(config.arrayLengthOffset), true); implicitNullException = false; @@ -574,6 +581,7 @@ } int elemSize = target.sizeInBytes(kind); if (implicitNullException) { + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); } asm.pload(kind, result, array, index, config.getArrayOffset(kind), Scale.fromInt(elemSize), implicitNullException); @@ -611,6 +619,7 @@ XirOperand temp = asm.createRegister("temp", CiKind.Word, AMD64.rax); XirLabel stub = asm.createOutOfLineLabel("call stub"); + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); asm.pload(CiKind.Word, temp, receiver, true); asm.mark(MARK_INVOKESPECIAL); @@ -635,6 +644,7 @@ XirOperand temp = asm.createRegister("temp", CiKind.Word, AMD64.rax); XirLabel stub = asm.createOutOfLineLabel("call stub"); + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); asm.pload(CiKind.Word, temp, receiver, true); asm.mark(MARK_INVOKEINTERFACE); @@ -659,6 +669,7 @@ XirOperand temp = asm.createRegister("temp", CiKind.Word, AMD64.rax); XirLabel stub = asm.createOutOfLineLabel("call stub"); + asm.nop(1); asm.mark(MARK_IMPLICIT_NULL); asm.pload(CiKind.Word, temp, receiver, true); asm.mark(MARK_INVOKEVIRTUAL); @@ -972,7 +983,7 @@ @Override public XirSnippet genResolveClass(XirSite site, RiType type, Representation representation) { - assert representation == Representation.ObjectHub; + assert representation == Representation.ObjectHub : "unexpected representation: " + representation; if (type instanceof HotSpotTypeResolved) { return new XirSnippet(resolveClassTemplate.resolved, XirArgument.forObject(type)); }