changeset 15674:9e5730b9cbe5

[inlinin] assertion-aided code understanding at work
author Miguel Garcia <miguel.m.garcia@oracle.com>
date Thu, 15 May 2014 13:46:33 +0200
parents 9205a047fc86
children ac62e3a72e02
files graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningPhase.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningPhase.java	Thu May 15 12:18:01 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningPhase.java	Thu May 15 13:46:33 2014 +0200
@@ -261,6 +261,7 @@
         private int maxGraphs;
 
         public InliningData(StructuredGraph rootGraph, Assumptions rootAssumptions, int maxMethodPerInlining, CanonicalizerPhase canonicalizer) {
+            assert rootGraph != null;
             this.graphQueue = new ArrayDeque<>();
             this.invocationQueue = new ArrayDeque<>();
             this.maxMethodPerInlining = maxMethodPerInlining;
@@ -304,6 +305,7 @@
         }
 
         private void pushGraph(StructuredGraph graph, double probability, double relevance) {
+            assert graph != null;
             assert !contains(graph);
             graphQueue.push(new CallsiteHolder(graph, probability, relevance));
             assert graphQueue.size() <= maxGraphs;