Index: src/interpreter/bytecode-generator.h |
diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h |
index f15829dea82514ca6f8fb7ebbebbcd16e3afdaa7..dc0141d4b32f9be8e8bdd1e1a450f3377802774e 100644 |
--- a/src/interpreter/bytecode-generator.h |
+++ b/src/interpreter/bytecode-generator.h |
@@ -53,6 +53,15 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> { |
enum class TestFallthrough { kThen, kElse, kNone }; |
void GenerateBytecodeBody(); |
+ void GenerateBytecodeBodyForAsyncFunction(); |
+ void GenerateBytecodeBodyForGenerator(); |
+ void GenerateBytecodeBodyForModule(); |
+ |
+ enum class BuildJSGeneratorObject { kNoInitialYield, kInitialYield }; |
+ void BuildAllocateAndStoreJSGeneratorObject(BuildJSGeneratorObject tag); |
+ void BuildAllocateAndStoreJSPromise(); |
+ void BindUnboundGeneratorResumePoints(); |
+ |
void AllocateDeferredConstants(Isolate* isolate); |
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
@@ -164,6 +173,16 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> { |
void VisitForTest(Expression* expr, BytecodeLabels* then_labels, |
BytecodeLabels* else_labels, TestFallthrough fallthrough); |
+ void BuildYield(int yield_id, Register generator, Register value); |
+ void BuildYieldResumePoint(int yield_id, Yield::OnException on_exception, |
+ Register generator, int position); |
+ |
+ void BuildTryCatch(HandlerTable::CatchPrediction catch_prediction, |
+ std::function<void()> build_try, |
+ std::function<void(Register context)> build_catch); |
+ void BuildTryFinally(std::function<void()> build_try, |
+ std::function<void()> build_finally); |
+ |
// Returns the runtime function id for a store to super for the function's |
// language mode. |
inline Runtime::FunctionId StoreToSuperRuntimeId(); |
@@ -220,6 +239,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> { |
ZoneVector<BytecodeLabel> generator_resume_points_; |
Register generator_state_; |
int loop_depth_; |
+ HandlerTable::CatchPrediction catch_prediction_; |
Handle<Name> home_object_symbol_; |
Handle<Name> iterator_symbol_; |