| 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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 InstructionBlock* block() const { return block_; } | 940 InstructionBlock* block() const { return block_; } |
| 941 void set_block(InstructionBlock* block) { | 941 void set_block(InstructionBlock* block) { |
| 942 DCHECK_NOT_NULL(block); | 942 DCHECK_NOT_NULL(block); |
| 943 block_ = block; | 943 block_ = block; |
| 944 } | 944 } |
| 945 | 945 |
| 946 // APIs to aid debugging. For general-stream APIs, use operator<< | 946 // APIs to aid debugging. For general-stream APIs, use operator<< |
| 947 void Print(const RegisterConfiguration* config) const; | 947 void Print(const RegisterConfiguration* config) const; |
| 948 void Print() const; | 948 void Print() const; |
| 949 | 949 |
| 950 typedef BitField<size_t, 0, 8> OutputCountField; |
| 951 typedef BitField<size_t, 8, 16> InputCountField; |
| 952 typedef BitField<size_t, 24, 6> TempCountField; |
| 953 |
| 954 static const size_t kMaxOutputCount = OutputCountField::kMax; |
| 955 static const size_t kMaxInputCount = InputCountField::kMax; |
| 956 static const size_t kMaxTempCount = TempCountField::kMax; |
| 957 |
| 950 private: | 958 private: |
| 951 explicit Instruction(InstructionCode opcode); | 959 explicit Instruction(InstructionCode opcode); |
| 952 | 960 |
| 953 Instruction(InstructionCode opcode, size_t output_count, | 961 Instruction(InstructionCode opcode, size_t output_count, |
| 954 InstructionOperand* outputs, size_t input_count, | 962 InstructionOperand* outputs, size_t input_count, |
| 955 InstructionOperand* inputs, size_t temp_count, | 963 InstructionOperand* inputs, size_t temp_count, |
| 956 InstructionOperand* temps); | 964 InstructionOperand* temps); |
| 957 | 965 |
| 958 typedef BitField<size_t, 0, 8> OutputCountField; | |
| 959 typedef BitField<size_t, 8, 16> InputCountField; | |
| 960 typedef BitField<size_t, 24, 6> TempCountField; | |
| 961 typedef BitField<bool, 30, 1> IsCallField; | 966 typedef BitField<bool, 30, 1> IsCallField; |
| 962 | 967 |
| 963 InstructionCode opcode_; | 968 InstructionCode opcode_; |
| 964 uint32_t bit_field_; | 969 uint32_t bit_field_; |
| 965 ParallelMove* parallel_moves_[2]; | 970 ParallelMove* parallel_moves_[2]; |
| 966 ReferenceMap* reference_map_; | 971 ReferenceMap* reference_map_; |
| 967 InstructionBlock* block_; | 972 InstructionBlock* block_; |
| 968 InstructionOperand operands_[1]; | 973 InstructionOperand operands_[1]; |
| 969 | 974 |
| 970 DISALLOW_COPY_AND_ASSIGN(Instruction); | 975 DISALLOW_COPY_AND_ASSIGN(Instruction); |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1531 | 1536 |
| 1532 | 1537 |
| 1533 std::ostream& operator<<(std::ostream& os, | 1538 std::ostream& operator<<(std::ostream& os, |
| 1534 const PrintableInstructionSequence& code); | 1539 const PrintableInstructionSequence& code); |
| 1535 | 1540 |
| 1536 } // namespace compiler | 1541 } // namespace compiler |
| 1537 } // namespace internal | 1542 } // namespace internal |
| 1538 } // namespace v8 | 1543 } // namespace v8 |
| 1539 | 1544 |
| 1540 #endif // V8_COMPILER_INSTRUCTION_H_ | 1545 #endif // V8_COMPILER_INSTRUCTION_H_ |
| OLD | NEW |