diff src/share/vm/graal/graalCodeInstaller.cpp @ 8136:c66aa27ef4da

Reenable patching of optimized and static calls but without out-of-line stubs.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 06 Mar 2013 21:58:58 +0100
parents 0799a7efbe7b
children b8f261ba79c6
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp	Wed Mar 06 16:39:01 2013 +0100
+++ b/src/share/vm/graal/graalCodeInstaller.cpp	Wed Mar 06 21:58:58 2013 +0100
@@ -699,6 +699,21 @@
         _instructions->relocate(call->instruction_address(), virtual_call_Relocation::spec(_invoke_mark_pc), Assembler::call32_operand);
         break;
       }
+      case MARK_INVOKESTATIC: {
+        assert(method == NULL || method->is_static(), "cannot call non-static method with invokestatic");
+
+        NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
+        call->set_destination(SharedRuntime::get_resolve_static_call_stub());
+        _instructions->relocate(call->instruction_address(), relocInfo::static_call_type, Assembler::call32_operand);
+        break;
+      }
+      case MARK_INVOKESPECIAL: {
+        assert(method == NULL || !method->is_static(), "cannot call static method with invokespecial");
+        NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
+        call->set_destination(SharedRuntime::get_resolve_opt_virtual_call_stub());
+        _instructions->relocate(call->instruction_address(), relocInfo::opt_virtual_call_type, Assembler::call32_operand);
+        break;
+      }
       default:
         fatal("invalid _next_call_type value");
         break;
@@ -807,6 +822,8 @@
         n_copy->set_data((intptr_t)Universe::non_oop_word());
       }
       case MARK_INLINE_INVOKE:
+      case MARK_INVOKESTATIC:
+      case MARK_INVOKESPECIAL:
         _next_call_type = (MarkId) id;
         _invoke_mark_pc = instruction;
         break;