Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: src/interpreter/bytecode-array-accessor.h

Issue 2558093005: [turbofan] Add and use bytecode loop assigment analysis (Closed)
Patch Set: Fix build Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-array-accessor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 bool OffsetWithinBytecode(int offset) const;
52
51 std::ostream& PrintTo(std::ostream& os) const; 53 std::ostream& PrintTo(std::ostream& os) const;
52 54
53 private: 55 private:
54 bool OffsetInBounds() const; 56 bool OffsetInBounds() const;
55 57
56 uint32_t GetUnsignedOperand(int operand_index, 58 uint32_t GetUnsignedOperand(int operand_index,
57 OperandType operand_type) const; 59 OperandType operand_type) const;
58 int32_t GetSignedOperand(int operand_index, OperandType operand_type) const; 60 int32_t GetSignedOperand(int operand_index, OperandType operand_type) const;
59 61
60 void UpdateOperandScale(); 62 void UpdateOperandScale();
61 63
62 Handle<BytecodeArray> bytecode_array_; 64 Handle<BytecodeArray> bytecode_array_;
63 int bytecode_offset_; 65 int bytecode_offset_;
64 OperandScale operand_scale_; 66 OperandScale operand_scale_;
65 int prefix_offset_; 67 int prefix_offset_;
66 68
67 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayAccessor); 69 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayAccessor);
68 }; 70 };
69 71
70 } // namespace interpreter 72 } // namespace interpreter
71 } // namespace internal 73 } // namespace internal
72 } // namespace v8 74 } // namespace v8
73 75
74 #endif // V8_INTERPRETER_BYTECODE_GRAPH_ACCESSOR_H_ 76 #endif // V8_INTERPRETER_BYTECODE_GRAPH_ACCESSOR_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-array-accessor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698