Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1x/c1x_CodeInstaller.cpp @ 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 | 1f81c0d18c75 |
children | 48bbaead8b6c |
comparison
equal
deleted
inserted
replaced
1483:ba37b9335e1e | 1484:6b7001391c97 |
---|---|
549 *((jobject*) operand) = JNIHandles::make_local(VmIds::get<klassOop>(HotSpotTypeResolved::vmId(obj))); | 549 *((jobject*) operand) = JNIHandles::make_local(VmIds::get<klassOop>(HotSpotTypeResolved::vmId(obj))); |
550 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); | 550 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); |
551 TRACE_C1X_3("relocating (HotSpotType) at %016x/%016x", instruction, operand); | 551 TRACE_C1X_3("relocating (HotSpotType) at %016x/%016x", instruction, operand); |
552 } else { | 552 } else { |
553 jobject value; | 553 jobject value; |
554 if (java_lang_boxing_object::is_instance(obj(), T_LONG)) { | 554 if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) { |
555 jlong id = obj->long_field(java_lang_boxing_object::value_offset_in_bytes(T_LONG)); | 555 value = (jobject) Universe::non_oop_word(); |
556 | |
557 //assert((id & VmIds::TYPE_MASK) == VmIds::CONSTANT, "unexpected DataPatch type"); | |
558 address operand = Assembler::locate_operand(instruction, Assembler::imm_operand); | |
559 if (id == VmIds::DUMMY_CONSTANT) { | |
560 value = (jobject) Universe::non_oop_word(); | |
561 } else { | |
562 value = JNIHandles::make_local(VmIds::get<oop>(id)); | |
563 } | |
564 } else { | 556 } else { |
565 value = JNIHandles::make_local(obj()); | 557 value = JNIHandles::make_local(obj()); |
566 } | 558 } |
567 *((jobject*) operand) = value; | 559 *((jobject*) operand) = value; |
568 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); | 560 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); |