64 private void test(JavaValue[] values, JavaKind[] slotKinds, int locals, int stack, int locks) { |
64 private void test(JavaValue[] values, JavaKind[] slotKinds, int locals, int stack, int locks) { |
65 test(null, values, slotKinds, locals, stack, locks); |
65 test(null, values, slotKinds, locals, stack, locks); |
66 } |
66 } |
67 |
67 |
68 private void test(VirtualObject[] vobj, JavaValue[] values, JavaKind[] slotKinds, int locals, int stack, int locks) { |
68 private void test(VirtualObject[] vobj, JavaValue[] values, JavaKind[] slotKinds, int locals, int stack, int locks) { |
|
69 test(vobj, values, slotKinds, locals, stack, locks, StackSlot.get(null, 0, true)); |
|
70 } |
|
71 |
|
72 private void test(VirtualObject[] vobj, JavaValue[] values, JavaKind[] slotKinds, int locals, int stack, int locks, StackSlot deoptRescueSlot) { |
69 BytecodeFrame frame = new BytecodeFrame(null, dummyMethod, 0, false, false, values, slotKinds, locals, stack, locks); |
73 BytecodeFrame frame = new BytecodeFrame(null, dummyMethod, 0, false, false, values, slotKinds, locals, stack, locks); |
70 DebugInfo info = new DebugInfo(frame, vobj); |
74 DebugInfo info = new DebugInfo(frame, vobj); |
71 info.setReferenceMap(new HotSpotReferenceMap(new Location[0], new Location[0], new int[0], 8)); |
75 info.setReferenceMap(new HotSpotReferenceMap(new Location[0], new Location[0], new int[0], 8)); |
72 installEmptyCode(new Site[]{new Infopoint(0, info, InfopointReason.SAFEPOINT)}, new Assumption[0], new Comment[0], 16, new DataPatch[0]); |
76 installEmptyCode(new Site[]{new Infopoint(0, info, InfopointReason.SAFEPOINT)}, new Assumption[0], new Comment[0], 16, new DataPatch[0], deoptRescueSlot); |
73 } |
77 } |
74 |
78 |
75 @Test(expected = NullPointerException.class) |
79 @Test(expected = NullPointerException.class) |
76 public void testNullValues() { |
80 public void testNullValues() { |
77 test(null, new JavaKind[0], 0, 0, 0); |
81 test(null, new JavaKind[0], 0, 0, 0); |
78 } |
82 } |
79 |
83 |
80 @Test(expected = NullPointerException.class) |
84 @Test(expected = NullPointerException.class) |
81 public void testNullSlotKinds() { |
85 public void testNullSlotKinds() { |
82 test(new JavaValue[0], null, 0, 0, 0); |
86 test(new JavaValue[0], null, 0, 0, 0); |
|
87 } |
|
88 |
|
89 @Test(expected = JVMCIError.class) |
|
90 public void testMissingDeoptRescueSlot() { |
|
91 test(null, new JavaValue[0], new JavaKind[0], 0, 0, 0, null); |
83 } |
92 } |
84 |
93 |
85 @Test(expected = JVMCIError.class) |
94 @Test(expected = JVMCIError.class) |
86 public void testUnexpectedScopeValuesLength() { |
95 public void testUnexpectedScopeValuesLength() { |
87 test(new JavaValue[]{JavaConstant.FALSE}, new JavaKind[0], 0, 0, 0); |
96 test(new JavaValue[]{JavaConstant.FALSE}, new JavaKind[0], 0, 0, 0); |