# HG changeset patch # User Bernhard Urban # Date 1371024758 -7200 # Node ID e23b0486e75058336a784e67d845d0dc45d1fcef # Parent 3bc930dd931392a2c4d8bcb950008def4a51b95f unittest/aot: create suites on every compilation diff -r 3bc930dd9313 -r e23b0486e750 graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java --- 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);