changeset 4204:4df4499e0289

Fixed unit tests.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 03 Jan 2012 17:53:26 +0100
parents 847e9dcb4980
children 2af849af1723
files graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/BoxingEliminationTest.java graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/EscapeAnalysisTest.java graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/GraphTest.java graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/IfBoxingEliminationTest.java graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/InvokeTest.java graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/MonitorTest.java
diffstat 6 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/BoxingEliminationTest.java	Tue Jan 03 17:31:23 2012 +0100
+++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/BoxingEliminationTest.java	Tue Jan 03 17:53:26 2012 +0100
@@ -91,7 +91,7 @@
         StructuredGraph graph = parse(snippet);
         BoxingMethodPool pool = new BoxingMethodPool(runtime());
         IdentifyBoxingPhase identifyBoxingPhase = new IdentifyBoxingPhase(pool);
-        PhasePlan phasePlan = new PhasePlan();
+        PhasePlan phasePlan = getDefaultPhasePlan();
         phasePlan.addPhase(PhasePosition.AFTER_PARSING, identifyBoxingPhase);
         identifyBoxingPhase.apply(graph);
         LocalNode local = graph.getNodes(LocalNode.class).iterator().next();
--- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/EscapeAnalysisTest.java	Tue Jan 03 17:31:23 2012 +0100
+++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/EscapeAnalysisTest.java	Tue Jan 03 17:53:26 2012 +0100
@@ -121,10 +121,10 @@
             n.node().setProbability(100000);
         }
 
-        new InliningPhase(null, runtime(), null, null, PhasePlan.DEFAULT).apply(graph);
+        new InliningPhase(null, runtime(), null, null, getDefaultPhasePlan()).apply(graph);
         new DeadCodeEliminationPhase().apply(graph);
         print(graph);
-        new EscapeAnalysisPhase(null, runtime(), null, PhasePlan.DEFAULT).apply(graph);
+        new EscapeAnalysisPhase(null, runtime(), null, getDefaultPhasePlan()).apply(graph);
         print(graph);
         int retCount = 0;
         for (ReturnNode ret : graph.getNodes(ReturnNode.class)) {
--- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/GraphTest.java	Tue Jan 03 17:31:23 2012 +0100
+++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/GraphTest.java	Tue Jan 03 17:53:26 2012 +0100
@@ -31,6 +31,8 @@
 import com.oracle.max.cri.ri.*;
 import com.oracle.max.graal.compiler.*;
 import com.oracle.max.graal.compiler.graphbuilder.*;
+import com.oracle.max.graal.compiler.phases.*;
+import com.oracle.max.graal.compiler.phases.PhasePlan.*;
 import com.oracle.max.graal.cri.*;
 import com.oracle.max.graal.nodes.*;
 import com.oracle.max.graal.printer.*;
@@ -105,6 +107,12 @@
         return graph;
     }
 
+    protected PhasePlan getDefaultPhasePlan() {
+        PhasePlan plan = new PhasePlan();
+        plan.addPhase(PhasePosition.AFTER_PARSING, new GraphBuilderPhase(runtime, null, GraphBuilderConfiguration.getDeoptFreeDefault()));
+        return plan;
+    }
+
     protected void print(String title, StructuredGraph... graphs) {
         if (observer != null) {
             observer.printGraphs(getClass().getSimpleName() + ": " + title, graphs);
--- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/IfBoxingEliminationTest.java	Tue Jan 03 17:31:23 2012 +0100
+++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/IfBoxingEliminationTest.java	Tue Jan 03 17:53:26 2012 +0100
@@ -72,7 +72,7 @@
         StructuredGraph graph = parse(snippet);
         BoxingMethodPool pool = new BoxingMethodPool(runtime());
         IdentifyBoxingPhase identifyBoxingPhase = new IdentifyBoxingPhase(pool);
-        PhasePlan phasePlan = new PhasePlan();
+        PhasePlan phasePlan = getDefaultPhasePlan();
         phasePlan.addPhase(PhasePosition.AFTER_PARSING, identifyBoxingPhase);
         phasePlan.addPhase(PhasePosition.AFTER_PARSING, new PhiStampPhase());
         identifyBoxingPhase.apply(graph);
--- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/InvokeTest.java	Tue Jan 03 17:31:23 2012 +0100
+++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/InvokeTest.java	Tue Jan 03 17:53:26 2012 +0100
@@ -83,7 +83,7 @@
         for (Invoke invoke : graph.getInvokes()) {
             hints.add(invoke);
         }
-        new InliningPhase(null, runtime(), hints, null, PhasePlan.DEFAULT).apply(graph);
+        new InliningPhase(null, runtime(), hints, null, getDefaultPhasePlan()).apply(graph);
         new CanonicalizerPhase(null, runtime(), null).apply(graph);
         new DeadCodeEliminationPhase().apply(graph);
         StructuredGraph referenceGraph = parse(REFERENCE_SNIPPET);
--- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/MonitorTest.java	Tue Jan 03 17:31:23 2012 +0100
+++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/MonitorTest.java	Tue Jan 03 17:53:26 2012 +0100
@@ -94,7 +94,7 @@
         for (Invoke invoke : graph.getInvokes()) {
             hints.add(invoke);
         }
-        new InliningPhase(null, runtime(), hints, null, PhasePlan.DEFAULT).apply(graph);
+        new InliningPhase(null, runtime(), hints, null, getDefaultPhasePlan()).apply(graph);
         new CanonicalizerPhase(null, runtime(), null).apply(graph);
         new DeadCodeEliminationPhase().apply(graph);
         return graph;