Chromium Code Reviews| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 | 67 |
| 68 explicit SourcePositionTable(Graph* graph); | 68 explicit SourcePositionTable(Graph* graph); |
| 69 ~SourcePositionTable() { | 69 ~SourcePositionTable() { |
| 70 if (decorator_) RemoveDecorator(); | 70 if (decorator_) RemoveDecorator(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void AddDecorator(); | 73 void AddDecorator(); |
| 74 void RemoveDecorator(); | 74 void RemoveDecorator(); |
| 75 | 75 |
| 76 SourcePosition GetSourcePosition(Node* node) const; | 76 SourcePosition GetSourcePosition(Node* node) const; |
| 77 | 77 |
|
Michael Starzinger
2016/04/22 11:30:21
nit: Drop empty newline between getter and setter
Clemens Hammacher
2016/04/22 13:46:40
It's already there (getter on line 76, setter on 7
| |
| 78 void SetSourcePosition(Node* node, SourcePosition position); | |
| 79 | |
| 80 Graph* GetGraph() const { return graph_; } | |
|
Michael Starzinger
2016/04/22 11:30:21
nit: s/GetGraph/graph/ for this simple accessor. A
Clemens Hammacher
2016/04/22 13:46:40
OK, dropped it.
| |
| 81 | |
| 78 void Print(std::ostream& os) const; | 82 void Print(std::ostream& os) const; |
| 79 | 83 |
| 80 private: | 84 private: |
| 81 class Decorator; | 85 class Decorator; |
| 82 | 86 |
| 83 Graph* const graph_; | 87 Graph* const graph_; |
| 84 Decorator* decorator_; | 88 Decorator* decorator_; |
| 85 SourcePosition current_position_; | 89 SourcePosition current_position_; |
| 86 NodeAuxData<SourcePosition> table_; | 90 NodeAuxData<SourcePosition> table_; |
| 87 | 91 |
| 88 DISALLOW_COPY_AND_ASSIGN(SourcePositionTable); | 92 DISALLOW_COPY_AND_ASSIGN(SourcePositionTable); |
| 89 }; | 93 }; |
| 90 | 94 |
| 91 } // namespace compiler | 95 } // namespace compiler |
| 92 } // namespace internal | 96 } // namespace internal |
| 93 } // namespace v8 | 97 } // namespace v8 |
| 94 | 98 |
| 95 #endif // V8_COMPILER_SOURCE_POSITION_H_ | 99 #endif // V8_COMPILER_SOURCE_POSITION_H_ |
| OLD | NEW |