| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include <vector> | |
| 6 | |
| 7 #include "src/v8.h" | |
| 8 | |
| 9 #include "graph-tester.h" | |
| 10 #include "src/compiler/common-operator.h" | |
| 11 #include "src/compiler/graph.h" | |
| 12 #include "src/compiler/graph-visualizer.h" | |
| 13 #include "src/compiler/node.h" | |
| 14 #include "src/compiler/operator.h" | |
| 15 | |
| 16 using namespace v8::internal; | |
| 17 using namespace v8::internal::compiler; | |
| 18 | |
| 19 static Operator dummy_operator(IrOpcode::kParameter, Operator::kNoWrite, | |
| 20 "dummy", 0, 0, 0, 1, 0, 0); | |
| 21 | |
| 22 TEST(TestPrintNodeGraphToNodeGraphviz) { | |
| 23 GraphWithStartNodeTester graph; | |
| 24 Node* n2 = graph.NewNode(&dummy_operator, graph.start()); | |
| 25 Node* n3 = graph.NewNode(&dummy_operator, graph.start()); | |
| 26 Node* n4 = graph.NewNode(&dummy_operator, n2); | |
| 27 Node* n5 = graph.NewNode(&dummy_operator, n2); | |
| 28 Node* n6 = graph.NewNode(&dummy_operator, n3); | |
| 29 Node* n7 = graph.NewNode(&dummy_operator, n3); | |
| 30 Node* n8 = graph.NewNode(&dummy_operator, n5); | |
| 31 Node* n9 = graph.NewNode(&dummy_operator, n5); | |
| 32 Node* n10 = graph.NewNode(&dummy_operator, n9); | |
| 33 Node* n11 = graph.NewNode(&dummy_operator, n9); | |
| 34 Node* end_dependencies[6] = {n4, n8, n10, n11, n6, n7}; | |
| 35 Node* n12 = graph.NewNode(&dummy_operator, 6, end_dependencies); | |
| 36 graph.SetEnd(n12); | |
| 37 | |
| 38 OFStream os(stdout); | |
| 39 os << AsDOT(graph); | |
| 40 } | |
| OLD | NEW |