hotspot/src/share/vm/opto/escape.cpp
changeset 27142 31444af8b365
parent 26917 c3574c0b2da0
child 27424 77a7f4a2463b
--- a/hotspot/src/share/vm/opto/escape.cpp	Fri Oct 10 02:24:35 2014 -0700
+++ b/hotspot/src/share/vm/opto/escape.cpp	Mon Oct 06 14:53:30 2014 +0200
@@ -882,9 +882,14 @@
       assert(false, "should be done already");
       break;
 #endif
+    case Op_ArrayCopy:
     case Op_CallLeafNoFP:
-      is_arraycopy = (call->as_CallLeaf()->_name != NULL &&
-                      strstr(call->as_CallLeaf()->_name, "arraycopy") != 0);
+      // Most array copies are ArrayCopy nodes at this point but there
+      // are still a few direct calls to the copy subroutines (See
+      // PhaseStringOpts::copy_string())
+      is_arraycopy = (call->Opcode() == Op_ArrayCopy) ||
+        (call->as_CallLeaf()->_name != NULL &&
+         strstr(call->as_CallLeaf()->_name, "arraycopy") != 0);
       // fall through
     case Op_CallLeaf: {
       // Stub calls, objects do not escape but they are not scale replaceable.
@@ -894,6 +899,9 @@
       for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
         const Type* at = d->field_at(i);
         Node *arg = call->in(i);
+        if (arg == NULL) {
+          continue;
+        }
         const Type *aat = _igvn->type(arg);
         if (arg->is_top() || !at->isa_ptr() || !aat->isa_ptr())
           continue;