changeset 10003:e23b0486e750

unittest/aot: create suites on every compilation
author Bernhard Urban <bernhard.urban@jku.at>
date Wed, 12 Jun 2013 10:12:38 +0200
parents 3bc930dd9313
children c4a0e878868f
files graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java	Tue Jun 11 22:02:49 2013 +0200
+++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java	Wed Jun 12 10:12:38 2013 +0200
@@ -30,6 +30,7 @@
 import com.oracle.graal.api.code.*;
 import com.oracle.graal.api.code.CallingConvention.Type;
 import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.runtime.*;
 import com.oracle.graal.compiler.*;
 import com.oracle.graal.compiler.test.*;
 import com.oracle.graal.java.*;
@@ -37,6 +38,7 @@
 import com.oracle.graal.nodes.extended.*;
 import com.oracle.graal.phases.*;
 import com.oracle.graal.phases.PhasePlan.PhasePosition;
+import com.oracle.graal.phases.tiers.*;
 
 /**
  * use
@@ -56,7 +58,6 @@
     }
 
     @Test
-    @Ignore
     public void testStaticFinalObject1() {
         StructuredGraph result2 = compile("getStaticFinalObject", true);
         assert result2.getNodes().filter(ConstantNode.class).count() == 1;
@@ -82,8 +83,10 @@
         phasePlan.addPhase(PhasePosition.AFTER_PARSING, graphBuilderPhase);
         editPhasePlan(method, graph, phasePlan);
         CallingConvention cc = getCallingConvention(runtime, Type.JavaCallee, graph.method(), false);
+        // create suites everytime, as we modify options for the compiler
+        final Suites suitesLocal = Graal.getRequiredCapability(SuitesProvider.class).createSuites();
         final CompilationResult compResult = GraalCompiler.compileGraph(graph, cc, method, runtime, replacements, backend, runtime().getTarget(), null, phasePlan, OptimisticOptimizations.ALL,
-                        new SpeculationLog(), suites);
+                        new SpeculationLog(), suitesLocal);
         addMethod(method, compResult, graphCopy);
 
         OptCanonicalizeReads.setValue(originalSetting);