changeset 8519:d13ecb236a97

8086016: closed/java/text/Format/NumberFormat/BigDecimalCompatibilityTest.java is crashing Summary: Trying to transform ArrayCopyNode in dying part of the graph Reviewed-by: kvn
author roland
date Tue, 09 Jun 2015 12:09:03 +0200
parents e8995523fc8a
children cbadc6df922b 9251516ec93d
files src/share/vm/opto/arraycopynode.cpp src/share/vm/opto/callnode.cpp src/share/vm/opto/callnode.hpp
diffstat 3 files changed, 20 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/arraycopynode.cpp	Mon Jun 15 16:47:24 2015 +0300
+++ b/src/share/vm/opto/arraycopynode.cpp	Tue Jun 09 12:09:03 2015 +0200
@@ -438,11 +438,17 @@
       // replace fallthrough projections of the ArrayCopyNode by the
       // new memory, control and the input IO.
       CallProjections callprojs;
-      extract_projections(&callprojs, true);
+      extract_projections(&callprojs, true, false);
 
-      igvn->replace_node(callprojs.fallthrough_ioproj, in(TypeFunc::I_O));
-      igvn->replace_node(callprojs.fallthrough_memproj, mem);
-      igvn->replace_node(callprojs.fallthrough_catchproj, ctl);
+      if (callprojs.fallthrough_ioproj != NULL) {
+        igvn->replace_node(callprojs.fallthrough_ioproj, in(TypeFunc::I_O));
+      }
+      if (callprojs.fallthrough_memproj != NULL) {
+        igvn->replace_node(callprojs.fallthrough_memproj, mem);
+      }
+      if (callprojs.fallthrough_catchproj != NULL) {
+        igvn->replace_node(callprojs.fallthrough_catchproj, ctl);
+      }
 
       // The ArrayCopyNode is not disconnected. It still has the
       // projections for the exception case. Replace current
--- a/src/share/vm/opto/callnode.cpp	Mon Jun 15 16:47:24 2015 +0300
+++ b/src/share/vm/opto/callnode.cpp	Tue Jun 09 12:09:03 2015 +0200
@@ -830,7 +830,7 @@
 }
 
 
-void CallNode::extract_projections(CallProjections* projs, bool separate_io_proj) {
+void CallNode::extract_projections(CallProjections* projs, bool separate_io_proj, bool do_asserts) {
   projs->fallthrough_proj      = NULL;
   projs->fallthrough_catchproj = NULL;
   projs->fallthrough_ioproj    = NULL;
@@ -893,17 +893,18 @@
     }
   }
 
-  // The resproj may not exist because the result couuld be ignored
+  // The resproj may not exist because the result could be ignored
   // and the exception object may not exist if an exception handler
   // swallows the exception but all the other must exist and be found.
   assert(projs->fallthrough_proj      != NULL, "must be found");
-  assert(Compile::current()->inlining_incrementally() || projs->fallthrough_catchproj != NULL, "must be found");
-  assert(Compile::current()->inlining_incrementally() || projs->fallthrough_memproj   != NULL, "must be found");
-  assert(Compile::current()->inlining_incrementally() || projs->fallthrough_ioproj    != NULL, "must be found");
-  assert(Compile::current()->inlining_incrementally() || projs->catchall_catchproj    != NULL, "must be found");
+  do_asserts = do_asserts && !Compile::current()->inlining_incrementally();
+  assert(!do_asserts || projs->fallthrough_catchproj != NULL, "must be found");
+  assert(!do_asserts || projs->fallthrough_memproj   != NULL, "must be found");
+  assert(!do_asserts || projs->fallthrough_ioproj    != NULL, "must be found");
+  assert(!do_asserts || projs->catchall_catchproj    != NULL, "must be found");
   if (separate_io_proj) {
-    assert(Compile::current()->inlining_incrementally() || projs->catchall_memproj    != NULL, "must be found");
-    assert(Compile::current()->inlining_incrementally() || projs->catchall_ioproj     != NULL, "must be found");
+    assert(!do_asserts || projs->catchall_memproj    != NULL, "must be found");
+    assert(!do_asserts || projs->catchall_ioproj     != NULL, "must be found");
   }
 }
 
--- a/src/share/vm/opto/callnode.hpp	Mon Jun 15 16:47:24 2015 +0300
+++ b/src/share/vm/opto/callnode.hpp	Tue Jun 09 12:09:03 2015 +0200
@@ -628,7 +628,7 @@
   // Collect all the interesting edges from a call for use in
   // replacing the call by something else.  Used by macro expansion
   // and the late inlining support.
-  void extract_projections(CallProjections* projs, bool separate_io_proj);
+  void extract_projections(CallProjections* projs, bool separate_io_proj, bool do_asserts = true);
 
   virtual uint match_edge(uint idx) const;