use of com.oracle.truffle.api.RootCallTarget in project sulong by graalvm.
the class LLVMContext method dispose.
public void dispose(LLVMMemory memory) {
printNativeCallStatistic();
// - _exit(), _Exit(), or abort(): no cleanup necessary
if (cleanupNecessary) {
try {
RootCallTarget disposeContext = globalScope.getFunctionDescriptor("@__sulong_dispose_context").getLLVMIRFunction();
try (StackPointer stackPointer = threadingStack.getStack().newFrame()) {
disposeContext.call(stackPointer);
}
} catch (ControlFlowException e) {
// nothing needs to be done as the behavior is not defined
}
}
threadingStack.freeMainStack(memory);
globalStack.free();
}
Aggregations