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_BYTECODES_H_ | 5 #ifndef V8_INTERPRETER_BYTECODES_H_ |
6 #define V8_INTERPRETER_BYTECODES_H_ | 6 #define V8_INTERPRETER_BYTECODES_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 // Clients of this interface shouldn't depend on lots of interpreter internals. | 10 // Clients of this interface shouldn't depend on lots of interpreter internals. |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
505 | 505 |
506 // Decodes an unsigned operand in a byte array. | 506 // Decodes an unsigned operand in a byte array. |
507 static uint32_t DecodeUnsignedOperand(const uint8_t* operand_start, | 507 static uint32_t DecodeUnsignedOperand(const uint8_t* operand_start, |
508 OperandType operand_type, | 508 OperandType operand_type, |
509 OperandScale operand_scale); | 509 OperandScale operand_scale); |
510 | 510 |
511 // Decode a single bytecode and operands to |os|. | 511 // Decode a single bytecode and operands to |os|. |
512 static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start, | 512 static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start, |
513 int number_of_parameters); | 513 int number_of_parameters); |
514 | 514 |
515 // Returns true if a handler is generated for a bytecode at a given | |
oth
2016/03/24 15:50:35
Could we also say something like "All bytecodes ha
Stefano Sanfilippo
2016/03/24 16:07:14
Done.
| |
516 // operand scale. | |
517 static bool BytecodeHasHandler(Bytecode bytecode, OperandScale operand_scale); | |
518 | |
515 // Return the next larger operand scale. | 519 // Return the next larger operand scale. |
516 static OperandScale NextOperandScale(OperandScale operand_scale); | 520 static OperandScale NextOperandScale(OperandScale operand_scale); |
517 | 521 |
518 private: | 522 private: |
519 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes); | 523 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes); |
520 }; | 524 }; |
521 | 525 |
522 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); | 526 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); |
523 std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale); | 527 std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale); |
524 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size); | 528 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size); |
525 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); | 529 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
526 | 530 |
527 } // namespace interpreter | 531 } // namespace interpreter |
528 } // namespace internal | 532 } // namespace internal |
529 } // namespace v8 | 533 } // namespace v8 |
530 | 534 |
531 #endif // V8_INTERPRETER_BYTECODES_H_ | 535 #endif // V8_INTERPRETER_BYTECODES_H_ |
OLD | NEW |