v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
bytecode-decoder.h
Go to the documentation of this file.
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
3// found in the LICENSE file.
4
5#ifndef V8_INTERPRETER_BYTECODE_DECODER_H_
6#define V8_INTERPRETER_BYTECODE_DECODER_H_
7
8#include <iosfwd>
9
11
12namespace v8 {
13namespace internal {
14namespace interpreter {
15
17 public:
18 // Decodes a register operand in a byte array.
19 static Register DecodeRegisterOperand(Address operand_start,
20 OperandType operand_type,
21 OperandScale operand_scale);
22
23 // Decodes a register list operand in a byte array.
24 static RegisterList DecodeRegisterListOperand(Address operand_start,
25 uint32_t count,
26 OperandType operand_type,
27 OperandScale operand_scale);
28
29 // Decodes a signed operand in a byte array.
30 static int32_t DecodeSignedOperand(Address operand_start,
31 OperandType operand_type,
32 OperandScale operand_scale);
33
34 // Decodes an unsigned operand in a byte array.
35 static uint32_t DecodeUnsignedOperand(Address operand_start,
36 OperandType operand_type,
37 OperandScale operand_scale);
38
39 // Decode a single bytecode and operands to |os|.
40 static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start,
41 bool with_hex = true);
42};
43
44} // namespace interpreter
45} // namespace internal
46} // namespace v8
47
48#endif // V8_INTERPRETER_BYTECODE_DECODER_H_
#define V8_EXPORT_PRIVATE
Definition macros.h:460