Mercurial > hg > graal-compiler
diff src/share/vm/jvmci/jvmciCompiler.cpp @ 21616:4c146c9367b6
recast VM compilation request via JVMCI to be a HotSpot JVMCI event, removing the last direct reference to a Graal class in the VM (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sun, 31 May 2015 23:57:31 +0200 |
parents | be896a1983c0 |
children |
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciCompiler.cpp Sun May 31 14:30:13 2015 +0200 +++ b/src/share/vm/jvmci/jvmciCompiler.cpp Sun May 31 23:57:31 2015 +0200 @@ -127,11 +127,13 @@ ResourceMark rm; JavaValue result(T_VOID); JavaCallArguments args; + Handle receiver = JVMCIRuntime::get_HotSpotJVMCIRuntime(); + args.push_oop(receiver); args.push_long((jlong) (address) method()); args.push_int(entry_bci); args.push_long((jlong) (address) env); args.push_int(env->task()->compile_id()); - JavaCalls::call_static(&result, SystemDictionary::CompilationTask_klass(), vmSymbols::compileMetaspaceMethod_name(), vmSymbols::compileMetaspaceMethod_signature(), &args, CHECK_ABORT); + JavaCalls::call_special(&result, receiver->klass(), vmSymbols::compileMetaspaceMethod_name(), vmSymbols::compileMetaspaceMethod_signature(), &args, CHECK_ABORT); _methodsCompiled++; } @@ -158,11 +160,10 @@ void JVMCICompiler::compile_the_world() { HandleMark hm; JavaThread* THREAD = JavaThread::current(); - TempNewSymbol name = SymbolTable::new_symbol("com/oracle/jvmci/hotspot/HotSpotJVMCIRuntime", CHECK_ABORT); - KlassHandle klass = JVMCIRuntime::load_required_class(name); + Handle receiver = JVMCIRuntime::get_HotSpotJVMCIRuntime(); TempNewSymbol compileTheWorld = SymbolTable::new_symbol("compileTheWorld", CHECK_ABORT); JavaValue result(T_VOID); JavaCallArguments args; - args.push_oop(JVMCIRuntime::get_HotSpotJVMCIRuntime()); - JavaCalls::call_special(&result, klass, compileTheWorld, vmSymbols::void_method_signature(), &args, CHECK_ABORT); + args.push_oop(receiver); + JavaCalls::call_special(&result, receiver->klass(), compileTheWorld, vmSymbols::void_method_signature(), &args, CHECK_ABORT); }