Mercurial > hg > truffle
comparison graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/EdgesTest.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 | 45b45f902bed |
children | c88ab4f1f04a |
comparison
equal
deleted
inserted
replaced
18119:6997fce99fa3 | 18120:86ec7f6f71b3 |
---|---|
25 import java.lang.reflect.*; | 25 import java.lang.reflect.*; |
26 | 26 |
27 import org.junit.*; | 27 import org.junit.*; |
28 | 28 |
29 import com.oracle.graal.api.code.*; | 29 import com.oracle.graal.api.code.*; |
30 import com.oracle.graal.api.meta.*; | |
30 import com.oracle.graal.compiler.test.*; | 31 import com.oracle.graal.compiler.test.*; |
31 import com.oracle.graal.graph.*; | 32 import com.oracle.graal.graph.*; |
32 import com.oracle.graal.graph.Edges.Type; | 33 import com.oracle.graal.graph.Edges.Type; |
33 import com.oracle.graal.nodeinfo.*; | 34 import com.oracle.graal.nodeinfo.*; |
34 import com.oracle.graal.nodes.*; | 35 import com.oracle.graal.nodes.*; |
112 } | 113 } |
113 } catch (Exception e) { | 114 } catch (Exception e) { |
114 throw new RuntimeException(e); | 115 throw new RuntimeException(e); |
115 } | 116 } |
116 | 117 |
117 StructuredGraph g = parseProfiled(method); | 118 ResolvedJavaMethod javaMethod = getMetaAccess().lookupJavaMethod(method); |
119 StructuredGraph g = parseProfiled(javaMethod); | |
118 Assumptions assumptions = new Assumptions(false); | 120 Assumptions assumptions = new Assumptions(false); |
119 HighTierContext context = new HighTierContext(getProviders(), assumptions, null, getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL); | 121 HighTierContext context = new HighTierContext(getProviders(), assumptions, null, getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL); |
120 new InliningPhase(new CanonicalizerPhase(true)).apply(g, context); | 122 new InliningPhase(new CanonicalizerPhase(true)).apply(g, context); |
121 new CanonicalizerPhase(false).apply(g, context); | 123 new CanonicalizerPhase(false).apply(g, context); |
122 Assert.assertTrue(g.getNodes().filter(CheckCastNode.class).isEmpty()); | 124 Assert.assertTrue(g.getNodes().filter(CheckCastNode.class).isEmpty()); |