OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_ACCESSOR_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_ACCESSOR_H_ |
6 #define V8_INTERPRETER_BYTECODE_ARRAY_ACCESSOR_H_ | 6 #define V8_INTERPRETER_BYTECODE_ARRAY_ACCESSOR_H_ |
7 | 7 |
8 #include "src/globals.h" | 8 #include "src/globals.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/interpreter/bytecode-register.h" | 10 #include "src/interpreter/bytecode-register.h" |
(...skipping 30 matching lines...) Expand all Loading... | |
41 int GetRegisterOperandRange(int operand_index) const; | 41 int GetRegisterOperandRange(int operand_index) const; |
42 Runtime::FunctionId GetRuntimeIdOperand(int operand_index) const; | 42 Runtime::FunctionId GetRuntimeIdOperand(int operand_index) const; |
43 Runtime::FunctionId GetIntrinsicIdOperand(int operand_index) const; | 43 Runtime::FunctionId GetIntrinsicIdOperand(int operand_index) const; |
44 Handle<Object> GetConstantForIndexOperand(int operand_index) const; | 44 Handle<Object> GetConstantForIndexOperand(int operand_index) const; |
45 | 45 |
46 // Returns the absolute offset of the branch target at the current | 46 // Returns the absolute offset of the branch target at the current |
47 // bytecode. It is an error to call this method if the bytecode is | 47 // bytecode. It is an error to call this method if the bytecode is |
48 // not for a jump or conditional jump. | 48 // not for a jump or conditional jump. |
49 int GetJumpTargetOffset() const; | 49 int GetJumpTargetOffset() const; |
50 | 50 |
51 std::ostream& Output(std::ostream& os) const; | |
Jarin
2016/11/24 12:47:17
Nit: Elsewhere, this is called Print(...) or Print
Leszek Swirski
2016/11/25 17:31:27
Done.
| |
52 | |
51 private: | 53 private: |
52 bool OffsetInBounds() const; | 54 bool OffsetInBounds() const; |
53 | 55 |
54 uint32_t GetUnsignedOperand(int operand_index, | 56 uint32_t GetUnsignedOperand(int operand_index, |
55 OperandType operand_type) const; | 57 OperandType operand_type) const; |
56 int32_t GetSignedOperand(int operand_index, OperandType operand_type) const; | 58 int32_t GetSignedOperand(int operand_index, OperandType operand_type) const; |
57 | 59 |
58 void UpdateOperandScale(); | 60 void UpdateOperandScale(); |
59 | 61 |
60 Handle<BytecodeArray> bytecode_array_; | 62 Handle<BytecodeArray> bytecode_array_; |
61 int bytecode_offset_; | 63 int bytecode_offset_; |
62 OperandScale operand_scale_; | 64 OperandScale operand_scale_; |
63 int prefix_offset_; | 65 int prefix_offset_; |
64 | 66 |
65 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayAccessor); | 67 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayAccessor); |
66 }; | 68 }; |
67 | 69 |
68 } // namespace interpreter | 70 } // namespace interpreter |
69 } // namespace internal | 71 } // namespace internal |
70 } // namespace v8 | 72 } // namespace v8 |
71 | 73 |
72 #endif // V8_INTERPRETER_BYTECODE_GRAPH_ACCESSOR_H_ | 74 #endif // V8_INTERPRETER_BYTECODE_GRAPH_ACCESSOR_H_ |
OLD | NEW |