src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java	Fri Jul  7 09:29:30 2017
--- new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java	Fri Jul  7 09:29:30 2017

*** 20,34 **** --- 20,30 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ package org.graalvm.compiler.core.test; ! import org.junit.Assert; import org.junit.Test; import org.graalvm.compiler.debug.Debug; import org.graalvm.compiler.debug.Debug.Scope; ! import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.debug.DebugDumpScope; import org.graalvm.compiler.graph.Node; import org.graalvm.compiler.nodes.ReturnNode; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
*** 37,46 **** --- 33,44 ---- import org.graalvm.compiler.nodes.spi.LoweringTool; import org.graalvm.compiler.phases.common.CanonicalizerPhase; import org.graalvm.compiler.phases.common.FloatingReadPhase; import org.graalvm.compiler.phases.common.LoweringPhase; import org.graalvm.compiler.phases.tiers.PhaseContext; + import org.junit.Assert; + import org.junit.Test; public class FloatingReadTest extends GraphScheduleTest { public static class Container {
*** 61,71 **** --- 59,70 ---- test("test1Snippet"); } @SuppressWarnings("try") private void test(final String snippet) { try (Scope s = Debug.scope("FloatingReadTest", new DebugDumpScope(snippet))) { + DebugContext debug = getDebugContext(); + try (DebugContext.Scope s = debug.scope("FloatingReadTest", new DebugDumpScope(snippet))) { StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES); PhaseContext context = new PhaseContext(getProviders()); new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context); new FloatingReadPhase().apply(graph);
*** 80,98 **** --- 79,97 ---- } else if (n instanceof MonitorExit) { monitorexit = (MonitorExit) n; } } ! Debug.dump(Debug.BASIC_LEVEL, graph, "After lowering"); ! debug.dump(DebugContext.BASIC_LEVEL, graph, "After lowering"); Assert.assertNotNull(returnNode); Assert.assertNotNull(monitorexit); Assert.assertTrue(returnNode.result() instanceof FloatingReadNode); FloatingReadNode read = (FloatingReadNode) returnNode.result(); assertOrderedAfterSchedule(graph, read, (Node) monitorexit); } catch (Throwable e) { ! throw Debug.handle(e); ! throw debug.handle(e); } } }

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File