comparison src/share/vm/graal/graalCodeInstaller.cpp @ 5326:a53162ca8219

introduced HotSpotKlassOop type to convey a klassOop value from the compiler to the C++ code instead of relying on the C++ code automagically converting a HotSpotTypeResolvedImpl value to a klassOop
author Doug Simon <doug.simon@oracle.com>
date Mon, 30 Apr 2012 20:15:20 +0200
parents 290b3025b66f
children e318468952f5
comparison
equal deleted inserted replaced
5325:f8ea2735ec4f 5326:a53162ca8219
741 case 'z': 741 case 'z':
742 case 'b': 742 case 'b':
743 case 's': 743 case 's':
744 case 'c': 744 case 'c':
745 case 'i': 745 case 'i':
746 fatal("int-sized values not expected in DataPatch") 746 fatal("int-sized values not expected in DataPatch");
747 ;
748 break; 747 break;
749 case 'f': 748 case 'f':
750 case 'j': 749 case 'j':
751 case 'd': { 750 case 'd': {
752 address operand = Assembler::locate_operand(instruction, Assembler::disp32_operand); 751 address operand = Assembler::locate_operand(instruction, Assembler::disp32_operand);
771 } 770 }
772 case 'a': { 771 case 'a': {
773 address operand = Assembler::locate_operand(instruction, Assembler::imm_operand); 772 address operand = Assembler::locate_operand(instruction, Assembler::imm_operand);
774 Handle obj = CiConstant::object(constant); 773 Handle obj = CiConstant::object(constant);
775 774
776 if (obj->is_a(HotSpotTypeResolved::klass())) { 775 if (obj->is_a(HotSpotKlassOop::klass())) {
777 assert(!obj.is_null(), ""); 776 assert(!obj.is_null(), "");
778 *((jobject*) operand) = JNIHandles::make_local(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(obj))); 777 *((jobject*) operand) = JNIHandles::make_local(java_lang_Class::as_klassOop(HotSpotKlassOop::javaMirror(obj)));
779 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); 778 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand);
780 TRACE_graal_3("relocating (HotSpotType) at %016x/%016x", instruction, operand); 779 TRACE_graal_3("relocating (HotSpotType) at %016x/%016x", instruction, operand);
781 } else { 780 } else {
782 jobject value = JNIHandles::make_local(obj()); 781 jobject value = JNIHandles::make_local(obj());
783 if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) { 782 if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) {