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/bytecode-register.h" | 9 #include "src/interpreter/bytecode-register.h" |
10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 1); | 167 DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 1); |
168 bytecode_ = bytecode; | 168 bytecode_ = bytecode; |
169 operands_[0] = operand0; | 169 operands_[0] = operand0; |
170 } | 170 } |
171 void set_bytecode(Bytecode bytecode, uint32_t operand0, uint32_t operand1) { | 171 void set_bytecode(Bytecode bytecode, uint32_t operand0, uint32_t operand1) { |
172 DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 2); | 172 DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 2); |
173 bytecode_ = bytecode; | 173 bytecode_ = bytecode; |
174 operands_[0] = operand0; | 174 operands_[0] = operand0; |
175 operands_[1] = operand1; | 175 operands_[1] = operand1; |
176 } | 176 } |
| 177 void set_bytecode(Bytecode bytecode, uint32_t operand0, uint32_t operand1, |
| 178 uint32_t operand2) { |
| 179 DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 3); |
| 180 bytecode_ = bytecode; |
| 181 operands_[0] = operand0; |
| 182 operands_[1] = operand1; |
| 183 operands_[2] = operand2; |
| 184 } |
177 | 185 |
178 // Clone |other|. | 186 // Clone |other|. |
179 void Clone(const BytecodeNode* const other); | 187 void Clone(const BytecodeNode* const other); |
180 | 188 |
181 // Print to stream |os|. | 189 // Print to stream |os|. |
182 void Print(std::ostream& os) const; | 190 void Print(std::ostream& os) const; |
183 | 191 |
184 // Transform to a node representing |new_bytecode| which has one | 192 // Transform to a node representing |new_bytecode| which has one |
185 // operand more than the current bytecode. | 193 // operand more than the current bytecode. |
186 void Transform(Bytecode new_bytecode, uint32_t extra_operand); | 194 void Transform(Bytecode new_bytecode, uint32_t extra_operand); |
(...skipping 24 matching lines...) Expand all Loading... |
211 }; | 219 }; |
212 | 220 |
213 std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info); | 221 std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info); |
214 std::ostream& operator<<(std::ostream& os, const BytecodeNode& node); | 222 std::ostream& operator<<(std::ostream& os, const BytecodeNode& node); |
215 | 223 |
216 } // namespace interpreter | 224 } // namespace interpreter |
217 } // namespace internal | 225 } // namespace internal |
218 } // namespace v8 | 226 } // namespace v8 |
219 | 227 |
220 #endif // V8_INTERPRETER_BYTECODE_PIPELINE_H_ | 228 #endif // V8_INTERPRETER_BYTECODE_PIPELINE_H_ |
OLD | NEW |