changeset 1484:6b7001391c97

Fix dummy obj boxed long hack by replacing it with a reliable solution.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Mon, 29 Nov 2010 18:32:30 +0100
parents ba37b9335e1e
children 2d26b0046e0d
files src/share/vm/c1x/c1x_CodeInstaller.cpp src/share/vm/c1x/c1x_TargetMethod.hpp src/share/vm/classfile/systemDictionary.hpp src/share/vm/classfile/vmSymbols.hpp
diffstat 4 files changed, 7 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/c1x/c1x_CodeInstaller.cpp	Mon Nov 29 16:58:26 2010 +0100
+++ b/src/share/vm/c1x/c1x_CodeInstaller.cpp	Mon Nov 29 18:32:30 2010 +0100
@@ -551,16 +551,8 @@
         TRACE_C1X_3("relocating (HotSpotType) at %016x/%016x", instruction, operand);
       } else {
         jobject value;
-        if (java_lang_boxing_object::is_instance(obj(), T_LONG)) {
-          jlong id = obj->long_field(java_lang_boxing_object::value_offset_in_bytes(T_LONG));
-
-          //assert((id & VmIds::TYPE_MASK) == VmIds::CONSTANT, "unexpected DataPatch type");
-          address operand = Assembler::locate_operand(instruction, Assembler::imm_operand);
-          if (id == VmIds::DUMMY_CONSTANT) {
-            value = (jobject) Universe::non_oop_word();
-          } else {
-            value = JNIHandles::make_local(VmIds::get<oop>(id));
-          }
+        if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) {
+          value = (jobject) Universe::non_oop_word();
         } else {
           value = JNIHandles::make_local(obj());
         }
--- a/src/share/vm/c1x/c1x_TargetMethod.hpp	Mon Nov 29 16:58:26 2010 +0100
+++ b/src/share/vm/c1x/c1x_TargetMethod.hpp	Mon Nov 29 18:32:30 2010 +0100
@@ -64,6 +64,9 @@
   start_class(HotSpotMethodResolved)                                                    \
     long_field(HotSpotMethodResolved, vmId)                                             \
   end_class                                                                             \
+  start_class(HotSpotProxy)                                                             \
+    static_oop_field(HotSpotProxy, DUMMY_CONSTANT_OBJ, "Ljava/lang/Long;")              \
+  end_class                                                                             \
   start_class(HotSpotTargetMethod)                                                      \
     oop_field(HotSpotTargetMethod, targetMethod, "Lcom/sun/cri/ci/CiTargetMethod;")     \
     oop_field(HotSpotTargetMethod, method, "Lcom/sun/hotspot/c1x/HotSpotMethodResolved;")\
--- a/src/share/vm/classfile/systemDictionary.hpp	Mon Nov 29 16:58:26 2010 +0100
+++ b/src/share/vm/classfile/systemDictionary.hpp	Mon Nov 29 18:32:30 2010 +0100
@@ -176,6 +176,7 @@
   template(HotSpotMethodResolved_klass,  com_sun_hotspot_c1x_HotSpotMethodResolved,                 Opt) \
   template(HotSpotTargetMethod_klass,    com_sun_hotspot_c1x_HotSpotTargetMethod,                   Opt) \
   template(HotSpotExceptionHandler_klass,com_sun_hotspot_c1x_HotSpotExceptionHandler,               Opt) \
+  template(HotSpotProxy_klass,           com_sun_hotspot_c1x_HotSpotProxy,                          Opt) \
   template(CiTargetMethod_klass,         com_sun_cri_ci_CiTargetMethod,                             Opt) \
   template(CiTargetMethod_Site_klass,    com_sun_cri_ci_CiTargetMethod_Site,                        Opt) \
   template(CiTargetMethod_Call_klass,    com_sun_cri_ci_CiTargetMethod_Call,                        Opt) \
--- a/src/share/vm/classfile/vmSymbols.hpp	Mon Nov 29 16:58:26 2010 +0100
+++ b/src/share/vm/classfile/vmSymbols.hpp	Mon Nov 29 18:32:30 2010 +0100
@@ -251,6 +251,7 @@
   template(com_sun_hotspot_c1x_HotSpotField,          "com/sun/hotspot/c1x/HotSpotField")                               \
   template(com_sun_hotspot_c1x_HotSpotTypeResolved,   "com/sun/hotspot/c1x/HotSpotTypeResolved")                        \
   template(com_sun_hotspot_c1x_HotSpotExceptionHandler,"com/sun/hotspot/c1x/HotSpotExceptionHandler")                   \
+  template(com_sun_hotspot_c1x_HotSpotProxy,          "com/sun/hotspot/c1x/HotSpotProxy")                               \
   template(com_sun_hotspot_c1x_Compiler,              "com/sun/hotspot/c1x/Compiler")                                   \
   template(com_sun_cri_ri_RiMethod,                   "com/sun/cri/ri/RiMethod")                                        \
   template(com_sun_cri_ri_RiField,                    "com/sun/cri/ri/RiField")                                         \