changeset 1415:712c7ff1afc1

Added HotSpotVM project.
author Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
date Wed, 23 Jun 2010 16:19:21 +0200
parents e1a275dbc8cd
children 1b41af477605
files src/share/vm/c1x/c1x_VMEntries.cpp src/share/vm/c1x/c1x_VMEntries.hpp
diffstat 2 files changed, 54 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/c1x/c1x_VMEntries.cpp	Tue May 18 21:53:05 2010 +0200
+++ b/src/share/vm/c1x/c1x_VMEntries.cpp	Wed Jun 23 16:19:21 2010 +0200
@@ -308,55 +308,55 @@
   return o->klass_part()->is_interface();
 }
 
-/*
-* Class:     com_sun_hotspot_c1x_VMEntries
-* Method:    RiMethod_accessFlags
-* Signature: (Ljava/lang/Object;)I
-*/
+/*
+* Class:     com_sun_hotspot_c1x_VMEntries
+* Method:    RiMethod_accessFlags
+* Signature: (Ljava/lang/Object;)I
+*/
 JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1accessFlags(JNIEnv *, jclass, jobject method) {
-  methodOop m = (methodOop)JNIHandles::resolve(method);
-  return m->access_flags().as_int();
-}
-
-/*
-* Class:     com_sun_hotspot_c1x_VMEntries
-* Method:    installCode
-* Signature: (Ljava/lang/Object;[BI)V
-*/
+  methodOop m = (methodOop)JNIHandles::resolve(method);
+  return m->access_flags().as_int();
+}
+
+/*
+* Class:     com_sun_hotspot_c1x_VMEntries
+* Method:    installCode
+* Signature: (Ljava/lang/Object;[BI)V
+*/
 JNIEXPORT void JNICALL Java_com_sun_hotspot_c1x_VMEntries_installCode(JNIEnv *jniEnv, jclass, jobject method, jbyteArray code, jint frameSize) {
 
-  methodOop m = (methodOop)JNIHandles::resolve(method);
-  jboolean isCopy = false;
-  jbyte *codeBytes = jniEnv->GetByteArrayElements(code, &isCopy);
-  // TODO: Check if we need to disallocate?
-  int codeSize = jniEnv->GetArrayLength(code);
-  VM_ENTRY_MARK;
+  methodOop m = (methodOop)JNIHandles::resolve(method);
+  jboolean isCopy = false;
+  jbyte *codeBytes = jniEnv->GetByteArrayElements(code, &isCopy);
+  // TODO: Check if we need to disallocate?
+  int codeSize = jniEnv->GetArrayLength(code);
+  VM_ENTRY_MARK;
   ciEnv *env = CURRENT_ENV;
 
   env->set_oop_recorder(new OopRecorder(env->arena()));
   env->set_debug_info(new DebugInformationRecorder(env->oop_recorder()));
-  env->set_dependencies(new Dependencies(env));
-  ciMethod *ciMethodObject = (ciMethod *)env->get_object(m);
-  CodeOffsets offsets;
-
-  // TODO: This is a hack.. Produce correct entries.
-  offsets.set_value(CodeOffsets::Exceptions, 0);
-  offsets.set_value(CodeOffsets::Deopt, 0);
-
+  env->set_dependencies(new Dependencies(env));
+  ciMethod *ciMethodObject = (ciMethod *)env->get_object(m);
+  CodeOffsets offsets;
+
+  // TODO: This is a hack.. Produce correct entries.
+  offsets.set_value(CodeOffsets::Exceptions, 0);
+  offsets.set_value(CodeOffsets::Deopt, 0);
+
   CodeBuffer buffer((address)codeBytes, codeSize);
   buffer.print();
   CodeSection *inst_section = buffer.insts();
   inst_section->set_end(inst_section->start() + codeSize);
-  buffer.initialize_oop_recorder(env->oop_recorder());
-  OopMapSet oop_map_set;
-  ExceptionHandlerTable handler_table;
-  ImplicitExceptionTable inc_table;
-  {
-    ThreadToNativeFromVM t((JavaThread*)THREAD);
-    env->register_method(ciMethodObject, -1, &offsets, 0, &buffer, frameSize, &oop_map_set, &handler_table, &inc_table, NULL, env->comp_level(), false, false);
-
-  }
-}
+  buffer.initialize_oop_recorder(env->oop_recorder());
+  OopMapSet oop_map_set;
+  ExceptionHandlerTable handler_table;
+  ImplicitExceptionTable inc_table;
+  {
+    ThreadToNativeFromVM t((JavaThread*)THREAD);
+    env->register_method(ciMethodObject, -1, &offsets, 0, &buffer, frameSize, &oop_map_set, &handler_table, &inc_table, NULL, env->comp_level(), false, false);
+
+  }
+}
 
 
 
--- a/src/share/vm/c1x/c1x_VMEntries.hpp	Tue May 18 21:53:05 2010 +0200
+++ b/src/share/vm/c1x/c1x_VMEntries.hpp	Wed Jun 23 16:19:21 2010 +0200
@@ -190,22 +190,22 @@
 JNIEXPORT jboolean JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInterface
 (JNIEnv *, jclass, jobject);
 
-/*
-* Class:     com_sun_hotspot_c1x_VMEntries
-* Method:    RiMethod_accessFlags
-* Signature: (Ljava/lang/Object;)I
-*/
-JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1accessFlags
-(JNIEnv *, jclass, jobject);
-
-/*
-* Class:     com_sun_hotspot_c1x_VMEntries
-* Method:    installCode
-* Signature: (Ljava/lang/Object;[BI)V
-*/
-JNIEXPORT void JNICALL Java_com_sun_hotspot_c1x_VMEntries_installCode
-(JNIEnv *, jclass, jobject, jbyteArray, jint);
-
+/*
+* Class:     com_sun_hotspot_c1x_VMEntries
+* Method:    RiMethod_accessFlags
+* Signature: (Ljava/lang/Object;)I
+*/
+JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1accessFlags
+(JNIEnv *, jclass, jobject);
+
+/*
+* Class:     com_sun_hotspot_c1x_VMEntries
+* Method:    installCode
+* Signature: (Ljava/lang/Object;[BI)V
+*/
+JNIEXPORT void JNICALL Java_com_sun_hotspot_c1x_VMEntries_installCode
+(JNIEnv *, jclass, jobject, jbyteArray, jint);
+
 
 
 extern JNINativeMethod VMEntries_methods[];