diff src/share/vm/graal/graalVMEntries.cpp @ 3670:f198b24093f3

put back in thread transitions.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 18 Nov 2011 16:23:26 +0100
parents 53636e2c9d03
children d3d3dd0a3421 7958ebb561b0
line wrap: on
line diff
--- a/src/share/vm/graal/graalVMEntries.cpp	Fri Nov 18 14:14:37 2011 +0100
+++ b/src/share/vm/graal/graalVMEntries.cpp	Fri Nov 18 16:23:26 2011 +0100
@@ -467,9 +467,10 @@
   VM_ENTRY_MARK;
   index = GraalCompiler::to_cp_index_u2(index);
   constantPoolHandle cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(type)))->constants();
+  instanceKlassHandle pool_holder(cp->pool_holder());
 
   Bytecodes::Code bc = (Bytecodes::Code) (((int) byteCode) & 0xFF);
-  methodHandle method = GraalEnv::get_method_by_index(cp, index, bc, cp->pool_holder());
+  methodHandle method = GraalEnv::get_method_by_index(cp, index, bc, pool_holder);
   if (!method.is_null()) {
     Handle ret = GraalCompiler::createHotSpotMethodResolved(method, CHECK_NULL);
     return JNIHandles::make_local(THREAD, ret());
@@ -926,6 +927,7 @@
 JNIEXPORT jlong JNICALL Java_com_oracle_graal_hotspot_VMEntries_installMethod(JNIEnv *jniEnv, jobject, jobject targetMethod, jboolean install_code) {
   VM_ENTRY_MARK;
   ResourceMark rm;
+  HandleMark hm;
   Handle targetMethodHandle = JNIHandles::resolve(targetMethod);
   nmethod* nm = NULL;
   Arena arena;
@@ -938,6 +940,7 @@
 JNIEXPORT jlong JNICALL Java_com_oracle_graal_hotspot_VMEntries_installStub(JNIEnv *jniEnv, jobject, jobject targetMethod) {
   VM_ENTRY_MARK;
   ResourceMark rm;
+  HandleMark hm;
   Handle targetMethodHandle = JNIHandles::resolve(targetMethod);
   jlong id;
   Arena arena;