comparison src/share/vm/graal/graalRuntime.cpp @ 5525:77d302416830

Create HotSpotGraalRuntime class on HotSpot when Graal.getRuntime() is accessed.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 08 Jun 2012 17:55:28 +0200
parents 861f8d5a5153
children 87e4aed94b26
comparison
equal deleted inserted replaced
5524:ab6115911fe5 5525:77d302416830
26 // JVM_InitializeGraalRuntime 26 // JVM_InitializeGraalRuntime
27 JVM_ENTRY(jobject, JVM_InitializeGraalRuntime(JNIEnv *env, jclass graalclass)) 27 JVM_ENTRY(jobject, JVM_InitializeGraalRuntime(JNIEnv *env, jclass graalclass))
28 ThreadToNativeFromVM ttnfv(thread); 28 ThreadToNativeFromVM ttnfv(thread);
29 jclass klass = env->FindClass("com/oracle/graal/hotspot/HotSpotGraalRuntime"); 29 jclass klass = env->FindClass("com/oracle/graal/hotspot/HotSpotGraalRuntime");
30 guarantee(klass != NULL, "Could not find class com.oracle.graal.hotspot.HotSpotGraalRuntime"); 30 guarantee(klass != NULL, "Could not find class com.oracle.graal.hotspot.HotSpotGraalRuntime");
31 return env->AllocObject(klass); 31 jmethodID constructor = env->GetMethodID(klass, "<init>", "()V");
32 guarantee(constructor != NULL, "Constructor of HotSpotGraalRuntime must not have any parameters");
33 jobject newObj = env->AllocObject(klass);
34 env->CallVoidMethod(newObj, constructor);
35 return newObj;
32 JVM_END 36 JVM_END