< prev index next >

test/compiler/jvmci/errors/TestInvalidDebugInfo.java

Print this page

        

*** 27,37 **** * @modules jdk.vm.ci/jdk.vm.ci.hotspot * jdk.vm.ci/jdk.vm.ci.code * jdk.vm.ci/jdk.vm.ci.code.site * jdk.vm.ci/jdk.vm.ci.meta * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common * @compile CodeInstallerTest.java * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidDebugInfo */ package compiler.jvmci.errors; --- 27,36 ----
*** 44,54 **** import jdk.vm.ci.code.VirtualObject; import jdk.vm.ci.code.site.DataPatch; import jdk.vm.ci.code.site.Infopoint; import jdk.vm.ci.code.site.InfopointReason; import jdk.vm.ci.code.site.Site; - import jdk.vm.ci.common.JVMCIError; import jdk.vm.ci.hotspot.HotSpotCompiledCode.Comment; import jdk.vm.ci.hotspot.HotSpotReferenceMap; import jdk.vm.ci.meta.Assumptions.Assumption; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.JavaKind; --- 43,52 ----
*** 90,110 **** @Test(expected = NullPointerException.class) public void testNullSlotKinds() { test(new JavaValue[0], null, 0, 0, 0); } ! @Test(expected = JVMCIError.class) public void testMissingDeoptRescueSlot() { test(null, new JavaValue[0], new JavaKind[0], 0, 0, 0, null); } ! @Test(expected = JVMCIError.class) public void testUnexpectedScopeValuesLength() { test(new JavaValue[]{JavaConstant.FALSE}, new JavaKind[0], 0, 0, 0); } ! @Test(expected = JVMCIError.class) public void testUnexpectedScopeSlotKindsLength() { test(new JavaValue[0], new JavaKind[]{JavaKind.Boolean}, 0, 0, 0); } @Test(expected = NullPointerException.class) --- 88,108 ---- @Test(expected = NullPointerException.class) public void testNullSlotKinds() { test(new JavaValue[0], null, 0, 0, 0); } ! @Test(expected = InternalError.class) public void testMissingDeoptRescueSlot() { test(null, new JavaValue[0], new JavaKind[0], 0, 0, 0, null); } ! @Test(expected = InternalError.class) public void testUnexpectedScopeValuesLength() { test(new JavaValue[]{JavaConstant.FALSE}, new JavaKind[0], 0, 0, 0); } ! @Test(expected = InternalError.class) public void testUnexpectedScopeSlotKindsLength() { test(new JavaValue[0], new JavaKind[]{JavaKind.Boolean}, 0, 0, 0); } @Test(expected = NullPointerException.class)
*** 120,199 **** @Test(expected = NullPointerException.class) public void testNullMonitor() { test(new JavaValue[]{null}, new JavaKind[0], 0, 0, 1); } ! @Test(expected = JVMCIError.class) public void testWrongMonitorType() { test(new JavaValue[]{JavaConstant.INT_0}, new JavaKind[0], 0, 0, 1); } ! @Test(expected = JVMCIError.class) public void testUnexpectedIllegalValue() { test(new JavaValue[]{Value.ILLEGAL}, new JavaKind[]{JavaKind.Int}, 1, 0, 0); } ! @Test(expected = JVMCIError.class) public void testUnexpectedTypeInCPURegister() { Register reg = getRegister(arch.getPlatformKind(JavaKind.Int), 0); test(new JavaValue[]{reg.asValue()}, new JavaKind[]{JavaKind.Illegal}, 1, 0, 0); } ! @Test(expected = JVMCIError.class) public void testUnexpectedTypeInFloatRegister() { Register reg = getRegister(arch.getPlatformKind(JavaKind.Float), 0); test(new JavaValue[]{reg.asValue()}, new JavaKind[]{JavaKind.Illegal}, 1, 0, 0); } ! @Test(expected = JVMCIError.class) public void testUnexpectedTypeOnStack() { LIRKind kind = codeCache.getTarget().getLIRKind(JavaKind.Int); StackSlot value = StackSlot.get(kind, 8, false); test(new JavaValue[]{value}, new JavaKind[]{JavaKind.Illegal}, 1, 0, 0); } ! @Test(expected = JVMCIError.class) public void testWrongConstantType() { test(new JavaValue[]{JavaConstant.INT_0}, new JavaKind[]{JavaKind.Object}, 1, 0, 0); } ! @Test(expected = JVMCIError.class) public void testUnsupportedConstantType() { test(new JavaValue[]{JavaConstant.forShort((short) 0)}, new JavaKind[]{JavaKind.Short}, 1, 0, 0); } ! @Test(expected = JVMCIError.class) public void testUnexpectedNull() { test(new JavaValue[]{JavaConstant.NULL_POINTER}, new JavaKind[]{JavaKind.Int}, 1, 0, 0); } ! @Test(expected = JVMCIError.class) public void testUnexpectedObject() { JavaValue wrapped = constantReflection.forObject(this); test(new JavaValue[]{wrapped}, new JavaKind[]{JavaKind.Int}, 1, 0, 0); } ! @Test(expected = JVMCIError.class) public void testUnknownJavaValue() { test(new JavaValue[]{new UnknownJavaValue()}, new JavaKind[]{JavaKind.Int}, 1, 0, 0); } ! @Test(expected = JVMCIError.class) public void testMissingIllegalAfterDouble() { test(new JavaValue[]{JavaConstant.DOUBLE_0, JavaConstant.INT_0}, new JavaKind[]{JavaKind.Double, JavaKind.Int}, 2, 0, 0); } ! @Test(expected = JVMCIError.class) public void testInvalidVirtualObjectId() { ResolvedJavaType obj = metaAccess.lookupJavaType(Object.class); VirtualObject o = VirtualObject.get(obj, 5); o.setValues(new JavaValue[0], new JavaKind[0]); test(new VirtualObject[]{o}, new JavaValue[0], new JavaKind[0], 0, 0, 0); } ! @Test(expected = JVMCIError.class) public void testDuplicateVirtualObject() { ResolvedJavaType obj = metaAccess.lookupJavaType(Object.class); VirtualObject o1 = VirtualObject.get(obj, 0); o1.setValues(new JavaValue[0], new JavaKind[0]); --- 118,197 ---- @Test(expected = NullPointerException.class) public void testNullMonitor() { test(new JavaValue[]{null}, new JavaKind[0], 0, 0, 1); } ! @Test(expected = InternalError.class) public void testWrongMonitorType() { test(new JavaValue[]{JavaConstant.INT_0}, new JavaKind[0], 0, 0, 1); } ! @Test(expected = InternalError.class) public void testUnexpectedIllegalValue() { test(new JavaValue[]{Value.ILLEGAL}, new JavaKind[]{JavaKind.Int}, 1, 0, 0); } ! @Test(expected = InternalError.class) public void testUnexpectedTypeInCPURegister() { Register reg = getRegister(arch.getPlatformKind(JavaKind.Int), 0); test(new JavaValue[]{reg.asValue()}, new JavaKind[]{JavaKind.Illegal}, 1, 0, 0); } ! @Test(expected = InternalError.class) public void testUnexpectedTypeInFloatRegister() { Register reg = getRegister(arch.getPlatformKind(JavaKind.Float), 0); test(new JavaValue[]{reg.asValue()}, new JavaKind[]{JavaKind.Illegal}, 1, 0, 0); } ! @Test(expected = InternalError.class) public void testUnexpectedTypeOnStack() { LIRKind kind = codeCache.getTarget().getLIRKind(JavaKind.Int); StackSlot value = StackSlot.get(kind, 8, false); test(new JavaValue[]{value}, new JavaKind[]{JavaKind.Illegal}, 1, 0, 0); } ! @Test(expected = InternalError.class) public void testWrongConstantType() { test(new JavaValue[]{JavaConstant.INT_0}, new JavaKind[]{JavaKind.Object}, 1, 0, 0); } ! @Test(expected = InternalError.class) public void testUnsupportedConstantType() { test(new JavaValue[]{JavaConstant.forShort((short) 0)}, new JavaKind[]{JavaKind.Short}, 1, 0, 0); } ! @Test(expected = InternalError.class) public void testUnexpectedNull() { test(new JavaValue[]{JavaConstant.NULL_POINTER}, new JavaKind[]{JavaKind.Int}, 1, 0, 0); } ! @Test(expected = InternalError.class) public void testUnexpectedObject() { JavaValue wrapped = constantReflection.forObject(this); test(new JavaValue[]{wrapped}, new JavaKind[]{JavaKind.Int}, 1, 0, 0); } ! @Test(expected = InternalError.class) public void testUnknownJavaValue() { test(new JavaValue[]{new UnknownJavaValue()}, new JavaKind[]{JavaKind.Int}, 1, 0, 0); } ! @Test(expected = InternalError.class) public void testMissingIllegalAfterDouble() { test(new JavaValue[]{JavaConstant.DOUBLE_0, JavaConstant.INT_0}, new JavaKind[]{JavaKind.Double, JavaKind.Int}, 2, 0, 0); } ! @Test(expected = InternalError.class) public void testInvalidVirtualObjectId() { ResolvedJavaType obj = metaAccess.lookupJavaType(Object.class); VirtualObject o = VirtualObject.get(obj, 5); o.setValues(new JavaValue[0], new JavaKind[0]); test(new VirtualObject[]{o}, new JavaValue[0], new JavaKind[0], 0, 0, 0); } ! @Test(expected = InternalError.class) public void testDuplicateVirtualObject() { ResolvedJavaType obj = metaAccess.lookupJavaType(Object.class); VirtualObject o1 = VirtualObject.get(obj, 0); o1.setValues(new JavaValue[0], new JavaKind[0]);
*** 201,220 **** o2.setValues(new JavaValue[0], new JavaKind[0]); test(new VirtualObject[]{o1, o2}, new JavaValue[0], new JavaKind[0], 0, 0, 0); } ! @Test(expected = JVMCIError.class) public void testUnexpectedVirtualObject() { ResolvedJavaType obj = metaAccess.lookupJavaType(Object.class); VirtualObject o = VirtualObject.get(obj, 0); o.setValues(new JavaValue[0], new JavaKind[0]); test(new VirtualObject[]{o}, new JavaValue[]{o}, new JavaKind[]{JavaKind.Int}, 1, 0, 0); } ! @Test(expected = JVMCIError.class) public void testUndefinedVirtualObject() { ResolvedJavaType obj = metaAccess.lookupJavaType(Object.class); VirtualObject o0 = VirtualObject.get(obj, 0); o0.setValues(new JavaValue[0], new JavaKind[0]); --- 199,218 ---- o2.setValues(new JavaValue[0], new JavaKind[0]); test(new VirtualObject[]{o1, o2}, new JavaValue[0], new JavaKind[0], 0, 0, 0); } ! @Test(expected = InternalError.class) public void testUnexpectedVirtualObject() { ResolvedJavaType obj = metaAccess.lookupJavaType(Object.class); VirtualObject o = VirtualObject.get(obj, 0); o.setValues(new JavaValue[0], new JavaKind[0]); test(new VirtualObject[]{o}, new JavaValue[]{o}, new JavaKind[]{JavaKind.Int}, 1, 0, 0); } ! @Test(expected = InternalError.class) public void testUndefinedVirtualObject() { ResolvedJavaType obj = metaAccess.lookupJavaType(Object.class); VirtualObject o0 = VirtualObject.get(obj, 0); o0.setValues(new JavaValue[0], new JavaKind[0]);
< prev index next >