# HG changeset patch # User Gilles Duboscq # Date 1325780728 -3600 # Node ID 8074251d1e05d552b5f8ab87cde26265672bf680 # Parent e872562f95f839f4925fb6def910fd8ca42c2988 Fix bug in code installer that caused builds with assertions to crash diff -r e872562f95f8 -r 8074251d1e05 src/share/vm/classfile/systemDictionary.hpp --- a/src/share/vm/classfile/systemDictionary.hpp Thu Jan 05 14:53:37 2012 +0100 +++ b/src/share/vm/classfile/systemDictionary.hpp Thu Jan 05 17:25:28 2012 +0100 @@ -195,6 +195,7 @@ template(HotSpotMethodResolved_klass, com_oracle_max_graal_hotspot_ri_HotSpotMethodResolved, Opt) \ template(HotSpotTargetMethod_klass, com_oracle_max_graal_hotspot_HotSpotTargetMethod, Opt) \ template(HotSpotExceptionHandler_klass, com_oracle_max_graal_hotspot_HotSpotExceptionHandler, Opt) \ + template(HotSpotProxy_klass, com_oracle_max_graal_hotspot_HotSpotProxy, Opt) \ template(CiAssumptions_klass, com_oracle_max_cri_ci_CiAssumptions, Opt) \ template(CiAssumptions_ConcreteSubtype_klass, com_oracle_max_cri_ci_CiAssumptions_ConcreteSubtype, Opt) \ template(CiAssumptions_ConcreteMethod_klass, com_oracle_max_cri_ci_CiAssumptions_ConcreteMethod, Opt) \ @@ -205,7 +206,7 @@ template(CiTargetMethod_Safepoint_klass, com_oracle_max_cri_ci_CiTargetMethod_Safepoint, Opt) \ template(CiTargetMethod_ExceptionHandler_klass, com_oracle_max_cri_ci_CiTargetMethod_ExceptionHandler, Opt) \ template(CiTargetMethod_Mark_klass, com_oracle_max_cri_ci_CiTargetMethod_Mark, Opt) \ - template(GraalBitMap_klass, com_oracle_max_cri_ci_CiBitMap, Opt) \ + template(GraalBitMap_klass, com_oracle_max_cri_ci_CiBitMap, Opt) \ template(CiDebugInfo_klass, com_oracle_max_cri_ci_CiDebugInfo, Opt) \ template(CiFrame_klass, com_oracle_max_cri_ci_CiFrame, Opt) \ template(CiValue_klass, com_oracle_max_cri_ci_CiValue, Opt) \ diff -r e872562f95f8 -r 8074251d1e05 src/share/vm/classfile/vmSymbols.hpp --- a/src/share/vm/classfile/vmSymbols.hpp Thu Jan 05 14:53:37 2012 +0100 +++ b/src/share/vm/classfile/vmSymbols.hpp Thu Jan 05 17:25:28 2012 +0100 @@ -278,6 +278,7 @@ template(com_oracle_max_graal_hotspot_HotSpotTypeResolved, "com/oracle/max/graal/hotspot/ri/HotSpotTypeResolvedImpl") \ template(com_oracle_max_graal_hotspot_HotSpotType, "com/oracle/max/graal/hotspot/ri/HotSpotType") \ template(com_oracle_max_graal_hotspot_HotSpotExceptionHandler, "com/oracle/max/graal/hotspot/ri/HotSpotExceptionHandler") \ + template(com_oracle_max_graal_hotspot_HotSpotProxy, "com/oracle/max/graal/hotspot/HotSpotProxy") \ template(com_oracle_max_graal_hotspot_Compiler, "com/oracle/max/graal/hotspot/Compiler") \ template(com_oracle_max_graal_hotspot_CompilerImpl, "com/oracle/max/graal/hotspot/CompilerImpl") \ template(com_oracle_max_cri_ri_RiMethod, "com/oracle/max/cri/ri/RiMethod") \ diff -r e872562f95f8 -r 8074251d1e05 src/share/vm/graal/graalCodeInstaller.cpp --- a/src/share/vm/graal/graalCodeInstaller.cpp Thu Jan 05 14:53:37 2012 +0100 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Thu Jan 05 17:25:28 2012 +0100 @@ -793,6 +793,9 @@ TRACE_graal_3("relocating (HotSpotType) at %016x/%016x", instruction, operand); } else { jobject value = JNIHandles::make_local(obj()); + if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) { + value = (jobject) Universe::non_oop_word(); + } *((jobject*) operand) = value; _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); TRACE_graal_3("relocating (oop constant) at %016x/%016x", instruction, operand); diff -r e872562f95f8 -r 8074251d1e05 src/share/vm/graal/graalJavaAccess.hpp --- a/src/share/vm/graal/graalJavaAccess.hpp Thu Jan 05 14:53:37 2012 +0100 +++ b/src/share/vm/graal/graalJavaAccess.hpp Thu Jan 05 17:25:28 2012 +0100 @@ -80,6 +80,9 @@ long_field(HotSpotCompiledMethod, nmethod) \ oop_field(HotSpotCompiledMethod, method, "Lcom/oracle/max/cri/ri/RiResolvedMethod;") \ 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/oracle/max/cri/ci/CiTargetMethod;") \ oop_field(HotSpotTargetMethod, method, "Lcom/oracle/max/graal/hotspot/ri/HotSpotMethodResolved;") \