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-register-allocator.h" | 9 #include "src/interpreter/bytecode-register-allocator.h" |
10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 BytecodeArrayBuilder& Debugger(); | 236 BytecodeArrayBuilder& Debugger(); |
237 | 237 |
238 // Complex flow control. | 238 // Complex flow control. |
239 BytecodeArrayBuilder& ForInPrepare(Register cache_info_triple); | 239 BytecodeArrayBuilder& ForInPrepare(Register cache_info_triple); |
240 BytecodeArrayBuilder& ForInDone(Register index, Register cache_length); | 240 BytecodeArrayBuilder& ForInDone(Register index, Register cache_length); |
241 BytecodeArrayBuilder& ForInNext(Register receiver, Register index, | 241 BytecodeArrayBuilder& ForInNext(Register receiver, Register index, |
242 Register cache_type_array_pair, | 242 Register cache_type_array_pair, |
243 int feedback_slot); | 243 int feedback_slot); |
244 BytecodeArrayBuilder& ForInStep(Register index); | 244 BytecodeArrayBuilder& ForInStep(Register index); |
245 | 245 |
| 246 // Generators. |
| 247 BytecodeArrayBuilder& SuspendGenerator(Register generator); |
| 248 BytecodeArrayBuilder& ResumeGenerator(Register generator); |
| 249 |
246 // Exception handling. | 250 // Exception handling. |
247 BytecodeArrayBuilder& MarkHandler(int handler_id, bool will_catch); | 251 BytecodeArrayBuilder& MarkHandler(int handler_id, bool will_catch); |
248 BytecodeArrayBuilder& MarkTryBegin(int handler_id, Register context); | 252 BytecodeArrayBuilder& MarkTryBegin(int handler_id, Register context); |
249 BytecodeArrayBuilder& MarkTryEnd(int handler_id); | 253 BytecodeArrayBuilder& MarkTryEnd(int handler_id); |
250 | 254 |
251 // Creates a new handler table entry and returns a {hander_id} identifying the | 255 // Creates a new handler table entry and returns a {hander_id} identifying the |
252 // entry, so that it can be referenced by above exception handling support. | 256 // entry, so that it can be referenced by above exception handling support. |
253 int NewHandlerEntry() { return handler_table_builder()->NewHandlerEntry(); } | 257 int NewHandlerEntry() { return handler_table_builder()->NewHandlerEntry(); } |
254 | 258 |
255 void InitializeReturnPosition(FunctionLiteral* literal); | 259 void InitializeReturnPosition(FunctionLiteral* literal); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 size_t offset_; | 424 size_t offset_; |
421 | 425 |
422 friend class BytecodeArrayBuilder; | 426 friend class BytecodeArrayBuilder; |
423 }; | 427 }; |
424 | 428 |
425 } // namespace interpreter | 429 } // namespace interpreter |
426 } // namespace internal | 430 } // namespace internal |
427 } // namespace v8 | 431 } // namespace v8 |
428 | 432 |
429 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 433 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |