Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/LoopUnswitchTest.java @ 13197:8569b9e047cd
change debug scopes implementation to prevent extra frames related to mechanism being added to call stack
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 30 Nov 2013 01:16:55 +0100 |
parents | bba234a1670e |
children | 1668de777c42 |
comparison
equal
deleted
inserted
replaced
13196:e343d4623e47 | 13197:8569b9e047cd |
---|---|
24 | 24 |
25 import org.junit.*; | 25 import org.junit.*; |
26 | 26 |
27 import com.oracle.graal.api.code.*; | 27 import com.oracle.graal.api.code.*; |
28 import com.oracle.graal.debug.*; | 28 import com.oracle.graal.debug.*; |
29 import com.oracle.graal.debug.Debug.Scope; | |
29 import com.oracle.graal.graph.*; | 30 import com.oracle.graal.graph.*; |
30 import com.oracle.graal.loop.phases.*; | 31 import com.oracle.graal.loop.phases.*; |
31 import com.oracle.graal.nodes.*; | 32 import com.oracle.graal.nodes.*; |
32 import com.oracle.graal.phases.common.*; | 33 import com.oracle.graal.phases.common.*; |
33 import com.oracle.graal.phases.tiers.*; | 34 import com.oracle.graal.phases.tiers.*; |
134 } | 135 } |
135 | 136 |
136 Assumptions assumptions = new Assumptions(false); | 137 Assumptions assumptions = new Assumptions(false); |
137 new CanonicalizerPhase(true).apply(graph, new PhaseContext(getProviders(), assumptions)); | 138 new CanonicalizerPhase(true).apply(graph, new PhaseContext(getProviders(), assumptions)); |
138 new CanonicalizerPhase(true).apply(referenceGraph, new PhaseContext(getProviders(), assumptions)); | 139 new CanonicalizerPhase(true).apply(referenceGraph, new PhaseContext(getProviders(), assumptions)); |
139 Debug.scope("Test", new DebugDumpScope("Test:" + snippet), new Runnable() { | 140 try (Scope s = Debug.scope("Test", new DebugDumpScope("Test:" + snippet))) { |
140 | 141 assertEquals(referenceGraph, graph); |
141 @Override | 142 } catch (Throwable e) { |
142 public void run() { | 143 throw Debug.handle(e); |
143 assertEquals(referenceGraph, graph); | 144 } |
144 } | |
145 }); | |
146 } | 145 } |
147 } | 146 } |