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