# HG changeset patch # User Thomas Wuerthinger # Date 1339413793 -7200 # Node ID 0083a59ced84dac73e4f6124026b5822da28d368 # Parent deec44b74cfb89d3ae6e0a47caaf8121ca6afa86 Renaming GraphTest => GraalCompilerTest. diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/BoxingEliminationTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/BoxingEliminationTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/BoxingEliminationTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -38,7 +38,7 @@ * elimination is applied and it is verified that the resulting graph is equal to the graph of the method that just has * a "return 1" statement in it. */ -public class BoxingEliminationTest extends GraphTest { +public class BoxingEliminationTest extends GraalCompilerTest { private static final Short s = 2; diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompareCanonicalizerTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompareCanonicalizerTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompareCanonicalizerTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -27,7 +27,7 @@ import com.oracle.graal.compiler.phases.*; import com.oracle.graal.nodes.*; -public class CompareCanonicalizerTest extends GraphTest { +public class CompareCanonicalizerTest extends GraalCompilerTest { @Test public void testCanonicalComparison() { diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -39,7 +39,7 @@ * canonicalization is applied and it is verified that the resulting graph is equal to the graph of the method that just * has a "return 1" statement in it. */ -public class CompiledMethodTest extends GraphTest { +public class CompiledMethodTest extends GraalCompilerTest { public static Object testMethod(Object arg1, Object arg2, Object arg3) { return arg1 + " " + arg2 + " " + arg3; diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/DegeneratedLoopsTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/DegeneratedLoopsTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/DegeneratedLoopsTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -33,7 +33,7 @@ * Then canonicalization is applied and it is verified that the resulting graph is equal to the * graph of the method that just has a "return 1" statement in it. */ -public class DegeneratedLoopsTest extends GraphTest { +public class DegeneratedLoopsTest extends GraalCompilerTest { private static final String REFERENCE_SNIPPET = "referenceSnippet"; diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/EscapeAnalysisTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/EscapeAnalysisTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/EscapeAnalysisTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -37,7 +37,7 @@ * In these test cases the probability of all invokes is set to a high value, such that an InliningPhase should inline them all. * After that, the EscapeAnalysisPhase is expected to remove all allocations and return the correct values. */ -public class EscapeAnalysisTest extends GraphTest { +public class EscapeAnalysisTest extends GraalCompilerTest { @Test public void test1() { diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/GraalCompilerTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/GraalCompilerTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -0,0 +1,207 @@ +/* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.graal.compiler.tests; + +import java.lang.reflect.*; +import java.util.concurrent.*; + +import junit.framework.*; + +import com.oracle.graal.api.*; +import com.oracle.graal.api.code.*; +import com.oracle.graal.api.meta.*; +import com.oracle.graal.compiler.*; +import com.oracle.graal.compiler.phases.*; +import com.oracle.graal.compiler.phases.PhasePlan.PhasePosition; +import com.oracle.graal.compiler.schedule.*; +import com.oracle.graal.cri.*; +import com.oracle.graal.debug.*; +import com.oracle.graal.graph.*; +import com.oracle.graal.graph.Node.Verbosity; +import com.oracle.graal.java.*; +import com.oracle.graal.lir.cfg.*; +import com.oracle.graal.nodes.*; + +/** + * Base class for Graal compiler unit tests. These are white box tests + * for Graal compiler transformations. The general pattern for a test is: + *
    + *
  1. Create a graph by {@linkplain #parse(String) parsing} a method.
  2. + *
  3. Manually modify the graph (e.g. replace a parameter node with a constant).
  4. + *
  5. Apply a transformation to the graph.
  6. + *
  7. Assert that the transformed graph is equal to an expected graph.
  8. + *
+ *

+ * See {@link InvokeTest} as an example. + *

+ * The tests can be run in Eclipse with the "Compiler Unit Test" Eclipse + * launch configuration found in the top level of this project or by + * running {@code mx unittest} on the command line. + */ +public abstract class GraalCompilerTest { + + protected final ExtendedRiRuntime runtime; + + public GraalCompilerTest() { + Debug.enable(); + this.runtime = Graal.getRuntime().getCapability(ExtendedRiRuntime.class); + } + + protected void assertEquals(StructuredGraph expected, StructuredGraph graph) { + String expectedString = getCanonicalGraphString(expected); + String actualString = getCanonicalGraphString(graph); + String mismatchString = "mismatch in graphs:\n========= expected =========\n" + expectedString + "\n\n========= actual =========\n" + actualString; + + if (expected.getNodeCount() != graph.getNodeCount()) { + Debug.dump(expected, "Node count not matching - expected"); + Debug.dump(graph, "Node count not matching - actual"); + Assert.fail("Graphs do not have the same number of nodes: " + expected.getNodeCount() + " vs. " + graph.getNodeCount() + "\n" + mismatchString); + } + if (!expectedString.equals(actualString)) { + Debug.dump(expected, "mismatching graphs - expected"); + Debug.dump(graph, "mismatching graphs - actual"); + Assert.fail(mismatchString); + } + } + + private static String getCanonicalGraphString(StructuredGraph graph) { + SchedulePhase schedule = new SchedulePhase(); + schedule.apply(graph); + + NodeMap canonicalId = graph.createNodeMap(); + int nextId = 0; + + StringBuilder result = new StringBuilder(); + for (Block block : schedule.getCFG().getBlocks()) { + result.append("Block " + block + " "); + if (block == schedule.getCFG().getStartBlock()) { + result.append("* "); + } + result.append("-> "); + for (Block succ : block.getSuccessors()) { + result.append(succ + " "); + } + result.append("\n"); + for (Node node : schedule.getBlockToNodesMap().get(block)) { + int id; + if (canonicalId.get(node) != null) { + id = canonicalId.get(node); + } else { + id = nextId++; + canonicalId.set(node, id); + } + String name = node instanceof ConstantNode ? node.toString(Verbosity.Name) : node.getClass().getSimpleName(); + result.append(" " + id + "|" + name + " (" + node.usages().size() + ")\n"); + } + } + return result.toString(); + } + + protected ExtendedRiRuntime runtime() { + return runtime; + } + + /** + * Parses a Java method to produce a graph. + * + * @param methodName the name of the method in {@code this.getClass()} to be parsed + */ + protected StructuredGraph parse(String methodName) { + return parse(getMethod(methodName)); + } + + protected Method getMethod(String methodName) { + Method found = null; + for (Method m : this.getClass().getMethods()) { + if (m.getName().equals(methodName)) { + Assert.assertNull(found); + found = m; + } + } + if (found != null) { + return found; + } else { + throw new RuntimeException("method not found: " + methodName); + } + } + + private static int compilationId = 0; + + protected InstalledCode compile(final ResolvedJavaMethod method, final StructuredGraph graph) { + return Debug.scope("Compiling", new DebugDumpScope(String.valueOf(compilationId++), true), new Callable() { + public InstalledCode call() throws Exception { + CompilationResult targetMethod = runtime.compile(method, graph); + return addMethod(method, targetMethod); + } + }); + } + + protected InstalledCode addMethod(final ResolvedJavaMethod method, final CompilationResult tm) { + return Debug.scope("CodeInstall", new Object[] {method}, new Callable() { + @Override + public InstalledCode call() throws Exception { + final CodeInfo[] info = Debug.isDumpEnabled() ? new CodeInfo[1] : null; + InstalledCode installedMethod = runtime.addMethod(method, tm, info); + if (info != null) { + Debug.dump(info[0], "After code installation"); + } + return installedMethod; + } + }); + } + + /** + * Parses a Java method to produce a graph. + * + * @param methodName the name of the method in {@code this.getClass()} to be parsed + */ + protected StructuredGraph parseProfiled(String methodName) { + return parseProfiled(getMethod(methodName)); + } + + /** + * Parses a Java method to produce a graph. + */ + protected StructuredGraph parse(Method m) { + ResolvedJavaMethod riMethod = runtime.getResolvedJavaMethod(m); + StructuredGraph graph = new StructuredGraph(riMethod); + new GraphBuilderPhase(runtime, GraphBuilderConfiguration.getSnippetDefault(), OptimisticOptimizations.ALL).apply(graph); + return graph; + } + + /** + * Parses a Java method to produce a graph. + */ + protected StructuredGraph parseProfiled(Method m) { + ResolvedJavaMethod riMethod = runtime.getResolvedJavaMethod(m); + StructuredGraph graph = new StructuredGraph(riMethod); + new GraphBuilderPhase(runtime, GraphBuilderConfiguration.getDefault(), OptimisticOptimizations.ALL).apply(graph); + return graph; + } + + protected PhasePlan getDefaultPhasePlan() { + PhasePlan plan = new PhasePlan(); + plan.addPhase(PhasePosition.AFTER_PARSING, new GraphBuilderPhase(runtime, GraphBuilderConfiguration.getSnippetDefault(), OptimisticOptimizations.ALL)); + return plan; + } +} diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/GraphScheduleTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/GraphScheduleTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/GraphScheduleTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -31,7 +31,7 @@ import com.oracle.graal.lir.cfg.*; import com.oracle.graal.nodes.*; -public class GraphScheduleTest extends GraphTest { +public class GraphScheduleTest extends GraalCompilerTest { protected void assertOrderedAfterSchedule(StructuredGraph graph, Node a, Node b) { SchedulePhase ibp = new SchedulePhase(); ibp.apply(graph); diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/GraphTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/GraphTest.java Mon Jun 11 13:21:15 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,207 +0,0 @@ -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.compiler.tests; - -import java.lang.reflect.*; -import java.util.concurrent.*; - -import junit.framework.*; - -import com.oracle.graal.api.*; -import com.oracle.graal.api.code.*; -import com.oracle.graal.api.meta.*; -import com.oracle.graal.compiler.*; -import com.oracle.graal.compiler.phases.*; -import com.oracle.graal.compiler.phases.PhasePlan.PhasePosition; -import com.oracle.graal.compiler.schedule.*; -import com.oracle.graal.cri.*; -import com.oracle.graal.debug.*; -import com.oracle.graal.graph.*; -import com.oracle.graal.graph.Node.Verbosity; -import com.oracle.graal.java.*; -import com.oracle.graal.lir.cfg.*; -import com.oracle.graal.nodes.*; - -/** - * Base class for Graal compiler unit tests. These are white box tests - * for Graal compiler transformations. The general pattern for a test is: - *

    - *
  1. Create a graph by {@linkplain #parse(String) parsing} a method.
  2. - *
  3. Manually modify the graph (e.g. replace a parameter node with a constant).
  4. - *
  5. Apply a transformation to the graph.
  6. - *
  7. Assert that the transformed graph is equal to an expected graph.
  8. - *
- *

- * See {@link InvokeTest} as an example. - *

- * The tests can be run in Eclipse with the "Compiler Unit Test" Eclipse - * launch configuration found in the top level of this project or by - * running {@code mx unittest} on the command line. - */ -public abstract class GraphTest { - - protected final ExtendedRiRuntime runtime; - - public GraphTest() { - Debug.enable(); - this.runtime = Graal.getRuntime().getCapability(ExtendedRiRuntime.class); - } - - protected void assertEquals(StructuredGraph expected, StructuredGraph graph) { - String expectedString = getCanonicalGraphString(expected); - String actualString = getCanonicalGraphString(graph); - String mismatchString = "mismatch in graphs:\n========= expected =========\n" + expectedString + "\n\n========= actual =========\n" + actualString; - - if (expected.getNodeCount() != graph.getNodeCount()) { - Debug.dump(expected, "Node count not matching - expected"); - Debug.dump(graph, "Node count not matching - actual"); - Assert.fail("Graphs do not have the same number of nodes: " + expected.getNodeCount() + " vs. " + graph.getNodeCount() + "\n" + mismatchString); - } - if (!expectedString.equals(actualString)) { - Debug.dump(expected, "mismatching graphs - expected"); - Debug.dump(graph, "mismatching graphs - actual"); - Assert.fail(mismatchString); - } - } - - private static String getCanonicalGraphString(StructuredGraph graph) { - SchedulePhase schedule = new SchedulePhase(); - schedule.apply(graph); - - NodeMap canonicalId = graph.createNodeMap(); - int nextId = 0; - - StringBuilder result = new StringBuilder(); - for (Block block : schedule.getCFG().getBlocks()) { - result.append("Block " + block + " "); - if (block == schedule.getCFG().getStartBlock()) { - result.append("* "); - } - result.append("-> "); - for (Block succ : block.getSuccessors()) { - result.append(succ + " "); - } - result.append("\n"); - for (Node node : schedule.getBlockToNodesMap().get(block)) { - int id; - if (canonicalId.get(node) != null) { - id = canonicalId.get(node); - } else { - id = nextId++; - canonicalId.set(node, id); - } - String name = node instanceof ConstantNode ? node.toString(Verbosity.Name) : node.getClass().getSimpleName(); - result.append(" " + id + "|" + name + " (" + node.usages().size() + ")\n"); - } - } - return result.toString(); - } - - protected ExtendedRiRuntime runtime() { - return runtime; - } - - /** - * Parses a Java method to produce a graph. - * - * @param methodName the name of the method in {@code this.getClass()} to be parsed - */ - protected StructuredGraph parse(String methodName) { - return parse(getMethod(methodName)); - } - - protected Method getMethod(String methodName) { - Method found = null; - for (Method m : this.getClass().getMethods()) { - if (m.getName().equals(methodName)) { - Assert.assertNull(found); - found = m; - } - } - if (found != null) { - return found; - } else { - throw new RuntimeException("method not found: " + methodName); - } - } - - private static int compilationId = 0; - - protected InstalledCode compile(final ResolvedJavaMethod method, final StructuredGraph graph) { - return Debug.scope("Compiling", new DebugDumpScope(String.valueOf(compilationId++), true), new Callable() { - public InstalledCode call() throws Exception { - CompilationResult targetMethod = runtime.compile(method, graph); - return addMethod(method, targetMethod); - } - }); - } - - protected InstalledCode addMethod(final ResolvedJavaMethod method, final CompilationResult tm) { - return Debug.scope("CodeInstall", new Object[] {method}, new Callable() { - @Override - public InstalledCode call() throws Exception { - final CodeInfo[] info = Debug.isDumpEnabled() ? new CodeInfo[1] : null; - InstalledCode installedMethod = runtime.addMethod(method, tm, info); - if (info != null) { - Debug.dump(info[0], "After code installation"); - } - return installedMethod; - } - }); - } - - /** - * Parses a Java method to produce a graph. - * - * @param methodName the name of the method in {@code this.getClass()} to be parsed - */ - protected StructuredGraph parseProfiled(String methodName) { - return parseProfiled(getMethod(methodName)); - } - - /** - * Parses a Java method to produce a graph. - */ - protected StructuredGraph parse(Method m) { - ResolvedJavaMethod riMethod = runtime.getResolvedJavaMethod(m); - StructuredGraph graph = new StructuredGraph(riMethod); - new GraphBuilderPhase(runtime, GraphBuilderConfiguration.getSnippetDefault(), OptimisticOptimizations.ALL).apply(graph); - return graph; - } - - /** - * Parses a Java method to produce a graph. - */ - protected StructuredGraph parseProfiled(Method m) { - ResolvedJavaMethod riMethod = runtime.getResolvedJavaMethod(m); - StructuredGraph graph = new StructuredGraph(riMethod); - new GraphBuilderPhase(runtime, GraphBuilderConfiguration.getDefault(), OptimisticOptimizations.ALL).apply(graph); - return graph; - } - - protected PhasePlan getDefaultPhasePlan() { - PhasePlan plan = new PhasePlan(); - plan.addPhase(PhasePosition.AFTER_PARSING, new GraphBuilderPhase(runtime, GraphBuilderConfiguration.getSnippetDefault(), OptimisticOptimizations.ALL)); - return plan; - } -} diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/IfBoxingEliminationTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/IfBoxingEliminationTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/IfBoxingEliminationTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -33,7 +33,7 @@ import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.extended.*; -public class IfBoxingEliminationTest extends GraphTest { +public class IfBoxingEliminationTest extends GraalCompilerTest { private static final String REFERENCE_SNIPPET = "referenceSnippet"; diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/IfCanonicalizerTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/IfCanonicalizerTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/IfCanonicalizerTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -36,7 +36,7 @@ * Then canonicalization is applied and it is verified that the resulting graph is equal to the * graph of the method that just has a "return 1" statement in it. */ -public class IfCanonicalizerTest extends GraphTest { +public class IfCanonicalizerTest extends GraalCompilerTest { private static final String REFERENCE_SNIPPET = "referenceSnippet"; diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InvokeExceptionTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InvokeExceptionTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InvokeExceptionTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -30,7 +30,7 @@ import com.oracle.graal.compiler.phases.*; import com.oracle.graal.nodes.*; -public class InvokeExceptionTest extends GraphTest { +public class InvokeExceptionTest extends GraalCompilerTest { public static synchronized void throwException(int i) { if (i == 1) { diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InvokeTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InvokeTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/InvokeTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -35,7 +35,7 @@ * Then canonicalization is applied and it is verified that the resulting graph is equal to the * graph of the method that just has a "return 1" statement in it. */ -public class InvokeTest extends GraphTest { +public class InvokeTest extends GraalCompilerTest { private static final String REFERENCE_SNIPPET = "referenceSnippet"; diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/MonitorTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/MonitorTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/MonitorTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -43,7 +43,7 @@ * Then canonicalization is applied and it is verified that the resulting graph is equal to the * graph of the method that just has a "return 1" statement in it. */ -public class MonitorTest extends GraphTest { +public class MonitorTest extends GraalCompilerTest { private static final String REFERENCE_SNIPPET = "referenceSnippet"; diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/NestedLoopTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/NestedLoopTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/NestedLoopTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -29,7 +29,7 @@ import com.oracle.graal.lir.cfg.*; import com.oracle.graal.nodes.*; -public class NestedLoopTest extends GraphTest { +public class NestedLoopTest extends GraalCompilerTest { @Test public void test1() { diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/PhiCreationTests.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/PhiCreationTests.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/PhiCreationTests.java Mon Jun 11 13:23:13 2012 +0200 @@ -30,7 +30,7 @@ /** * In the following tests, the correct removal of redundant phis during graph building is tested. */ -public class PhiCreationTests extends GraphTest { +public class PhiCreationTests extends GraalCompilerTest { /** * Dummy method to avoid javac dead code elimination. diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/ScalarTypeSystemTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/ScalarTypeSystemTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/ScalarTypeSystemTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -33,7 +33,7 @@ /** * In the following tests, the scalar type system of the compiler should be complete enough to see the relation between the different conditions. */ -public class ScalarTypeSystemTest extends GraphTest { +public class ScalarTypeSystemTest extends GraalCompilerTest { public static int referenceSnippet1(int a) { if (a > 0) { diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/StraighteningTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/StraighteningTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/StraighteningTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -30,7 +30,7 @@ import com.oracle.graal.debug.*; import com.oracle.graal.nodes.*; -public class StraighteningTest extends GraphTest { +public class StraighteningTest extends GraalCompilerTest { private static final String REFERENCE_SNIPPET = "ref"; diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/TypeCheckTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/TypeCheckTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/TypeCheckTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -33,7 +33,7 @@ /** * Base class for checkcast and instanceof test classes. */ -public abstract class TypeCheckTest extends GraphTest { +public abstract class TypeCheckTest extends GraalCompilerTest { protected abstract void replaceProfile(StructuredGraph graph, JavaTypeProfile profile); diff -r deec44b74cfb -r 0083a59ced84 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/TypeSystemTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/TypeSystemTest.java Mon Jun 11 13:21:15 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/TypeSystemTest.java Mon Jun 11 13:23:13 2012 +0200 @@ -40,7 +40,7 @@ /** * In the following tests, the scalar type system of the compiler should be complete enough to see the relation between the different conditions. */ -public class TypeSystemTest extends GraphTest { +public class TypeSystemTest extends GraalCompilerTest { @Test public void test1() {