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_BUILDER_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/interpreter/bytecode-array-writer.h" | 9 #include "src/interpreter/bytecode-array-writer.h" |
10 #include "src/interpreter/bytecode-register-allocator.h" | 10 #include "src/interpreter/bytecode-register-allocator.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 // Deletes property from an object. This expects that accumulator contains | 208 // Deletes property from an object. This expects that accumulator contains |
209 // the key to be deleted and the register contains a reference to the object. | 209 // the key to be deleted and the register contains a reference to the object. |
210 BytecodeArrayBuilder& Delete(Register object, LanguageMode language_mode); | 210 BytecodeArrayBuilder& Delete(Register object, LanguageMode language_mode); |
211 | 211 |
212 // Tests. | 212 // Tests. |
213 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg); | 213 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg); |
214 | 214 |
215 // Casts accumulator and stores result in accumulator. | 215 // Casts accumulator and stores result in accumulator. |
216 BytecodeArrayBuilder& CastAccumulatorToBoolean(); | 216 BytecodeArrayBuilder& CastAccumulatorToBoolean(); |
217 BytecodeArrayBuilder& CastAccumulatorToJSObject(); | |
218 | 217 |
219 // Casts accumulator and stores result in register |out|. | 218 // Casts accumulator and stores result in register |out|. |
| 219 BytecodeArrayBuilder& CastAccumulatorToJSObject(Register out); |
220 BytecodeArrayBuilder& CastAccumulatorToName(Register out); | 220 BytecodeArrayBuilder& CastAccumulatorToName(Register out); |
221 BytecodeArrayBuilder& CastAccumulatorToNumber(Register out); | 221 BytecodeArrayBuilder& CastAccumulatorToNumber(Register out); |
222 | 222 |
223 // Flow Control. | 223 // Flow Control. |
224 BytecodeArrayBuilder& Bind(BytecodeLabel* label); | 224 BytecodeArrayBuilder& Bind(BytecodeLabel* label); |
225 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); | 225 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); |
226 | 226 |
227 BytecodeArrayBuilder& Jump(BytecodeLabel* label); | 227 BytecodeArrayBuilder& Jump(BytecodeLabel* label); |
228 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); | 228 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); |
229 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); | 229 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); |
230 BytecodeArrayBuilder& JumpIfNotHole(BytecodeLabel* label); | 230 BytecodeArrayBuilder& JumpIfNotHole(BytecodeLabel* label); |
231 BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label); | 231 BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label); |
232 BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label); | 232 BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label); |
233 | 233 |
234 BytecodeArrayBuilder& StackCheck(int position); | 234 BytecodeArrayBuilder& StackCheck(int position); |
235 | 235 |
236 BytecodeArrayBuilder& OsrPoll(int loop_depth); | 236 BytecodeArrayBuilder& OsrPoll(int loop_depth); |
237 | 237 |
238 BytecodeArrayBuilder& Throw(); | 238 BytecodeArrayBuilder& Throw(); |
239 BytecodeArrayBuilder& ReThrow(); | 239 BytecodeArrayBuilder& ReThrow(); |
240 BytecodeArrayBuilder& Return(); | 240 BytecodeArrayBuilder& Return(); |
241 | 241 |
242 // Debugger. | 242 // Debugger. |
243 BytecodeArrayBuilder& Debugger(); | 243 BytecodeArrayBuilder& Debugger(); |
244 | 244 |
245 // Complex flow control. | 245 // Complex flow control. |
246 BytecodeArrayBuilder& ForInPrepare(Register cache_info_triple); | 246 BytecodeArrayBuilder& ForInPrepare(Register receiver, |
| 247 Register cache_info_triple); |
247 BytecodeArrayBuilder& ForInDone(Register index, Register cache_length); | 248 BytecodeArrayBuilder& ForInDone(Register index, Register cache_length); |
248 BytecodeArrayBuilder& ForInNext(Register receiver, Register index, | 249 BytecodeArrayBuilder& ForInNext(Register receiver, Register index, |
249 Register cache_type_array_pair, | 250 Register cache_type_array_pair, |
250 int feedback_slot); | 251 int feedback_slot); |
251 BytecodeArrayBuilder& ForInStep(Register index); | 252 BytecodeArrayBuilder& ForInStep(Register index); |
252 | 253 |
253 // Generators. | 254 // Generators. |
254 BytecodeArrayBuilder& SuspendGenerator(Register generator); | 255 BytecodeArrayBuilder& SuspendGenerator(Register generator); |
255 BytecodeArrayBuilder& ResumeGenerator(Register generator); | 256 BytecodeArrayBuilder& ResumeGenerator(Register generator); |
256 | 257 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 BytecodeSourceInfo latest_source_info_; | 383 BytecodeSourceInfo latest_source_info_; |
383 | 384 |
384 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 385 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
385 }; | 386 }; |
386 | 387 |
387 } // namespace interpreter | 388 } // namespace interpreter |
388 } // namespace internal | 389 } // namespace internal |
389 } // namespace v8 | 390 } // namespace v8 |
390 | 391 |
391 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 392 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |