| 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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 enum Type { | 730 enum Type { |
| 731 kInt32, | 731 kInt32, |
| 732 kInt64, | 732 kInt64, |
| 733 kFloat32, | 733 kFloat32, |
| 734 kFloat64, | 734 kFloat64, |
| 735 kExternalReference, | 735 kExternalReference, |
| 736 kHeapObject, | 736 kHeapObject, |
| 737 kRpoNumber | 737 kRpoNumber |
| 738 }; | 738 }; |
| 739 | 739 |
| 740 explicit Constant(int32_t v) : type_(kInt32), value_(v) {} | 740 explicit Constant(int32_t v); |
| 741 explicit Constant(int64_t v) : type_(kInt64), value_(v) {} | 741 explicit Constant(int64_t v) : type_(kInt64), value_(v) {} |
| 742 explicit Constant(float v) : type_(kFloat32), value_(bit_cast<int32_t>(v)) {} | 742 explicit Constant(float v) : type_(kFloat32), value_(bit_cast<int32_t>(v)) {} |
| 743 explicit Constant(double v) : type_(kFloat64), value_(bit_cast<int64_t>(v)) {} | 743 explicit Constant(double v) : type_(kFloat64), value_(bit_cast<int64_t>(v)) {} |
| 744 explicit Constant(ExternalReference ref) | 744 explicit Constant(ExternalReference ref) |
| 745 : type_(kExternalReference), value_(bit_cast<intptr_t>(ref)) {} | 745 : type_(kExternalReference), value_(bit_cast<intptr_t>(ref)) {} |
| 746 explicit Constant(Handle<HeapObject> obj) | 746 explicit Constant(Handle<HeapObject> obj) |
| 747 : type_(kHeapObject), value_(bit_cast<intptr_t>(obj)) {} | 747 : type_(kHeapObject), value_(bit_cast<intptr_t>(obj)) {} |
| 748 explicit Constant(RpoNumber rpo) : type_(kRpoNumber), value_(rpo.ToInt()) {} | 748 explicit Constant(RpoNumber rpo) : type_(kRpoNumber), value_(rpo.ToInt()) {} |
| 749 | 749 |
| 750 Type type() const { return type_; } | 750 Type type() const { return type_; } |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 | 1093 |
| 1094 | 1094 |
| 1095 std::ostream& operator<<(std::ostream& os, | 1095 std::ostream& operator<<(std::ostream& os, |
| 1096 const PrintableInstructionSequence& code); | 1096 const PrintableInstructionSequence& code); |
| 1097 | 1097 |
| 1098 } // namespace compiler | 1098 } // namespace compiler |
| 1099 } // namespace internal | 1099 } // namespace internal |
| 1100 } // namespace v8 | 1100 } // namespace v8 |
| 1101 | 1101 |
| 1102 #endif // V8_COMPILER_INSTRUCTION_H_ | 1102 #endif // V8_COMPILER_INSTRUCTION_H_ |
| OLD | NEW |