Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
21615:838f005f9aec | 21616:4c146c9367b6 |
---|---|
125 JVMCIRuntime::ensure_jvmci_class_loader_is_initialized(); | 125 JVMCIRuntime::ensure_jvmci_class_loader_is_initialized(); |
126 HandleMark hm; | 126 HandleMark hm; |
127 ResourceMark rm; | 127 ResourceMark rm; |
128 JavaValue result(T_VOID); | 128 JavaValue result(T_VOID); |
129 JavaCallArguments args; | 129 JavaCallArguments args; |
130 Handle receiver = JVMCIRuntime::get_HotSpotJVMCIRuntime(); | |
131 args.push_oop(receiver); | |
130 args.push_long((jlong) (address) method()); | 132 args.push_long((jlong) (address) method()); |
131 args.push_int(entry_bci); | 133 args.push_int(entry_bci); |
132 args.push_long((jlong) (address) env); | 134 args.push_long((jlong) (address) env); |
133 args.push_int(env->task()->compile_id()); | 135 args.push_int(env->task()->compile_id()); |
134 JavaCalls::call_static(&result, SystemDictionary::CompilationTask_klass(), vmSymbols::compileMetaspaceMethod_name(), vmSymbols::compileMetaspaceMethod_signature(), &args, CHECK_ABORT); | 136 JavaCalls::call_special(&result, receiver->klass(), vmSymbols::compileMetaspaceMethod_name(), vmSymbols::compileMetaspaceMethod_signature(), &args, CHECK_ABORT); |
135 | 137 |
136 _methodsCompiled++; | 138 _methodsCompiled++; |
137 } | 139 } |
138 | 140 |
139 | 141 |
156 } | 158 } |
157 | 159 |
158 void JVMCICompiler::compile_the_world() { | 160 void JVMCICompiler::compile_the_world() { |
159 HandleMark hm; | 161 HandleMark hm; |
160 JavaThread* THREAD = JavaThread::current(); | 162 JavaThread* THREAD = JavaThread::current(); |
161 TempNewSymbol name = SymbolTable::new_symbol("com/oracle/jvmci/hotspot/HotSpotJVMCIRuntime", CHECK_ABORT); | 163 Handle receiver = JVMCIRuntime::get_HotSpotJVMCIRuntime(); |
162 KlassHandle klass = JVMCIRuntime::load_required_class(name); | |
163 TempNewSymbol compileTheWorld = SymbolTable::new_symbol("compileTheWorld", CHECK_ABORT); | 164 TempNewSymbol compileTheWorld = SymbolTable::new_symbol("compileTheWorld", CHECK_ABORT); |
164 JavaValue result(T_VOID); | 165 JavaValue result(T_VOID); |
165 JavaCallArguments args; | 166 JavaCallArguments args; |
166 args.push_oop(JVMCIRuntime::get_HotSpotJVMCIRuntime()); | 167 args.push_oop(receiver); |
167 JavaCalls::call_special(&result, klass, compileTheWorld, vmSymbols::void_method_signature(), &args, CHECK_ABORT); | 168 JavaCalls::call_special(&result, receiver->klass(), compileTheWorld, vmSymbols::void_method_signature(), &args, CHECK_ABORT); |
168 } | 169 } |