Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCompiler.cpp @ 5150:fdd9dd4508fa
some GC fixes
avoid non-Java bytecodes in code() array passed to Graal
author | Christian Haeubl <christian.haeubl@oracle.com> |
---|---|
date | Thu, 22 Mar 2012 18:54:02 -0700 |
parents | ab038e0d6b43 |
children | 482265e41a1a |
comparison
equal
deleted
inserted
replaced
5149:c5eaee66bfa1 | 5150:fdd9dd4508fa |
---|---|
29 #include "graal/graalVmIds.hpp" | 29 #include "graal/graalVmIds.hpp" |
30 #include "graal/graalEnv.hpp" | 30 #include "graal/graalEnv.hpp" |
31 #include "c1/c1_Runtime1.hpp" | 31 #include "c1/c1_Runtime1.hpp" |
32 #include "compiler/compilerOracle.hpp" | 32 #include "compiler/compilerOracle.hpp" |
33 #include "runtime/arguments.hpp" | 33 #include "runtime/arguments.hpp" |
34 #include "runtime/compilationPolicy.hpp" | |
34 | 35 |
35 GraalCompiler* GraalCompiler::_instance = NULL; | 36 GraalCompiler* GraalCompiler::_instance = NULL; |
36 | 37 |
37 GraalCompiler::GraalCompiler() { | 38 GraalCompiler::GraalCompiler() { |
38 _initialized = false; | 39 _initialized = false; |
166 jboolean success = VMToCompiler::compileMethod(hotspot_method, entry_bci, blocking); | 167 jboolean success = VMToCompiler::compileMethod(hotspot_method, entry_bci, blocking); |
167 JavaThread::current()->set_compiling(false); | 168 JavaThread::current()->set_compiling(false); |
168 JavaThread::current()->set_env(current_env); | 169 JavaThread::current()->set_env(current_env); |
169 if (success != JNI_TRUE) { | 170 if (success != JNI_TRUE) { |
170 method->clear_queued_for_compilation(); | 171 method->clear_queued_for_compilation(); |
172 CompilationPolicy::policy()->delay_compilation(method()); | |
171 } | 173 } |
172 } | 174 } |
173 | 175 |
174 // Compilation entry point for methods | 176 // Compilation entry point for methods |
175 void GraalCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) { | 177 void GraalCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) { |
295 Handle GraalCompiler::createHotSpotMethodResolved(methodHandle method, TRAPS) { | 297 Handle GraalCompiler::createHotSpotMethodResolved(methodHandle method, TRAPS) { |
296 if (method->graal_mirror() != NULL) { | 298 if (method->graal_mirror() != NULL) { |
297 assert(method->graal_mirror()->is_a(HotSpotMethodResolved::klass()), "unexpected class..."); | 299 assert(method->graal_mirror()->is_a(HotSpotMethodResolved::klass()), "unexpected class..."); |
298 return method->graal_mirror(); | 300 return method->graal_mirror(); |
299 } | 301 } |
300 | |
301 Handle name = VmIds::toString<Handle>(method->name(), CHECK_NULL); | 302 Handle name = VmIds::toString<Handle>(method->name(), CHECK_NULL); |
302 | 303 |
303 instanceKlass::cast(HotSpotMethodResolved::klass())->initialize(CHECK_NULL); | 304 instanceKlass::cast(HotSpotMethodResolved::klass())->initialize(CHECK_NULL); |
304 Handle obj = instanceKlass::cast(HotSpotMethodResolved::klass())->allocate_instance(CHECK_NULL); | 305 Handle obj = instanceKlass::cast(HotSpotMethodResolved::klass())->allocate_instance(CHECK_NULL); |
305 assert(obj() != NULL, "must succeed in allocating instance"); | 306 assert(obj() != NULL, "must succeed in allocating instance"); |