Mercurial > hg > graal-jvmci-8
diff src/share/vm/graal/graalVMToCompiler.cpp @ 10475:3489047ffea2
Restructure the handling of HotSpotInstalledCode and their link to nmethods.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 21 Jun 2013 18:26:52 +0200 |
parents | a323a9e20f9d |
children | e7d07c9bb779 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalVMToCompiler.cpp Fri Jun 21 17:52:19 2013 +0200 +++ b/src/share/vm/graal/graalVMToCompiler.cpp Fri Jun 21 18:26:52 2013 +0200 @@ -46,6 +46,16 @@ return _vmToCompilerPermKlass; } +Handle VMToCompiler::truffleRuntime() { + Symbol* name = vmSymbols::com_oracle_graal_truffle_GraalTruffleRuntime(); + KlassHandle klass = loadClass(name); + + JavaValue result(T_OBJECT); + JavaCalls::call_static(&result, klass, vmSymbols::makeInstance_name(), vmSymbols::getTruffleRuntimeInstance_signature(), Thread::current()); + check_pending_exception("Couldn't initialize GraalTruffleRuntime"); + return Handle((oop) result.get_jobject()); +} + Handle VMToCompiler::graalRuntime() { if (JNIHandles::resolve(_graalRuntimePermObject) == NULL) { #ifdef AMD64 @@ -292,3 +302,4 @@ } +