8001077: remove ciMethod::will_link
authorbharadwaj
Thu, 15 Nov 2012 10:42:06 -0800
changeset 14478 1c4a20806af7
parent 14477 95e66ea71f71
child 14479 7df3acc815a7
8001077: remove ciMethod::will_link Summary: Removed will_link and changed all calls to is_loaded(). Reviewed-by: kvn
hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp
hotspot/src/share/vm/ci/ciMethod.cpp
hotspot/src/share/vm/ci/ciMethod.hpp
hotspot/src/share/vm/opto/doCall.cpp
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Mon Nov 12 14:03:53 2012 -0800
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Thu Nov 15 10:42:06 2012 -0800
@@ -1836,7 +1836,7 @@
   // check if we could do inlining
   if (!PatchALot && Inline && klass->is_loaded() &&
       (klass->is_initialized() || klass->is_interface() && target->holder()->is_initialized())
-      && target->will_link(klass, callee_holder, code)) {
+      && target->is_loaded()) {
     // callee is known => check if we have static binding
     assert(target->is_loaded(), "callee must be known");
     if (code == Bytecodes::_invokestatic  ||
--- a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp	Mon Nov 12 14:03:53 2012 -0800
+++ b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp	Thu Nov 15 10:42:06 2012 -0800
@@ -282,7 +282,7 @@
   ciMethod* inline_target = NULL;
   if (target->is_loaded() && klass->is_loaded()
       && (klass->is_initialized() || klass->is_interface() && target->holder()->is_initialized())
-      && target->will_link(klass, callee_holder, code)) {
+      && target->is_loaded()) {
     if (code == Bytecodes::_invokestatic
         || code == Bytecodes::_invokespecial
         || code == Bytecodes::_invokevirtual && target->is_final_method()) {
--- a/hotspot/src/share/vm/ci/ciMethod.cpp	Mon Nov 12 14:03:53 2012 -0800
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp	Thu Nov 15 10:42:06 2012 -0800
@@ -876,25 +876,6 @@
 }
 
 // ------------------------------------------------------------------
-// ciMethod::will_link
-//
-// Will this method link in a specific calling context?
-bool ciMethod::will_link(ciKlass* accessing_klass,
-                         ciKlass* declared_method_holder,
-                         Bytecodes::Code bc) {
-  if (!is_loaded()) {
-    // Method lookup failed.
-    return false;
-  }
-
-  // The link checks have been front-loaded into the get_method
-  // call.  This method (ciMethod::will_link()) will be removed
-  // in the future.
-
-  return true;
-}
-
-// ------------------------------------------------------------------
 // ciMethod::should_exclude
 //
 // Should this method be excluded from compilation?
--- a/hotspot/src/share/vm/ci/ciMethod.hpp	Mon Nov 12 14:03:53 2012 -0800
+++ b/hotspot/src/share/vm/ci/ciMethod.hpp	Thu Nov 15 10:42:06 2012 -0800
@@ -241,9 +241,6 @@
   int resolve_vtable_index(ciKlass* caller, ciKlass* receiver);
 
   // Compilation directives
-  bool will_link(ciKlass* accessing_klass,
-                 ciKlass* declared_method_holder,
-                 Bytecodes::Code bc);
   bool should_exclude();
   bool should_inline();
   bool should_not_inline();
--- a/hotspot/src/share/vm/opto/doCall.cpp	Mon Nov 12 14:03:53 2012 -0800
+++ b/hotspot/src/share/vm/opto/doCall.cpp	Thu Nov 15 10:42:06 2012 -0800
@@ -334,7 +334,7 @@
     return true;
   }
 
-  assert(dest_method->will_link(method()->holder(), klass, bc()), "dest_method: typeflow responsibility");
+  assert(dest_method->is_loaded(), "dest_method: typeflow responsibility");
   return false;
 }