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_ARRAY_BUILDER_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/interpreter/bytecodes.h" | 9 #include "src/interpreter/bytecodes.h" |
10 #include "src/interpreter/constant-array-builder.h" | 10 #include "src/interpreter/constant-array-builder.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 static bool FitsInIdx8Operand(int value); | 274 static bool FitsInIdx8Operand(int value); |
275 static bool FitsInIdx8Operand(size_t value); | 275 static bool FitsInIdx8Operand(size_t value); |
276 static bool FitsInImm8Operand(int value); | 276 static bool FitsInImm8Operand(int value); |
277 static bool FitsInIdx16Operand(int value); | 277 static bool FitsInIdx16Operand(int value); |
278 static bool FitsInIdx16Operand(size_t value); | 278 static bool FitsInIdx16Operand(size_t value); |
279 static bool FitsInReg8Operand(Register value); | 279 static bool FitsInReg8Operand(Register value); |
280 static bool FitsInReg8OperandUntranslated(Register value); | 280 static bool FitsInReg8OperandUntranslated(Register value); |
281 static bool FitsInReg16Operand(Register value); | 281 static bool FitsInReg16Operand(Register value); |
282 static bool FitsInReg16OperandUntranslated(Register value); | 282 static bool FitsInReg16OperandUntranslated(Register value); |
283 | 283 |
284 // RegisterMover interface methods. | 284 // RegisterMover interface. |
285 void MoveRegisterUntranslated(Register from, Register to) override; | 285 void MoveRegisterUntranslated(Register from, Register to) override; |
286 bool RegisterOperandIsMovable(Bytecode bytecode, int operand_index) override; | |
287 | 286 |
288 static Bytecode GetJumpWithConstantOperand(Bytecode jump_smi8_operand); | 287 static Bytecode GetJumpWithConstantOperand(Bytecode jump_smi8_operand); |
289 static Bytecode GetJumpWithConstantWideOperand(Bytecode jump_smi8_operand); | 288 static Bytecode GetJumpWithConstantWideOperand(Bytecode jump_smi8_operand); |
290 static Bytecode GetJumpWithToBoolean(Bytecode jump_smi8_operand); | 289 static Bytecode GetJumpWithToBoolean(Bytecode jump_smi8_operand); |
291 | 290 |
292 template <size_t N> | 291 template <size_t N> |
293 INLINE(void Output(Bytecode bytecode, uint32_t(&operands)[N])); | 292 INLINE(void Output(Bytecode bytecode, uint32_t(&operands)[N])); |
294 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, | 293 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, |
295 uint32_t operand2, uint32_t operand3); | 294 uint32_t operand2, uint32_t operand3); |
296 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, | 295 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 size_t offset_; | 406 size_t offset_; |
408 | 407 |
409 friend class BytecodeArrayBuilder; | 408 friend class BytecodeArrayBuilder; |
410 }; | 409 }; |
411 | 410 |
412 } // namespace interpreter | 411 } // namespace interpreter |
413 } // namespace internal | 412 } // namespace internal |
414 } // namespace v8 | 413 } // namespace v8 |
415 | 414 |
416 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 415 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |