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 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 InstructionBlock* GetInstructionBlock(int instruction_index) const; | 1337 InstructionBlock* GetInstructionBlock(int instruction_index) const; |
1338 | 1338 |
1339 static MachineRepresentation DefaultRepresentation() { | 1339 static MachineRepresentation DefaultRepresentation() { |
1340 return MachineType::PointerRepresentation(); | 1340 return MachineType::PointerRepresentation(); |
1341 } | 1341 } |
1342 MachineRepresentation GetRepresentation(int virtual_register) const; | 1342 MachineRepresentation GetRepresentation(int virtual_register) const; |
1343 void MarkAsRepresentation(MachineRepresentation rep, int virtual_register); | 1343 void MarkAsRepresentation(MachineRepresentation rep, int virtual_register); |
1344 | 1344 |
1345 bool IsReference(int virtual_register) const { | 1345 bool IsReference(int virtual_register) const { |
1346 return GetRepresentation(virtual_register) == | 1346 return GetRepresentation(virtual_register) == |
1347 MachineRepresentation::kTagged; | 1347 MachineRepresentation::kTagged || |
| 1348 GetRepresentation(virtual_register) == |
| 1349 MachineRepresentation::kTaggedPointer; |
1348 } | 1350 } |
1349 bool IsFP(int virtual_register) const { | 1351 bool IsFP(int virtual_register) const { |
1350 return IsFloatingPoint(GetRepresentation(virtual_register)); | 1352 return IsFloatingPoint(GetRepresentation(virtual_register)); |
1351 } | 1353 } |
1352 bool IsFloat(int virtual_register) const { | 1354 bool IsFloat(int virtual_register) const { |
1353 return GetRepresentation(virtual_register) == | 1355 return GetRepresentation(virtual_register) == |
1354 MachineRepresentation::kFloat32; | 1356 MachineRepresentation::kFloat32; |
1355 } | 1357 } |
1356 bool IsDouble(int virtual_register) const { | 1358 bool IsDouble(int virtual_register) const { |
1357 return GetRepresentation(virtual_register) == | 1359 return GetRepresentation(virtual_register) == |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1488 | 1490 |
1489 | 1491 |
1490 std::ostream& operator<<(std::ostream& os, | 1492 std::ostream& operator<<(std::ostream& os, |
1491 const PrintableInstructionSequence& code); | 1493 const PrintableInstructionSequence& code); |
1492 | 1494 |
1493 } // namespace compiler | 1495 } // namespace compiler |
1494 } // namespace internal | 1496 } // namespace internal |
1495 } // namespace v8 | 1497 } // namespace v8 |
1496 | 1498 |
1497 #endif // V8_COMPILER_INSTRUCTION_H_ | 1499 #endif // V8_COMPILER_INSTRUCTION_H_ |
OLD | NEW |