| 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/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
| 6 | 6 |
| 7 #include "src/base/platform/elapsed-timer.h" | 7 #include "src/base/platform/elapsed-timer.h" |
| 8 #include "src/compiler/ast-graph-builder.h" | 8 #include "src/compiler/ast-graph-builder.h" |
| 9 #include "src/compiler/code-generator.h" | 9 #include "src/compiler/code-generator.h" |
| 10 #include "src/compiler/graph-replay.h" | 10 #include "src/compiler/graph-replay.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 << AsDOT(*graph); | 78 << AsDOT(*graph); |
| 79 } | 79 } |
| 80 if (VerifyGraphs()) Verifier::Run(graph); | 80 if (VerifyGraphs()) Verifier::Run(graph); |
| 81 } | 81 } |
| 82 | 82 |
| 83 | 83 |
| 84 class AstGraphBuilderWithPositions : public AstGraphBuilder { | 84 class AstGraphBuilderWithPositions : public AstGraphBuilder { |
| 85 public: | 85 public: |
| 86 explicit AstGraphBuilderWithPositions(CompilationInfo* info, JSGraph* jsgraph, | 86 explicit AstGraphBuilderWithPositions(CompilationInfo* info, JSGraph* jsgraph, |
| 87 SourcePositionTable* source_positions) | 87 SourcePositionTable* source_positions) |
| 88 : AstGraphBuilder(info, jsgraph, source_positions) {} | 88 : AstGraphBuilder(info, jsgraph), source_positions_(source_positions) {} |
| 89 |
| 90 bool CreateGraph() V8_OVERRIDE { |
| 91 SourcePositionTable::Scope pos(source_positions_, |
| 92 SourcePosition::Unknown()); |
| 93 return AstGraphBuilder::CreateGraph(); |
| 94 } |
| 89 | 95 |
| 90 #define DEF_VISIT(type) \ | 96 #define DEF_VISIT(type) \ |
| 91 virtual void Visit##type(type* node) V8_OVERRIDE { \ | 97 virtual void Visit##type(type* node) V8_OVERRIDE { \ |
| 92 SourcePositionTable::Scope pos(source_positions(), \ | 98 SourcePositionTable::Scope pos(source_positions_, \ |
| 93 SourcePosition(node->position())); \ | 99 SourcePosition(node->position())); \ |
| 94 AstGraphBuilder::Visit##type(node); \ | 100 AstGraphBuilder::Visit##type(node); \ |
| 95 } | 101 } |
| 96 AST_NODE_LIST(DEF_VISIT) | 102 AST_NODE_LIST(DEF_VISIT) |
| 97 #undef DEF_VISIT | 103 #undef DEF_VISIT |
| 104 |
| 105 private: |
| 106 SourcePositionTable* source_positions_; |
| 98 }; | 107 }; |
| 99 | 108 |
| 100 | 109 |
| 101 static void TraceSchedule(Schedule* schedule) { | 110 static void TraceSchedule(Schedule* schedule) { |
| 102 if (!FLAG_trace_turbo) return; | 111 if (!FLAG_trace_turbo) return; |
| 103 OFStream os(stdout); | 112 OFStream os(stdout); |
| 104 os << "-- Schedule --------------------------------------\n" << *schedule; | 113 os << "-- Schedule --------------------------------------\n" << *schedule; |
| 105 } | 114 } |
| 106 | 115 |
| 107 | 116 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 } | 304 } |
| 296 | 305 |
| 297 | 306 |
| 298 void Pipeline::TearDown() { | 307 void Pipeline::TearDown() { |
| 299 InstructionOperand::TearDownCaches(); | 308 InstructionOperand::TearDownCaches(); |
| 300 } | 309 } |
| 301 | 310 |
| 302 } // namespace compiler | 311 } // namespace compiler |
| 303 } // namespace internal | 312 } // namespace internal |
| 304 } // namespace v8 | 313 } // namespace v8 |
| OLD | NEW |