hotspot/src/share/vm/code/dependencies.cpp
changeset 31037 01a5c5fa5681
parent 30296 95baefac8485
child 33160 c59f1676d27e
child 33105 294e48b4f704
--- a/hotspot/src/share/vm/code/dependencies.cpp	Fri May 15 19:21:46 2015 +0300
+++ b/hotspot/src/share/vm/code/dependencies.cpp	Fri May 15 19:23:11 2015 +0300
@@ -117,9 +117,7 @@
 }
 
 void Dependencies::assert_call_site_target_value(ciCallSite* call_site, ciMethodHandle* method_handle) {
-  ciKlass* ctxk = call_site->get_context();
-  check_ctxk(ctxk);
-  assert_common_3(call_site_target_value, ctxk, call_site, method_handle);
+  assert_common_2(call_site_target_value, call_site, method_handle);
 }
 
 // Helper function.  If we are adding a new dep. under ctxk2,
@@ -175,7 +173,6 @@
       }
     }
   } else {
-    assert(dep_implicit_context_arg(dept) == 0, "sanity");
     if (note_dep_seen(dept, x0) && note_dep_seen(dept, x1)) {
       // look in this bucket for redundant assertions
       const int stride = 2;
@@ -389,7 +386,7 @@
   3, // unique_concrete_subtypes_2 ctxk, k1, k2
   3, // unique_concrete_methods_2 ctxk, m1, m2
   1, // no_finalizable_subclasses ctxk
-  3  // call_site_target_value ctxk, call_site, method_handle
+  2  // call_site_target_value call_site, method_handle
 };
 
 const char* Dependencies::dep_name(Dependencies::DepType dept) {
@@ -1515,16 +1512,11 @@
   return find_finalizable_subclass(search_at);
 }
 
-Klass* Dependencies::check_call_site_target_value(Klass* recorded_ctxk, oop call_site, oop method_handle, CallSiteDepChange* changes) {
+Klass* Dependencies::check_call_site_target_value(oop call_site, oop method_handle, CallSiteDepChange* changes) {
+  assert(!oopDesc::is_null(call_site), "sanity");
+  assert(!oopDesc::is_null(method_handle), "sanity");
   assert(call_site->is_a(SystemDictionary::CallSite_klass()),     "sanity");
-  assert(!oopDesc::is_null(method_handle), "sanity");
 
-  Klass* call_site_ctxk = MethodHandles::get_call_site_context(call_site);
-  assert(!Klass::is_null(call_site_ctxk), "call site context should be initialized already");
-  if (recorded_ctxk != call_site_ctxk) {
-    // Stale context
-    return recorded_ctxk;
-  }
   if (changes == NULL) {
     // Validate all CallSites
     if (java_lang_invoke_CallSite::target(call_site) != method_handle)
@@ -1599,7 +1591,7 @@
   Klass* witness = NULL;
   switch (type()) {
   case call_site_target_value:
-    witness = check_call_site_target_value(context_type(), argument_oop(1), argument_oop(2), changes);
+    witness = check_call_site_target_value(argument_oop(0), argument_oop(1), changes);
     break;
   default:
     witness = NULL;