Mercurial > hg > truffle
comparison graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/LockEliminationTest.java @ 18120:86ec7f6f71b3
refactored GraalCompilerTest API to be in terms of ResolvedJavaMethod instead of Method
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 18 Oct 2014 00:08:19 +0200 |
parents | 1668de777c42 |
children | 8ab925a6f724 |
comparison
equal
deleted
inserted
replaced
18119:6997fce99fa3 | 18120:86ec7f6f71b3 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.graal.compiler.test; | 23 package com.oracle.graal.compiler.test; |
24 | 24 |
25 import java.lang.reflect.*; | |
26 | |
27 import org.junit.*; | 25 import org.junit.*; |
28 | 26 |
29 import com.oracle.graal.api.code.*; | 27 import com.oracle.graal.api.code.*; |
28 import com.oracle.graal.api.meta.*; | |
30 import com.oracle.graal.nodes.*; | 29 import com.oracle.graal.nodes.*; |
31 import com.oracle.graal.nodes.java.*; | 30 import com.oracle.graal.nodes.java.*; |
32 import com.oracle.graal.nodes.spi.*; | 31 import com.oracle.graal.nodes.spi.*; |
33 import com.oracle.graal.phases.*; | 32 import com.oracle.graal.phases.*; |
34 import com.oracle.graal.phases.common.*; | 33 import com.oracle.graal.phases.common.*; |
86 assertDeepEquals(1, graph.getNodes().filter(MonitorEnterNode.class).count()); | 85 assertDeepEquals(1, graph.getNodes().filter(MonitorEnterNode.class).count()); |
87 assertDeepEquals(1, graph.getNodes().filter(MonitorExitNode.class).count()); | 86 assertDeepEquals(1, graph.getNodes().filter(MonitorExitNode.class).count()); |
88 } | 87 } |
89 | 88 |
90 private StructuredGraph getGraph(String snippet) { | 89 private StructuredGraph getGraph(String snippet) { |
91 Method method = getMethod(snippet); | 90 ResolvedJavaMethod method = getResolvedJavaMethod(snippet); |
92 StructuredGraph graph = parseEager(method); | 91 StructuredGraph graph = parseEager(method); |
93 Assumptions assumptions = new Assumptions(true); | 92 Assumptions assumptions = new Assumptions(true); |
94 HighTierContext context = new HighTierContext(getProviders(), assumptions, null, getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL); | 93 HighTierContext context = new HighTierContext(getProviders(), assumptions, null, getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL); |
95 new CanonicalizerPhase(true).apply(graph, context); | 94 new CanonicalizerPhase(true).apply(graph, context); |
96 new InliningPhase(new CanonicalizerPhase(true)).apply(graph, context); | 95 new InliningPhase(new CanonicalizerPhase(true)).apply(graph, context); |