| 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/source-position.h" | 5 #include "src/compiler/source-position.h" |
| 6 #include "src/compiler/graph.h" | 6 #include "src/compiler/graph.h" |
| 7 #include "src/compiler/node-aux-data.h" | 7 #include "src/compiler/node-aux-data.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| 11 namespace compiler { | 11 namespace compiler { |
| 12 | 12 |
| 13 class SourcePositionTable::Decorator final : public GraphDecorator { | 13 class SourcePositionTable::Decorator final : public GraphDecorator { |
| 14 public: | 14 public: |
| 15 explicit Decorator(SourcePositionTable* source_positions) | 15 explicit Decorator(SourcePositionTable* source_positions) |
| 16 : source_positions_(source_positions) {} | 16 : source_positions_(source_positions) {} |
| 17 | 17 |
| 18 void Decorate(Node* node, bool incomplete) final { | 18 void Decorate(Node* node) final { |
| 19 source_positions_->table_.Set(node, source_positions_->current_position_); | 19 source_positions_->table_.Set(node, source_positions_->current_position_); |
| 20 } | 20 } |
| 21 | 21 |
| 22 private: | 22 private: |
| 23 SourcePositionTable* source_positions_; | 23 SourcePositionTable* source_positions_; |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 | 26 |
| 27 SourcePositionTable::SourcePositionTable(Graph* graph) | 27 SourcePositionTable::SourcePositionTable(Graph* graph) |
| 28 : graph_(graph), | 28 : graph_(graph), |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 << ":" << pos.raw(); | 63 << ":" << pos.raw(); |
| 64 needs_comma = true; | 64 needs_comma = true; |
| 65 } | 65 } |
| 66 } | 66 } |
| 67 os << "}"; | 67 os << "}"; |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace compiler | 70 } // namespace compiler |
| 71 } // namespace internal | 71 } // namespace internal |
| 72 } // namespace v8 | 72 } // namespace v8 |
| OLD | NEW |