diff src/share/vm/runtime/javaCalls.cpp @ 8151:b8f261ba79c6

Minimize diff to plain HotSpot version.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 07 Mar 2013 21:00:29 +0100
parents f10843a2d961
children f94bb5d20e5d
line wrap: on
line diff
--- a/src/share/vm/runtime/javaCalls.cpp	Thu Mar 07 15:17:51 2013 +0100
+++ b/src/share/vm/runtime/javaCalls.cpp	Thu Mar 07 21:00:29 2013 +0100
@@ -39,21 +39,7 @@
 #include "runtime/mutexLocker.hpp"
 #include "runtime/signature.hpp"
 #include "runtime/stubRoutines.hpp"
-#ifdef HIGH_LEVEL_INTERPRETER
-# include "graal/graalVMToInterpreter.hpp"
-#endif
-#ifdef TARGET_OS_FAMILY_linux
-# include "thread_linux.inline.hpp"
-#endif
-#ifdef TARGET_OS_FAMILY_solaris
-# include "thread_solaris.inline.hpp"
-#endif
-#ifdef TARGET_OS_FAMILY_windows
-# include "thread_windows.inline.hpp"
-#endif
-#ifdef TARGET_OS_FAMILY_bsd
-# include "thread_bsd.inline.hpp"
-#endif
+#include "runtime/thread.inline.hpp"
 
 // -----------------------------------------------------
 // Implementation of JavaCallWrapper
@@ -335,19 +321,10 @@
   assert(THREAD->is_Java_thread(), "only JavaThreads can make JavaCalls");
   // Need to wrap each and everytime, since there might be native code down the
   // stack that has installed its own exception handlers
-  os::os_exception_wrapper(call_helper, result, &method, NULL, args, THREAD);
+  os::os_exception_wrapper(call_helper, result, &method, args, THREAD);
 }
 
-void JavaCalls::call(JavaValue* result, methodHandle method, nmethod* nm, JavaCallArguments* args, TRAPS) {
-  // Check if we need to wrap a potential OS exception handler around thread
-  // This is used for e.g. Win32 structured exception handlers
-  assert(THREAD->is_Java_thread(), "only JavaThreads can make JavaCalls");
-  // Need to wrap each and everytime, since there might be native code down the
-  // stack that has installed its own exception handlers
-  os::os_exception_wrapper(call_helper, result, &method, nm, args, THREAD);
-}
-
-void JavaCalls::call_helper(JavaValue* result, methodHandle* m, nmethod* nm, JavaCallArguments* args, TRAPS) {
+void JavaCalls::call_helper(JavaValue* result, methodHandle* m, JavaCallArguments* args, TRAPS) {
   methodHandle method = *m;
   JavaThread* thread = (JavaThread*)THREAD;
   assert(thread->is_Java_thread(), "must be called by a java thread");
@@ -373,6 +350,7 @@
   }
 #endif
 
+
 #ifdef ASSERT
   { InstanceKlass* holder = method->method_holder();
     // A klass might not be initialized since JavaCall's might be used during the executing of
@@ -427,26 +405,18 @@
     os::bang_stack_shadow_pages();
   }
 
+#ifdef GRAAL
+  nmethod* nm = args->alternative_target();
   if (nm != NULL) {
-#ifdef GRAAL
     if (nm->is_alive()) {
       ((JavaThread*) THREAD)->set_graal_alternate_call_target(nm->verified_entry_point());
       entry_point = method->adapter()->get_i2c_entry();
     } else {
       THROW(vmSymbols::MethodInvalidatedException());
     }
-#else
-    ShouldNotReachHere();
+  }
 #endif
-  }
   
-#ifdef HIGH_LEVEL_INTERPRETER
-  if (thread->high_level_interpreter_in_vm() && !method->is_native() && Interpreter::contains(entry_point)) {
-    assert(nm == NULL || !nm->is_alive(), "otherwise nm should be invoked");
-    VMToInterpreter::execute(result, m, args, result->get_type(), thread);
-    oop_result_flag = false; // result already holds the correct value
-  } else
-#endif
   // do call
   { JavaCallWrapper link(method, receiver, result, CHECK);
     { HandleMark hm(thread);  // HandleMark used by HandleMarkCleaner
@@ -482,6 +452,7 @@
   }
 }
 
+
 //--------------------------------------------------------------------------------------
 // Implementation of JavaCallArguments