use of com.oracle.truffle.api.frame.FrameSlotTypeException in project sulong by graalvm.
the class LLVMLandingpadNode method executeGeneric.
@Override
public Object executeGeneric(VirtualFrame frame) {
try {
LLVMException exception = (LLVMException) frame.getObject(exceptionSlot);
Object unwindHeader = exception.getUnwindHeader();
LLVMStack.StackPointer stack = (LLVMStack.StackPointer) getStack.executeGeneric(frame);
int clauseId = getEntryIdentifier(frame, stack, unwindHeader);
if (clauseId == 0 && !cleanup) {
throw exception;
} else {
LLVMAddress executeLLVMAddress = allocateLandingPadValue.execute(frame);
LLVMAddress pair0 = executeLLVMAddress;
getMemory().putAddress(pair0, unwindHeaderToNative.executeWithTarget(unwindHeader));
getMemory().putI32(executeLLVMAddress.getVal() + LLVMExpressionNode.ADDRESS_SIZE_IN_BYTES, clauseId);
return executeLLVMAddress;
}
} catch (FrameSlotTypeException e) {
CompilerDirectives.transferToInterpreter();
throw new IllegalStateException(e);
}
}
Aggregations