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_INTERPRETER_H_ | 5 #ifndef V8_INTERPRETER_INTERPRETER_H_ |
6 #define V8_INTERPRETER_INTERPRETER_H_ | 6 #define V8_INTERPRETER_INTERPRETER_H_ |
7 | 7 |
8 // Clients of this interface shouldn't depend on lots of interpreter internals. | 8 // Clients of this interface shouldn't depend on lots of interpreter internals. |
9 // Do not include anything from src/interpreter other than | 9 // Do not include anything from src/interpreter other than |
10 // src/interpreter/bytecodes.h here! | 10 // src/interpreter/bytecodes.h here! |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 compiler::Node* BuildLoadGlobal(Callable ic, InterpreterAssembler* assembler); | 136 compiler::Node* BuildLoadGlobal(Callable ic, InterpreterAssembler* assembler); |
137 | 137 |
138 // Generates code to load a named property. | 138 // Generates code to load a named property. |
139 compiler::Node* BuildLoadNamedProperty(Callable ic, | 139 compiler::Node* BuildLoadNamedProperty(Callable ic, |
140 InterpreterAssembler* assembler); | 140 InterpreterAssembler* assembler); |
141 | 141 |
142 // Generates code to load a keyed property. | 142 // Generates code to load a keyed property. |
143 compiler::Node* BuildLoadKeyedProperty(Callable ic, | 143 compiler::Node* BuildLoadKeyedProperty(Callable ic, |
144 InterpreterAssembler* assembler); | 144 InterpreterAssembler* assembler); |
145 | 145 |
146 // Generates code to perform logical-not on boolean |value| and returns the | |
147 // result. | |
148 compiler::Node* BuildLogicalNot(compiler::Node* value, | |
149 InterpreterAssembler* assembler); | |
150 | |
151 // Generates code to convert |value| to a boolean and returns the | |
152 // result. | |
153 compiler::Node* BuildToBoolean(compiler::Node* value, | |
154 InterpreterAssembler* assembler); | |
155 | |
156 uintptr_t GetDispatchCounter(Bytecode from, Bytecode to) const; | 146 uintptr_t GetDispatchCounter(Bytecode from, Bytecode to) const; |
157 | 147 |
158 // Get dispatch table index of bytecode. | 148 // Get dispatch table index of bytecode. |
159 static size_t GetDispatchTableIndex(Bytecode bytecode, | 149 static size_t GetDispatchTableIndex(Bytecode bytecode, |
160 OperandScale operand_scale); | 150 OperandScale operand_scale); |
161 | 151 |
162 bool IsDispatchTableInitialized(); | 152 bool IsDispatchTableInitialized(); |
163 | 153 |
164 static const int kNumberOfWideVariants = 3; | 154 static const int kNumberOfWideVariants = 3; |
165 static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1); | 155 static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1); |
166 static const int kNumberOfBytecodes = static_cast<int>(Bytecode::kLast) + 1; | 156 static const int kNumberOfBytecodes = static_cast<int>(Bytecode::kLast) + 1; |
167 | 157 |
168 Isolate* isolate_; | 158 Isolate* isolate_; |
169 Address dispatch_table_[kDispatchTableSize]; | 159 Address dispatch_table_[kDispatchTableSize]; |
170 v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_; | 160 v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_; |
171 | 161 |
172 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 162 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
173 }; | 163 }; |
174 | 164 |
175 } // namespace interpreter | 165 } // namespace interpreter |
176 } // namespace internal | 166 } // namespace internal |
177 } // namespace v8 | 167 } // namespace v8 |
178 | 168 |
179 #endif // V8_INTERPRETER_INTERPRETER_H_ | 169 #endif // V8_INTERPRETER_INTERPRETER_H_ |
OLD | NEW |