| 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_INSTRUCTION_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_H_ |
| 6 #define V8_COMPILER_INSTRUCTION_H_ | 6 #define V8_COMPILER_INSTRUCTION_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 static MachineRepresentation DefaultRepresentation() { | 1316 static MachineRepresentation DefaultRepresentation() { |
| 1317 return MachineType::PointerRepresentation(); | 1317 return MachineType::PointerRepresentation(); |
| 1318 } | 1318 } |
| 1319 MachineRepresentation GetRepresentation(int virtual_register) const; | 1319 MachineRepresentation GetRepresentation(int virtual_register) const; |
| 1320 void MarkAsRepresentation(MachineRepresentation rep, int virtual_register); | 1320 void MarkAsRepresentation(MachineRepresentation rep, int virtual_register); |
| 1321 | 1321 |
| 1322 bool IsReference(int virtual_register) const { | 1322 bool IsReference(int virtual_register) const { |
| 1323 return GetRepresentation(virtual_register) == | 1323 return GetRepresentation(virtual_register) == |
| 1324 MachineRepresentation::kTagged; | 1324 MachineRepresentation::kTagged; |
| 1325 } | 1325 } |
| 1326 bool IsFP(int virtual_register) const { |
| 1327 return IsFloatingPoint(GetRepresentation(virtual_register)); |
| 1328 } |
| 1326 bool IsFloat(int virtual_register) const { | 1329 bool IsFloat(int virtual_register) const { |
| 1327 return IsFloatingPoint(GetRepresentation(virtual_register)); | 1330 return GetRepresentation(virtual_register) == |
| 1331 MachineRepresentation::kFloat32; |
| 1332 } |
| 1333 bool IsDouble(int virtual_register) const { |
| 1334 return GetRepresentation(virtual_register) == |
| 1335 MachineRepresentation::kFloat64; |
| 1328 } | 1336 } |
| 1329 | 1337 |
| 1330 Instruction* GetBlockStart(RpoNumber rpo) const; | 1338 Instruction* GetBlockStart(RpoNumber rpo) const; |
| 1331 | 1339 |
| 1332 typedef InstructionDeque::const_iterator const_iterator; | 1340 typedef InstructionDeque::const_iterator const_iterator; |
| 1333 const_iterator begin() const { return instructions_.begin(); } | 1341 const_iterator begin() const { return instructions_.begin(); } |
| 1334 const_iterator end() const { return instructions_.end(); } | 1342 const_iterator end() const { return instructions_.end(); } |
| 1335 const InstructionDeque& instructions() const { return instructions_; } | 1343 const InstructionDeque& instructions() const { return instructions_; } |
| 1336 int LastInstructionIndex() const { | 1344 int LastInstructionIndex() const { |
| 1337 return static_cast<int>(instructions().size()) - 1; | 1345 return static_cast<int>(instructions().size()) - 1; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 | 1475 |
| 1468 | 1476 |
| 1469 std::ostream& operator<<(std::ostream& os, | 1477 std::ostream& operator<<(std::ostream& os, |
| 1470 const PrintableInstructionSequence& code); | 1478 const PrintableInstructionSequence& code); |
| 1471 | 1479 |
| 1472 } // namespace compiler | 1480 } // namespace compiler |
| 1473 } // namespace internal | 1481 } // namespace internal |
| 1474 } // namespace v8 | 1482 } // namespace v8 |
| 1475 | 1483 |
| 1476 #endif // V8_COMPILER_INSTRUCTION_H_ | 1484 #endif // V8_COMPILER_INSTRUCTION_H_ |
| OLD | NEW |