Mercurial > hg > truffle
comparison graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CompareCanonicalizerTest.java @ 11959:23ccaa863eda
made CodeCacheProvider independent of MetaAccessProvider (GRAAL-511)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 10 Oct 2013 16:14:55 +0200 |
parents | ae27f6ac3374 |
children | 0fc653a9e019 |
comparison
equal
deleted
inserted
replaced
11958:a0f5be106e67 | 11959:23ccaa863eda |
---|---|
34 | 34 |
35 public class CompareCanonicalizerTest extends GraalCompilerTest { | 35 public class CompareCanonicalizerTest extends GraalCompilerTest { |
36 | 36 |
37 private StructuredGraph getCanonicalizedGraph(String name) { | 37 private StructuredGraph getCanonicalizedGraph(String name) { |
38 StructuredGraph graph = parse(name); | 38 StructuredGraph graph = parse(name); |
39 new CanonicalizerPhase(true).apply(graph, new PhaseContext(runtime(), null, replacements)); | 39 new CanonicalizerPhase(true).apply(graph, new PhaseContext(getMetaAccess(), getCodeCache(), null, replacements)); |
40 return graph; | 40 return graph; |
41 } | 41 } |
42 | 42 |
43 private static ValueNode getResult(StructuredGraph graph) { | 43 private static ValueNode getResult(StructuredGraph graph) { |
44 assertTrue(graph.start().next() instanceof ReturnNode); | 44 assertTrue(graph.start().next() instanceof ReturnNode); |
52 for (int i = 1; i < 4; i++) { | 52 for (int i = 1; i < 4; i++) { |
53 StructuredGraph graph = parse("canonicalCompare" + i); | 53 StructuredGraph graph = parse("canonicalCompare" + i); |
54 assertEquals(referenceGraph, graph); | 54 assertEquals(referenceGraph, graph); |
55 } | 55 } |
56 Assumptions assumptions = new Assumptions(false); | 56 Assumptions assumptions = new Assumptions(false); |
57 new CanonicalizerPhase(true).apply(referenceGraph, new PhaseContext(runtime(), assumptions, replacements)); | 57 new CanonicalizerPhase(true).apply(referenceGraph, new PhaseContext(getMetaAccess(), getCodeCache(), assumptions, replacements)); |
58 for (int i = 1; i < 4; i++) { | 58 for (int i = 1; i < 4; i++) { |
59 StructuredGraph graph = getCanonicalizedGraph("canonicalCompare" + i); | 59 StructuredGraph graph = getCanonicalizedGraph("canonicalCompare" + i); |
60 assertEquals(referenceGraph, graph); | 60 assertEquals(referenceGraph, graph); |
61 } | 61 } |
62 } | 62 } |