diff src/share/vm/code/dependencies.cpp @ 14518:d8041d695d19

Merged with jdk9/dev/hotspot changeset 3812c088b945
author twisti
date Tue, 11 Mar 2014 18:45:59 -0700
parents 096c224171c4 524b54a7f1b5
children b51e29501f30 4ca6dc0799b6
line wrap: on
line diff
--- a/src/share/vm/code/dependencies.cpp	Wed Mar 12 00:00:05 2014 +0100
+++ b/src/share/vm/code/dependencies.cpp	Tue Mar 11 18:45:59 2014 -0700
@@ -867,8 +867,6 @@
   } else {
     o = _deps->oop_recorder()->metadata_at(i);
   }
-  assert(o == NULL || o->is_metaspace_object(),
-         err_msg("Should be metadata " PTR_FORMAT, o));
   return o;
 }
 
@@ -892,6 +890,17 @@
   return result;
 }
 
+/**
+ * Returns a unique identifier for each dependency argument.
+ */
+uintptr_t Dependencies::DepStream::get_identifier(int i) {
+  if (has_oop_argument()) {
+    return (uintptr_t)(oopDesc*)argument_oop(i);
+  } else {
+    return (uintptr_t)argument(i);
+  }
+}
+
 oop Dependencies::DepStream::argument_oop(int i) {
   oop result = recorded_oop_at(argument_index(i));
   assert(result == NULL || result->is_oop(), "must be");
@@ -927,6 +936,20 @@
   return NULL;
 }
 
+// ----------------- DependencySignature --------------------------------------
+bool DependencySignature::equals(DependencySignature* sig) const {
+  if ((type() != sig->type()) || (args_count() != sig->args_count())) {
+    return false;
+  }
+
+  for (int i = 0; i < sig->args_count(); i++) {
+    if (arg(i) != sig->arg(i)) {
+      return false;
+    }
+  }
+  return true;
+}
+
 /// Checking dependencies:
 
 // This hierarchy walker inspects subtypes of a given type,
@@ -1373,11 +1396,9 @@
 
   // We could also return false if m does not yet appear to be
   // executed, if the VM version supports this distinction also.
+  // Default methods are considered "concrete" as well.
   return !m->is_abstract() &&
-         !InstanceKlass::cast(m->method_holder())->is_interface();
-         // TODO: investigate whether default methods should be
-         // considered as "concrete" in this situation.  For now they
-         // are not.
+         !m->is_overpass(); // error functions aren't concrete
 }