| 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 #ifndef V8_COMPILER_SOURCE_POSITION_H_ | 5 #ifndef V8_COMPILER_SOURCE_POSITION_H_ |
| 6 #define V8_COMPILER_SOURCE_POSITION_H_ | 6 #define V8_COMPILER_SOURCE_POSITION_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/compiler/node-aux-data.h" | 9 #include "src/compiler/node-aux-data.h" |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 SourcePosition const prev_position_; | 64 SourcePosition const prev_position_; |
| 65 DISALLOW_COPY_AND_ASSIGN(Scope); | 65 DISALLOW_COPY_AND_ASSIGN(Scope); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 explicit SourcePositionTable(Graph* graph); | 68 explicit SourcePositionTable(Graph* graph); |
| 69 | 69 |
| 70 void AddDecorator(); | 70 void AddDecorator(); |
| 71 void RemoveDecorator(); | 71 void RemoveDecorator(); |
| 72 | 72 |
| 73 SourcePosition GetSourcePosition(Node* node) const; | 73 SourcePosition GetSourcePosition(Node* node) const; |
| 74 void SetSourcePosition(Node* node, SourcePosition position); |
| 74 | 75 |
| 75 void Print(std::ostream& os) const; | 76 void Print(std::ostream& os) const; |
| 76 | 77 |
| 77 private: | 78 private: |
| 78 class Decorator; | 79 class Decorator; |
| 79 | 80 |
| 80 Graph* const graph_; | 81 Graph* const graph_; |
| 81 Decorator* decorator_; | 82 Decorator* decorator_; |
| 82 SourcePosition current_position_; | 83 SourcePosition current_position_; |
| 83 NodeAuxData<SourcePosition> table_; | 84 NodeAuxData<SourcePosition> table_; |
| 84 | 85 |
| 85 DISALLOW_COPY_AND_ASSIGN(SourcePositionTable); | 86 DISALLOW_COPY_AND_ASSIGN(SourcePositionTable); |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 } // namespace compiler | 89 } // namespace compiler |
| 89 } // namespace internal | 90 } // namespace internal |
| 90 } // namespace v8 | 91 } // namespace v8 |
| 91 | 92 |
| 92 #endif // V8_COMPILER_SOURCE_POSITION_H_ | 93 #endif // V8_COMPILER_SOURCE_POSITION_H_ |
| OLD | NEW |