OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/graph-replay.h" | 5 #include "src/compiler/graph-replay.h" |
6 | 6 |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
9 #include "src/compiler/graph-inl.h" | 9 #include "src/compiler/graph-inl.h" |
10 #include "src/compiler/node.h" | 10 #include "src/compiler/node.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 PrintF("); USE(n%d);\n", node->id()); | 33 PrintF("); USE(n%d);\n", node->id()); |
34 return GenericGraphVisit::CONTINUE; | 34 return GenericGraphVisit::CONTINUE; |
35 } | 35 } |
36 | 36 |
37 | 37 |
38 void GraphReplayPrinter::PostEdge(Node* from, int index, Node* to) { | 38 void GraphReplayPrinter::PostEdge(Node* from, int index, Node* to) { |
39 PrintF(" n%d->ReplaceInput(%d, n%d);\n", from->id(), index, to->id()); | 39 PrintF(" n%d->ReplaceInput(%d, n%d);\n", from->id(), index, to->id()); |
40 } | 40 } |
41 | 41 |
42 | 42 |
43 void GraphReplayPrinter::PrintReplayOpCreator(Operator* op) { | 43 void GraphReplayPrinter::PrintReplayOpCreator(const Operator* op) { |
44 IrOpcode::Value opcode = static_cast<IrOpcode::Value>(op->opcode()); | 44 IrOpcode::Value opcode = static_cast<IrOpcode::Value>(op->opcode()); |
45 const char* builder = | 45 const char* builder = |
46 IrOpcode::IsCommonOpcode(opcode) ? "common_builder" : "js_builder"; | 46 IrOpcode::IsCommonOpcode(opcode) ? "common_builder" : "js_builder"; |
47 const char* mnemonic = IrOpcode::IsCommonOpcode(opcode) | 47 const char* mnemonic = IrOpcode::IsCommonOpcode(opcode) |
48 ? IrOpcode::Mnemonic(opcode) | 48 ? IrOpcode::Mnemonic(opcode) |
49 : IrOpcode::Mnemonic(opcode) + 2; | 49 : IrOpcode::Mnemonic(opcode) + 2; |
50 PrintF(" op = %s.%s(", builder, mnemonic); | 50 PrintF(" op = %s.%s(", builder, mnemonic); |
51 switch (opcode) { | 51 switch (opcode) { |
52 case IrOpcode::kParameter: | 52 case IrOpcode::kParameter: |
53 case IrOpcode::kNumberConstant: | 53 case IrOpcode::kNumberConstant: |
(...skipping 18 matching lines...) Expand all Loading... |
72 default: | 72 default: |
73 break; | 73 break; |
74 } | 74 } |
75 PrintF(");\n"); | 75 PrintF(");\n"); |
76 } | 76 } |
77 | 77 |
78 #endif // DEBUG | 78 #endif // DEBUG |
79 } | 79 } |
80 } | 80 } |
81 } // namespace v8::internal::compiler | 81 } // namespace v8::internal::compiler |
OLD | NEW |