< prev index next >

src/share/vm/opto/ifnode.cpp

Print this page

        

@@ -804,11 +804,15 @@
       // Check that both traps are in the same activation of the method (instead
       // of two activations being inlined through different call sites) by verifying
       // that the call stacks are equal for both JVMStates.
       JVMState* dom_caller = dom_unc->jvms()->caller();
       JVMState* caller = unc->jvms()->caller();
-      if (!dom_caller->same_calls_as(caller)) {
+      if ((dom_caller == NULL) != (caller == NULL)) {
+        // The current method must either be inlined into both dom_caller
+        // and caller or must not be inlined at all. Bail out otherwise.
+        return false;
+      } else if (dom_caller != NULL && !dom_caller->same_calls_as(caller)) {
         return false;
       }
       // Check that the bci of the dominating uncommon trap dominates the bci
       // of the dominated uncommon trap. Otherwise we may not re-execute
       // the dominated check after deoptimization from the merged uncommon trap.
< prev index next >