| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_INTERPRETER_BYTECODE_PIPELINE_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_PIPELINE_H_ |
| 6 #define V8_INTERPRETER_BYTECODE_PIPELINE_H_ | 6 #define V8_INTERPRETER_BYTECODE_PIPELINE_H_ |
| 7 | 7 |
| 8 #include "src/interpreter/bytecode-register-allocator.h" | 8 #include "src/interpreter/bytecode-register-allocator.h" |
| 9 #include "src/interpreter/bytecodes.h" | 9 #include "src/interpreter/bytecodes.h" |
| 10 #include "src/zone-containers.h" | 10 #include "src/zone-containers.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 // Clone |other|. | 95 // Clone |other|. |
| 96 void Clone(const BytecodeNode* const other); | 96 void Clone(const BytecodeNode* const other); |
| 97 | 97 |
| 98 // Print to stream |os|. | 98 // Print to stream |os|. |
| 99 void Print(std::ostream& os) const; | 99 void Print(std::ostream& os) const; |
| 100 | 100 |
| 101 // Return the size when this node is serialized to a bytecode array. | 101 // Return the size when this node is serialized to a bytecode array. |
| 102 size_t Size() const; | 102 size_t Size() const; |
| 103 | 103 |
| 104 // Transform to a node representing |new_bytecode| which has one |
| 105 // operand more than the current bytecode. |
| 106 void Transform(Bytecode new_bytecode, uint32_t extra_operand, |
| 107 OperandScale extra_operand_scale); |
| 108 |
| 104 Bytecode bytecode() const { return bytecode_; } | 109 Bytecode bytecode() const { return bytecode_; } |
| 105 | 110 |
| 106 uint32_t operand(int i) const { | 111 uint32_t operand(int i) const { |
| 107 DCHECK_LT(i, operand_count()); | 112 DCHECK_LT(i, operand_count()); |
| 108 return operands_[i]; | 113 return operands_[i]; |
| 109 } | 114 } |
| 110 uint32_t* operands() { return operands_; } | 115 uint32_t* operands() { return operands_; } |
| 111 const uint32_t* operands() const { return operands_; } | 116 const uint32_t* operands() const { return operands_; } |
| 112 | 117 |
| 113 int operand_count() const { return Bytecodes::NumberOfOperands(bytecode_); } | 118 int operand_count() const { return Bytecodes::NumberOfOperands(bytecode_); } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 130 }; | 135 }; |
| 131 | 136 |
| 132 std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info); | 137 std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info); |
| 133 std::ostream& operator<<(std::ostream& os, const BytecodeNode& node); | 138 std::ostream& operator<<(std::ostream& os, const BytecodeNode& node); |
| 134 | 139 |
| 135 } // namespace interpreter | 140 } // namespace interpreter |
| 136 } // namespace internal | 141 } // namespace internal |
| 137 } // namespace v8 | 142 } // namespace v8 |
| 138 | 143 |
| 139 #endif // V8_INTERPRETER_BYTECODE_PIPELINE_H_ | 144 #endif // V8_INTERPRETER_BYTECODE_PIPELINE_H_ |
| OLD | NEW |