32 #include "oops/method.inline.hpp" 33 #include "oops/objArrayOop.inline.hpp" 34 #include "oops/typeArrayOop.inline.hpp" 35 #include "compiler/compileBroker.hpp" 36 #include "compiler/disassembler.hpp" 37 #include "jvmci/jvmciCompilerToVM.hpp" 38 #include "jvmci/jvmciCodeInstaller.hpp" 39 #include "jvmci/jvmciRuntime.hpp" 40 #include "runtime/fieldDescriptor.inline.hpp" 41 #include "runtime/flags/jvmFlag.hpp" 42 #include "runtime/frame.inline.hpp" 43 #include "runtime/interfaceSupport.inline.hpp" 44 #include "runtime/jniHandles.inline.hpp" 45 #include "runtime/timerTrace.hpp" 46 #include "runtime/vframe_hp.hpp" 47 48 JVMCIKlassHandle::JVMCIKlassHandle(Thread* thread, Klass* klass) { 49 _thread = thread; 50 _klass = klass; 51 if (klass != NULL) { 52 _holder = Handle(_thread, klass->holder_phantom()); 53 } 54 } 55 56 JVMCIKlassHandle& JVMCIKlassHandle::operator=(Klass* klass) { 57 _klass = klass; 58 if (klass != NULL) { 59 _holder = Handle(_thread, klass->holder_phantom()); 60 } 61 return *this; 62 } 63 64 void JNIHandleMark::push_jni_handle_block() { 65 JavaThread* thread = JavaThread::current(); 66 if (thread != NULL) { 67 // Allocate a new block for JNI handles. 68 // Inlined code from jni_PushLocalFrame() 69 JNIHandleBlock* java_handles = ((JavaThread*)thread)->active_handles(); 70 JNIHandleBlock* compile_handles = JNIHandleBlock::allocate_block(thread); 71 assert(compile_handles != NULL && java_handles != NULL, "should not be NULL"); 72 compile_handles->set_pop_frame_link(java_handles); 73 thread->set_active_handles(compile_handles); 74 } 75 } 76 77 void JNIHandleMark::pop_jni_handle_block() { 78 JavaThread* thread = JavaThread::current(); 79 if (thread != NULL) { | 32 #include "oops/method.inline.hpp" 33 #include "oops/objArrayOop.inline.hpp" 34 #include "oops/typeArrayOop.inline.hpp" 35 #include "compiler/compileBroker.hpp" 36 #include "compiler/disassembler.hpp" 37 #include "jvmci/jvmciCompilerToVM.hpp" 38 #include "jvmci/jvmciCodeInstaller.hpp" 39 #include "jvmci/jvmciRuntime.hpp" 40 #include "runtime/fieldDescriptor.inline.hpp" 41 #include "runtime/flags/jvmFlag.hpp" 42 #include "runtime/frame.inline.hpp" 43 #include "runtime/interfaceSupport.inline.hpp" 44 #include "runtime/jniHandles.inline.hpp" 45 #include "runtime/timerTrace.hpp" 46 #include "runtime/vframe_hp.hpp" 47 48 JVMCIKlassHandle::JVMCIKlassHandle(Thread* thread, Klass* klass) { 49 _thread = thread; 50 _klass = klass; 51 if (klass != NULL) { 52 _holder = Handle(_thread, klass->klass_holder()); 53 } 54 } 55 56 JVMCIKlassHandle& JVMCIKlassHandle::operator=(Klass* klass) { 57 _klass = klass; 58 if (klass != NULL) { 59 _holder = Handle(_thread, klass->klass_holder()); 60 } 61 return *this; 62 } 63 64 void JNIHandleMark::push_jni_handle_block() { 65 JavaThread* thread = JavaThread::current(); 66 if (thread != NULL) { 67 // Allocate a new block for JNI handles. 68 // Inlined code from jni_PushLocalFrame() 69 JNIHandleBlock* java_handles = ((JavaThread*)thread)->active_handles(); 70 JNIHandleBlock* compile_handles = JNIHandleBlock::allocate_block(thread); 71 assert(compile_handles != NULL && java_handles != NULL, "should not be NULL"); 72 compile_handles->set_pop_frame_link(java_handles); 73 thread->set_active_handles(compile_handles); 74 } 75 } 76 77 void JNIHandleMark::pop_jni_handle_block() { 78 JavaThread* thread = JavaThread::current(); 79 if (thread != NULL) { |