comparison src/share/vm/runtime/javaCalls.cpp @ 4981:1b8d02e10ee8

Remove the hacks around "is_Compiler_thread" assertions; Graal no longer uses the compiler thread mechanisms; don't create a C++ compilation queue or any compiler threads.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 27 Feb 2012 22:15:05 +0100
parents 04b9a2566eec
children 897b7d18bebc
comparison
equal deleted inserted replaced
4980:1c7c5be93e84 4981:1b8d02e10ee8
59 JavaThread* thread = (JavaThread *)THREAD; 59 JavaThread* thread = (JavaThread *)THREAD;
60 bool clear_pending_exception = true; 60 bool clear_pending_exception = true;
61 61
62 guarantee(thread->is_Java_thread(), "crucial check - the VM thread cannot and must not escape to Java code"); 62 guarantee(thread->is_Java_thread(), "crucial check - the VM thread cannot and must not escape to Java code");
63 assert(!thread->owns_locks(), "must release all locks when leaving VM"); 63 assert(!thread->owns_locks(), "must release all locks when leaving VM");
64 // (tw) may we do this? 64 guarantee(!thread->is_Compiler_thread(), "cannot make java calls from the compiler");
65 // guarantee(!thread->is_Compiler_thread(), "cannot make java calls from the compiler");
66 _result = result; 65 _result = result;
67 66
68 // Allocate handle block for Java code. This must be done before we change thread_state to _thread_in_Java_or_stub, 67 // Allocate handle block for Java code. This must be done before we change thread_state to _thread_in_Java_or_stub,
69 // since it can potentially block. 68 // since it can potentially block.
70 JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread); 69 JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread);
371 assert(instanceKlass::cast(holder)->is_linked(), "rewritting must have taken place"); 370 assert(instanceKlass::cast(holder)->is_linked(), "rewritting must have taken place");
372 } 371 }
373 #endif 372 #endif
374 373
375 374
376 // (tw) may we do this? 375 assert(!thread->is_Compiler_thread(), "cannot compile from the compiler");
377 //assert(!thread->is_Compiler_thread(), "cannot compile from the compiler");
378 if (CompilationPolicy::must_be_compiled(method)) { 376 if (CompilationPolicy::must_be_compiled(method)) {
379 CompileBroker::compile_method(method, InvocationEntryBci, 377 CompileBroker::compile_method(method, InvocationEntryBci,
380 CompilationPolicy::policy()->initial_compile_level(), 378 CompilationPolicy::policy()->initial_compile_level(),
381 methodHandle(), 0, "must_be_compiled", CHECK); 379 methodHandle(), 0, "must_be_compiled", CHECK);
382 } 380 }