diff 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
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp	Mon Jul 09 22:17:00 2012 +0200
+++ b/src/share/vm/graal/graalCodeInstaller.cpp	Mon Jul 09 22:18:49 2012 +0200
@@ -787,9 +787,6 @@
         TRACE_graal_3("relocating (HotSpotJavaType) 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);
@@ -836,11 +833,19 @@
         _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand);
         break;
       }
+      case MARK_INVOKEVIRTUAL:
+      case MARK_INVOKEINTERFACE: {
+        // Convert the initial value of the klassOop slot in an inline cache
+        // from NULL to Universe::non_oop_word().
+        NativeMovConstReg* n_copy = nativeMovConstReg_at(instruction);
+        assert(n_copy->data() == 0, "inline cache klassOop initial value should be NULL");
+        n_copy->set_data((intptr_t)Universe::non_oop_word());
+        // Add relocation record for the klassOop embedded in the inline cache
+        _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand);
+      }
       case MARK_INVOKE_INVALID:
-      case MARK_INVOKEINTERFACE:
+      case MARK_INVOKESPECIAL:
       case MARK_INVOKESTATIC:
-      case MARK_INVOKESPECIAL:
-      case MARK_INVOKEVIRTUAL:
         _next_call_type = (MarkId) id;
         _invoke_mark_pc = instruction;
         break;