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_REGISTER_ALLOCATOR_VERIFIER_H_ | 5 #ifndef V8_REGISTER_ALLOCATOR_VERIFIER_H_ |
6 #define V8_REGISTER_ALLOCATOR_VERIFIER_H_ | 6 #define V8_REGISTER_ALLOCATOR_VERIFIER_H_ |
7 | 7 |
8 #include "src/zone-containers.h" | 8 #include "src/zone-containers.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // will determine if the way the operand is defined (from the predecessors) | 67 // will determine if the way the operand is defined (from the predecessors) |
68 // matches a particular use. This handles scenarios where multiple phis are | 68 // matches a particular use. This handles scenarios where multiple phis are |
69 // defined with identical operands, and the move optimizer moved down the moves | 69 // defined with identical operands, and the move optimizer moved down the moves |
70 // separating the 2 phis in the block defining them. | 70 // separating the 2 phis in the block defining them. |
71 class PendingAssessment final : public Assessment { | 71 class PendingAssessment final : public Assessment { |
72 public: | 72 public: |
73 explicit PendingAssessment(const InstructionBlock* origin, | 73 explicit PendingAssessment(const InstructionBlock* origin, |
74 InstructionOperand operand) | 74 InstructionOperand operand) |
75 : Assessment(Pending), origin_(origin), operand_(operand) {} | 75 : Assessment(Pending), origin_(origin), operand_(operand) {} |
76 | 76 |
77 static PendingAssessment* cast(Assessment* assessment) { | 77 static const PendingAssessment* cast(const Assessment* assessment) { |
78 CHECK(assessment->kind() == Pending); | 78 CHECK(assessment->kind() == Pending); |
79 return static_cast<PendingAssessment*>(assessment); | 79 return static_cast<const PendingAssessment*>(assessment); |
80 } | 80 } |
81 | 81 |
82 const InstructionBlock* origin() const { return origin_; } | 82 const InstructionBlock* origin() const { return origin_; } |
83 InstructionOperand operand() const { return operand_; } | 83 InstructionOperand operand() const { return operand_; } |
84 | 84 |
85 private: | 85 private: |
86 const InstructionBlock* const origin_; | 86 const InstructionBlock* const origin_; |
87 InstructionOperand operand_; | 87 InstructionOperand operand_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(PendingAssessment); | 89 DISALLOW_COPY_AND_ASSIGN(PendingAssessment); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 ZoneMap<RpoNumber, DelayedAssessments*> outstanding_assessments_; | 257 ZoneMap<RpoNumber, DelayedAssessments*> outstanding_assessments_; |
258 | 258 |
259 DISALLOW_COPY_AND_ASSIGN(RegisterAllocatorVerifier); | 259 DISALLOW_COPY_AND_ASSIGN(RegisterAllocatorVerifier); |
260 }; | 260 }; |
261 | 261 |
262 } // namespace compiler | 262 } // namespace compiler |
263 } // namespace internal | 263 } // namespace internal |
264 } // namespace v8 | 264 } // namespace v8 |
265 | 265 |
266 #endif | 266 #endif |
OLD | NEW |