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/bit-vector.h" | 5 #include "src/bit-vector.h" |
6 #include "src/compiler/instruction.h" | 6 #include "src/compiler/instruction.h" |
7 #include "src/compiler/register-allocator-verifier.h" | 7 #include "src/compiler/register-allocator-verifier.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 }; | 238 }; |
239 | 239 |
240 class PhiMap : public ZoneMap<int, PhiData*>, public ZoneObject { | 240 class PhiMap : public ZoneMap<int, PhiData*>, public ZoneObject { |
241 public: | 241 public: |
242 explicit PhiMap(Zone* zone) : ZoneMap<int, PhiData*>(zone) {} | 242 explicit PhiMap(Zone* zone) : ZoneMap<int, PhiData*>(zone) {} |
243 }; | 243 }; |
244 | 244 |
245 struct OperandLess { | 245 struct OperandLess { |
246 bool operator()(const InstructionOperand* a, | 246 bool operator()(const InstructionOperand* a, |
247 const InstructionOperand* b) const { | 247 const InstructionOperand* b) const { |
248 if (a->kind() == b->kind()) return a->index() < b->index(); | 248 return *a < *b; |
249 return a->kind() < b->kind(); | |
250 } | 249 } |
251 }; | 250 }; |
252 | 251 |
253 class OperandMap : public ZoneObject { | 252 class OperandMap : public ZoneObject { |
254 public: | 253 public: |
255 struct MapValue : public ZoneObject { | 254 struct MapValue : public ZoneObject { |
256 MapValue() | 255 MapValue() |
257 : incoming(nullptr), | 256 : incoming(nullptr), |
258 define_vreg(kInvalidVreg), | 257 define_vreg(kInvalidVreg), |
259 use_vreg(kInvalidVreg), | 258 use_vreg(kInvalidVreg), |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 int virtual_register = op_constraints[count].virtual_register_; | 660 int virtual_register = op_constraints[count].virtual_register_; |
662 current->Define(zone(), instr->OutputAt(i), virtual_register); | 661 current->Define(zone(), instr->OutputAt(i), virtual_register); |
663 } | 662 } |
664 } | 663 } |
665 } | 664 } |
666 } | 665 } |
667 | 666 |
668 } // namespace compiler | 667 } // namespace compiler |
669 } // namespace internal | 668 } // namespace internal |
670 } // namespace v8 | 669 } // namespace v8 |
OLD | NEW |