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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 ExternalReference ToExternalReference() const { | 993 ExternalReference ToExternalReference() const { |
994 DCHECK_EQ(kExternalReference, type()); | 994 DCHECK_EQ(kExternalReference, type()); |
995 return bit_cast<ExternalReference>(static_cast<intptr_t>(value_)); | 995 return bit_cast<ExternalReference>(static_cast<intptr_t>(value_)); |
996 } | 996 } |
997 | 997 |
998 RpoNumber ToRpoNumber() const { | 998 RpoNumber ToRpoNumber() const { |
999 DCHECK_EQ(kRpoNumber, type()); | 999 DCHECK_EQ(kRpoNumber, type()); |
1000 return RpoNumber::FromInt(static_cast<int>(value_)); | 1000 return RpoNumber::FromInt(static_cast<int>(value_)); |
1001 } | 1001 } |
1002 | 1002 |
1003 Handle<HeapObject> ToHeapObject() const; | 1003 Handle<HeapObject> ToHeapObject() const { |
| 1004 DCHECK_EQ(kHeapObject, type()); |
| 1005 return bit_cast<Handle<HeapObject> >(static_cast<intptr_t>(value_)); |
| 1006 } |
1004 | 1007 |
1005 private: | 1008 private: |
1006 Type type_; | 1009 Type type_; |
1007 int64_t value_; | 1010 int64_t value_; |
1008 #if V8_TARGET_ARCH_32_BIT | 1011 #if V8_TARGET_ARCH_32_BIT |
1009 RelocInfo::Mode rmode_ = RelocInfo::NONE32; | 1012 RelocInfo::Mode rmode_ = RelocInfo::NONE32; |
1010 #else | 1013 #else |
1011 RelocInfo::Mode rmode_ = RelocInfo::NONE64; | 1014 RelocInfo::Mode rmode_ = RelocInfo::NONE64; |
1012 #endif | 1015 #endif |
1013 }; | 1016 }; |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 | 1429 |
1427 | 1430 |
1428 std::ostream& operator<<(std::ostream& os, | 1431 std::ostream& operator<<(std::ostream& os, |
1429 const PrintableInstructionSequence& code); | 1432 const PrintableInstructionSequence& code); |
1430 | 1433 |
1431 } // namespace compiler | 1434 } // namespace compiler |
1432 } // namespace internal | 1435 } // namespace internal |
1433 } // namespace v8 | 1436 } // namespace v8 |
1434 | 1437 |
1435 #endif // V8_COMPILER_INSTRUCTION_H_ | 1438 #endif // V8_COMPILER_INSTRUCTION_H_ |
OLD | NEW |