| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 inline bool operator==(const SourcePosition& lhs, const SourcePosition& rhs) { | 37 inline bool operator==(const SourcePosition& lhs, const SourcePosition& rhs) { |
| 38 return lhs.raw() == rhs.raw(); | 38 return lhs.raw() == rhs.raw(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 inline bool operator!=(const SourcePosition& lhs, const SourcePosition& rhs) { | 41 inline bool operator!=(const SourcePosition& lhs, const SourcePosition& rhs) { |
| 42 return !(lhs == rhs); | 42 return !(lhs == rhs); |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 class SourcePositionTable FINAL { | 46 class SourcePositionTable FINAL : public ZoneObject { |
| 47 public: | 47 public: |
| 48 class Scope { | 48 class Scope { |
| 49 public: | 49 public: |
| 50 Scope(SourcePositionTable* source_positions, SourcePosition position) | 50 Scope(SourcePositionTable* source_positions, SourcePosition position) |
| 51 : source_positions_(source_positions), | 51 : source_positions_(source_positions), |
| 52 prev_position_(source_positions->current_position_) { | 52 prev_position_(source_positions->current_position_) { |
| 53 Init(position); | 53 Init(position); |
| 54 } | 54 } |
| 55 Scope(SourcePositionTable* source_positions, Node* node) | 55 Scope(SourcePositionTable* source_positions, Node* node) |
| 56 : source_positions_(source_positions), | 56 : source_positions_(source_positions), |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 NodeAuxData<SourcePosition> table_; | 90 NodeAuxData<SourcePosition> table_; |
| 91 | 91 |
| 92 DISALLOW_COPY_AND_ASSIGN(SourcePositionTable); | 92 DISALLOW_COPY_AND_ASSIGN(SourcePositionTable); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace compiler | 95 } // namespace compiler |
| 96 } // namespace internal | 96 } // namespace internal |
| 97 } // namespace v8 | 97 } // namespace v8 |
| 98 | 98 |
| 99 #endif | 99 #endif |
| OLD | NEW |