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_ITERATOR_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_ITERATOR_H_ |
6 #define V8_INTERPRETER_BYTECODE_ARRAY_ITERATOR_H_ | 6 #define V8_INTERPRETER_BYTECODE_ARRAY_ITERATOR_H_ |
7 | 7 |
8 #include "src/handles.h" | 8 #include "src/handles.h" |
9 #include "src/interpreter/bytecodes.h" | 9 #include "src/interpreter/bytecodes.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
28 int8_t GetImmediateOperand(int operand_index) const; | 28 int8_t GetImmediateOperand(int operand_index) const; |
29 int GetIndexOperand(int operand_index) const; | 29 int GetIndexOperand(int operand_index) const; |
30 int GetCountOperand(int operand_index) const; | 30 int GetCountOperand(int operand_index) const; |
31 Register GetRegisterOperand(int operand_index) const; | 31 Register GetRegisterOperand(int operand_index) const; |
32 Handle<Object> GetConstantForIndexOperand(int operand_index) const; | 32 Handle<Object> GetConstantForIndexOperand(int operand_index) const; |
33 | 33 |
34 // Get the raw byte for the given operand. Note: you should prefer using the | 34 // Get the raw byte for the given operand. Note: you should prefer using the |
35 // typed versions above which cast the return to an appropriate type. | 35 // typed versions above which cast the return to an appropriate type. |
36 uint32_t GetRawOperand(int operand_index, OperandType operand_type) const; | 36 uint32_t GetRawOperand(int operand_index, OperandType operand_type) const; |
37 | 37 |
38 // Returns the absolute offset of the branch target if the current bytecode | |
39 // is jump or conditional jump, kMinInt otherwise. | |
rmcilroy
2015/12/15 17:35:44
It never actually returns kMinInt since there is a
oth
2015/12/15 22:42:17
Done. Yes, doh!
| |
40 int GetJumpTargetOffset() const; | |
41 | |
38 private: | 42 private: |
39 Handle<BytecodeArray> bytecode_array_; | 43 Handle<BytecodeArray> bytecode_array_; |
40 int bytecode_offset_; | 44 int bytecode_offset_; |
41 | 45 |
42 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayIterator); | 46 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayIterator); |
43 }; | 47 }; |
44 | 48 |
45 } // namespace interpreter | 49 } // namespace interpreter |
46 } // namespace internal | 50 } // namespace internal |
47 } // namespace v8 | 51 } // namespace v8 |
48 | 52 |
49 #endif // V8_INTERPRETER_BYTECODE_GRAPH_ITERATOR_H_ | 53 #endif // V8_INTERPRETER_BYTECODE_GRAPH_ITERATOR_H_ |
OLD | NEW |