use of org.graalvm.compiler.lir.LIRFrameState in project graal by oracle.
the class JVMCIInfopointErrorTest method modifyTopFrame.
private static LIRFrameState modifyTopFrame(LIRFrameState state, VirtualObject[] vobj, JavaValue[] values, JavaKind[] slotKinds, int locals, int stack, int locks) {
BytecodeFrame top = state.topFrame;
top = new BytecodeFrame(top.caller(), top.getMethod(), top.getBCI(), top.rethrowException, top.duringCall, values, slotKinds, locals, stack, locks);
return new LIRFrameState(top, vobj, state.exceptionEdge);
}
use of org.graalvm.compiler.lir.LIRFrameState in project graal by oracle.
the class JVMCIInfopointErrorTest method testUnexpectedScopeValuesLength.
@Test(expected = JVMCIError.class)
public void testUnexpectedScopeValuesLength() {
test((tool, state, safepoint) -> {
LIRFrameState newState = modifyTopFrame(state, new JavaValue[] { JavaConstant.FALSE }, new JavaKind[0], 0, 0, 0);
safepoint.accept(newState);
});
}
use of org.graalvm.compiler.lir.LIRFrameState in project graal by oracle.
the class JVMCIInfopointErrorTest method testUnexpectedObject.
@Test(expected = JVMCIError.class)
public void testUnexpectedObject() {
JavaValue wrapped = getSnippetReflection().forObject(this);
test((tool, state, safepoint) -> {
LIRFrameState newState = modifyTopFrame(state, new JavaValue[] { wrapped }, new JavaKind[] { JavaKind.Int }, 1, 0, 0);
safepoint.accept(newState);
});
}
use of org.graalvm.compiler.lir.LIRFrameState in project graal by oracle.
the class JVMCIInfopointErrorTest method testWrongMonitorType.
@Test(expected = JVMCIError.class)
public void testWrongMonitorType() {
test((tool, state, safepoint) -> {
LIRFrameState newState = modifyTopFrame(state, new JavaValue[] { JavaConstant.INT_0 }, new JavaKind[] {}, 0, 0, 1);
safepoint.accept(newState);
});
}
use of org.graalvm.compiler.lir.LIRFrameState in project graal by oracle.
the class JVMCIInfopointErrorTest method testUnsupportedConstantType.
@Test(expected = JVMCIError.class)
public void testUnsupportedConstantType() {
test((tool, state, safepoint) -> {
LIRFrameState newState = modifyTopFrame(state, new JavaValue[] { JavaConstant.forShort((short) 0) }, new JavaKind[] { JavaKind.Short }, 1, 0, 0);
safepoint.accept(newState);
});
}
Aggregations