src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.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/TypeSystemTest.java Fri Jul 7 09:29:40 2017
--- new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java Fri Jul 7 09:29:40 2017
*** 26,36 ****
--- 26,36 ----
import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
! import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.debug.TTY;
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.nodeinfo.Verbosity;
import org.graalvm.compiler.nodes.AbstractMergeNode;
import org.graalvm.compiler.nodes.PhiNode;
*** 177,187 ****
--- 177,188 ----
return x;
}
private void test(String snippet, String referenceSnippet) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
! Debug.dump(Debug.BASIC_LEVEL, graph, "Graph");
! DebugContext debug = graph.getDebug();
+ debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
/*
* When using FlowSensitiveReductionPhase instead of ConditionalEliminationPhase,
* tail-duplication gets activated thus resulting in a graph with more nodes than the
* reference graph.
*/
*** 196,208 ****
--- 197,210 ----
assertEquals(referenceGraph, graph);
}
@Override
protected void assertEquals(StructuredGraph expected, StructuredGraph graph) {
+ DebugContext debug = graph.getDebug();
if (getNodeCountExcludingUnusedConstants(expected) != getNodeCountExcludingUnusedConstants(graph)) {
! Debug.dump(Debug.BASIC_LEVEL, expected, "expected (node count)");
! Debug.dump(Debug.BASIC_LEVEL, graph, "graph (node count)");
! debug.dump(DebugContext.BASIC_LEVEL, expected, "expected (node count)");
! debug.dump(DebugContext.BASIC_LEVEL, graph, "graph (node count)");
Assert.fail("Graphs do not have the same number of nodes: " + expected.getNodeCount() + " vs. " + graph.getNodeCount());
}
}
public static void outputGraph(StructuredGraph graph, String message) {
*** 241,249 ****
--- 243,252 ----
private <T extends Node> void testHelper(String snippet, Class<T> clazz) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
new CanonicalizerPhase().apply(graph, new PhaseContext(getProviders()));
new CanonicalizerPhase().apply(graph, new PhaseContext(getProviders()));
! Debug.dump(Debug.BASIC_LEVEL, graph, "Graph " + snippet);
! DebugContext debug = graph.getDebug();
+ debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph " + snippet);
Assert.assertFalse("shouldn't have nodes of type " + clazz, graph.getNodes().filter(clazz).iterator().hasNext());
}
}
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File