Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 5798:2585af1e26ac
implemented non-XIR lowering of invokes (todo: inline virtual dispatch and null checking of receivers)
removed HotSpotProxy class
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 09 Jul 2012 22:18:49 +0200 |
parents | 2a64cf19ab2a |
children | f238fe91dc7f |
comparison
equal
deleted
inserted
replaced
5797:b3a87b533c0f | 5798:2585af1e26ac |
---|---|
785 *((jobject*) operand) = JNIHandles::make_local(klass); | 785 *((jobject*) operand) = JNIHandles::make_local(klass); |
786 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); | 786 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); |
787 TRACE_graal_3("relocating (HotSpotJavaType) at %016x/%016x", instruction, operand); | 787 TRACE_graal_3("relocating (HotSpotJavaType) at %016x/%016x", instruction, operand); |
788 } else { | 788 } else { |
789 jobject value = JNIHandles::make_local(obj()); | 789 jobject value = JNIHandles::make_local(obj()); |
790 if (obj() == HotSpotProxy::DUMMY_CONSTANT_OBJ()) { | |
791 value = (jobject) Universe::non_oop_word(); | |
792 } | |
793 *((jobject*) operand) = value; | 790 *((jobject*) operand) = value; |
794 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); | 791 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); |
795 TRACE_graal_3("relocating (oop constant) at %016x/%016x", instruction, operand); | 792 TRACE_graal_3("relocating (oop constant) at %016x/%016x", instruction, operand); |
796 } | 793 } |
797 break; | 794 break; |
834 address call_pc = _instructions->start() + InstalledCode_Site::pcOffset(ref); | 831 address call_pc = _instructions->start() + InstalledCode_Site::pcOffset(ref); |
835 _instructions->relocate(instruction, static_stub_Relocation::spec(call_pc)); | 832 _instructions->relocate(instruction, static_stub_Relocation::spec(call_pc)); |
836 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); | 833 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); |
837 break; | 834 break; |
838 } | 835 } |
836 case MARK_INVOKEVIRTUAL: | |
837 case MARK_INVOKEINTERFACE: { | |
838 // Convert the initial value of the klassOop slot in an inline cache | |
839 // from NULL to Universe::non_oop_word(). | |
840 NativeMovConstReg* n_copy = nativeMovConstReg_at(instruction); | |
841 assert(n_copy->data() == 0, "inline cache klassOop initial value should be NULL"); | |
842 n_copy->set_data((intptr_t)Universe::non_oop_word()); | |
843 // Add relocation record for the klassOop embedded in the inline cache | |
844 _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); | |
845 } | |
839 case MARK_INVOKE_INVALID: | 846 case MARK_INVOKE_INVALID: |
840 case MARK_INVOKEINTERFACE: | 847 case MARK_INVOKESPECIAL: |
841 case MARK_INVOKESTATIC: | 848 case MARK_INVOKESTATIC: |
842 case MARK_INVOKESPECIAL: | |
843 case MARK_INVOKEVIRTUAL: | |
844 _next_call_type = (MarkId) id; | 849 _next_call_type = (MarkId) id; |
845 _invoke_mark_pc = instruction; | 850 _invoke_mark_pc = instruction; |
846 break; | 851 break; |
847 case MARK_IMPLICIT_NULL: | 852 case MARK_IMPLICIT_NULL: |
848 _implicit_exception_table.append(pc_offset, pc_offset); | 853 _implicit_exception_table.append(pc_offset, pc_offset); |