# HG changeset patch # User Thomas Wuerthinger # Date 1291051950 -3600 # Node ID 6b7001391c970f5a4e08832b7a2cffd2ed02e565 # Parent ba37b9335e1e0f09ae00cede25108a521c06b9b0 Fix dummy obj boxed long hack by replacing it with a reliable solution. diff -r ba37b9335e1e -r 6b7001391c97 src/share/vm/c1x/c1x_CodeInstaller.cpp --- 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(id)); - } + if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) { + value = (jobject) Universe::non_oop_word(); } else { value = JNIHandles::make_local(obj()); } diff -r ba37b9335e1e -r 6b7001391c97 src/share/vm/c1x/c1x_TargetMethod.hpp --- 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;")\ diff -r ba37b9335e1e -r 6b7001391c97 src/share/vm/classfile/systemDictionary.hpp --- 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) \ diff -r ba37b9335e1e -r 6b7001391c97 src/share/vm/classfile/vmSymbols.hpp --- 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") \