| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 BytecodeNode(Bytecode bytecode, uint32_t operand0); | 144 BytecodeNode(Bytecode bytecode, uint32_t operand0); |
| 145 BytecodeNode(Bytecode bytecode, uint32_t operand0, uint32_t operand1); | 145 BytecodeNode(Bytecode bytecode, uint32_t operand0, uint32_t operand1); |
| 146 BytecodeNode(Bytecode bytecode, uint32_t operand0, uint32_t operand1, | 146 BytecodeNode(Bytecode bytecode, uint32_t operand0, uint32_t operand1, |
| 147 uint32_t operand2); | 147 uint32_t operand2); |
| 148 BytecodeNode(Bytecode bytecode, uint32_t operand0, uint32_t operand1, | 148 BytecodeNode(Bytecode bytecode, uint32_t operand0, uint32_t operand1, |
| 149 uint32_t operand2, uint32_t operand3); | 149 uint32_t operand2, uint32_t operand3); |
| 150 | 150 |
| 151 BytecodeNode(const BytecodeNode& other); | 151 BytecodeNode(const BytecodeNode& other); |
| 152 BytecodeNode& operator=(const BytecodeNode& other); | 152 BytecodeNode& operator=(const BytecodeNode& other); |
| 153 | 153 |
| 154 void set_bytecode(Bytecode bytecode); | 154 void set_bytecode(Bytecode bytecode) { |
| 155 void set_bytecode(Bytecode bytecode, uint32_t operand0); | 155 DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 0); |
| 156 bytecode_ = bytecode; |
| 157 } |
| 158 void set_bytecode(Bytecode bytecode, uint32_t operand0) { |
| 159 DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 1); |
| 160 bytecode_ = bytecode; |
| 161 operands_[0] = operand0; |
| 162 } |
| 163 void set_bytecode(Bytecode bytecode, uint32_t operand0, uint32_t operand1) { |
| 164 DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 2); |
| 165 bytecode_ = bytecode; |
| 166 operands_[0] = operand0; |
| 167 operands_[1] = operand1; |
| 168 } |
| 156 | 169 |
| 157 // Clone |other|. | 170 // Clone |other|. |
| 158 void Clone(const BytecodeNode* const other); | 171 void Clone(const BytecodeNode* const other); |
| 159 | 172 |
| 160 // Print to stream |os|. | 173 // Print to stream |os|. |
| 161 void Print(std::ostream& os) const; | 174 void Print(std::ostream& os) const; |
| 162 | 175 |
| 163 // Transform to a node representing |new_bytecode| which has one | 176 // Transform to a node representing |new_bytecode| which has one |
| 164 // operand more than the current bytecode. | 177 // operand more than the current bytecode. |
| 165 void Transform(Bytecode new_bytecode, uint32_t extra_operand); | 178 void Transform(Bytecode new_bytecode, uint32_t extra_operand); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 190 }; | 203 }; |
| 191 | 204 |
| 192 std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info); | 205 std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info); |
| 193 std::ostream& operator<<(std::ostream& os, const BytecodeNode& node); | 206 std::ostream& operator<<(std::ostream& os, const BytecodeNode& node); |
| 194 | 207 |
| 195 } // namespace interpreter | 208 } // namespace interpreter |
| 196 } // namespace internal | 209 } // namespace internal |
| 197 } // namespace v8 | 210 } // namespace v8 |
| 198 | 211 |
| 199 #endif // V8_INTERPRETER_BYTECODE_PIPELINE_H_ | 212 #endif // V8_INTERPRETER_BYTECODE_PIPELINE_H_ |
| OLD | NEW |