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_DECODER_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_DECODER_H_ |
6 #define V8_INTERPRETER_BYTECODE_DECODER_H_ | 6 #define V8_INTERPRETER_BYTECODE_DECODER_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
| 10 #include "src/globals.h" |
10 #include "src/interpreter/bytecode-register.h" | 11 #include "src/interpreter/bytecode-register.h" |
11 #include "src/interpreter/bytecodes.h" | 12 #include "src/interpreter/bytecodes.h" |
12 | 13 |
13 namespace v8 { | 14 namespace v8 { |
14 namespace internal { | 15 namespace internal { |
15 namespace interpreter { | 16 namespace interpreter { |
16 | 17 |
17 class BytecodeDecoder final { | 18 class V8_EXPORT_PRIVATE BytecodeDecoder final { |
18 public: | 19 public: |
19 // Decodes a register operand in a byte array. | 20 // Decodes a register operand in a byte array. |
20 static Register DecodeRegisterOperand(const uint8_t* operand_start, | 21 static Register DecodeRegisterOperand(const uint8_t* operand_start, |
21 OperandType operand_type, | 22 OperandType operand_type, |
22 OperandScale operand_scale); | 23 OperandScale operand_scale); |
23 | 24 |
24 // Decodes a register list operand in a byte array. | 25 // Decodes a register list operand in a byte array. |
25 static RegisterList DecodeRegisterListOperand(const uint8_t* operand_start, | 26 static RegisterList DecodeRegisterListOperand(const uint8_t* operand_start, |
26 uint32_t count, | 27 uint32_t count, |
27 OperandType operand_type, | 28 OperandType operand_type, |
(...skipping 12 matching lines...) Expand all Loading... |
40 // Decode a single bytecode and operands to |os|. | 41 // Decode a single bytecode and operands to |os|. |
41 static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start, | 42 static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start, |
42 int number_of_parameters); | 43 int number_of_parameters); |
43 }; | 44 }; |
44 | 45 |
45 } // namespace interpreter | 46 } // namespace interpreter |
46 } // namespace internal | 47 } // namespace internal |
47 } // namespace v8 | 48 } // namespace v8 |
48 | 49 |
49 #endif // V8_INTERPRETER_BYTECODE_DECODER_H_ | 50 #endif // V8_INTERPRETER_BYTECODE_DECODER_H_ |
OLD | NEW |