equal
deleted
inserted
replaced
35 guarantee(thread->is_Java_thread(), "crucial check - the VM thread cannot and must not escape to Java code"); |
35 guarantee(thread->is_Java_thread(), "crucial check - the VM thread cannot and must not escape to Java code"); |
36 assert(!thread->owns_locks(), "must release all locks when leaving VM"); |
36 assert(!thread->owns_locks(), "must release all locks when leaving VM"); |
37 guarantee(!thread->is_Compiler_thread(), "cannot make java calls from the compiler"); |
37 guarantee(!thread->is_Compiler_thread(), "cannot make java calls from the compiler"); |
38 _result = result; |
38 _result = result; |
39 |
39 |
40 // Make sure that that the value of the higest_lock is at least the same as the current stackpointer, |
|
41 // since, the Java code is highly likely to use locks. |
|
42 // Use '(address)this' to guarantee that highest_lock address is conservative and inside our thread |
|
43 thread->update_highest_lock((address)this); |
|
44 |
|
45 // Allocate handle block for Java code. This must be done before we change thread_state to _thread_in_Java_or_stub, |
40 // Allocate handle block for Java code. This must be done before we change thread_state to _thread_in_Java_or_stub, |
46 // since it can potentially block. |
41 // since it can potentially block. |
47 JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread); |
42 JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread); |
48 |
43 |
49 // After this, we are official in JavaCode. This needs to be done before we change any of the thread local |
44 // After this, we are official in JavaCode. This needs to be done before we change any of the thread local |