use of org.graalvm.libgraal.LibGraalScope in project graal by oracle.
the class IgvSupport method create.
static IgvSupport create(LibGraalHotSpotTruffleCompiler compiler, Map<String, Object> options, LibGraalTruffleCompilation compilation) {
byte[] encodedOptions = OptionsEncoder.encode(options);
LibGraalScope scope = new LibGraalScope(LibGraalScope.DetachAction.DETACH_RUNTIME_AND_RELEASE);
return new IgvSupport(scope, compiler, TruffleToLibGraalCalls.openDebugContext(getIsolateThread(), compiler.handle(options, compilation), compilation == null ? 0 : compilation.getHandle(), encodedOptions));
}
use of org.graalvm.libgraal.LibGraalScope in project graal by oracle.
the class LibGraalHotSpotTruffleCompiler method installTruffleCallBoundaryMethod.
@Override
@SuppressWarnings("try")
public void installTruffleCallBoundaryMethod(ResolvedJavaMethod method) {
try (LibGraalScope scope = new LibGraalScope(LibGraalScope.DetachAction.DETACH_RUNTIME_AND_RELEASE)) {
Map<String, Object> options = previousOptions;
assert options != null : "truffle compiler was never initialized";
TruffleToLibGraalCalls.installTruffleCallBoundaryMethod(getIsolateThread(), handle(options, null), LibGraal.translate(method));
}
}
use of org.graalvm.libgraal.LibGraalScope in project graal by oracle.
the class LibGraalHotSpotTruffleCompiler method openCompilation.
@Override
public TruffleCompilation openCompilation(CompilableTruffleAST compilable) {
LibGraalScope scope = new LibGraalScope(LibGraalScope.DetachAction.DETACH_RUNTIME_AND_RELEASE);
long compilationHandle = TruffleToLibGraalCalls.openCompilation(getIsolateThread(), handle(optionsEncoder(compilable), compilable, false), compilable);
LibGraalTruffleCompilation compilation = new LibGraalTruffleCompilation(this, compilationHandle, scope);
activeCompilation.set(compilation);
return compilation;
}
Aggregations