| Index: src/interpreter/bytecode-generator.h
|
| diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h
|
| index f15829dea82514ca6f8fb7ebbebbcd16e3afdaa7..970a13a47a0cc64de05a1f9d05955e72b0682e7b 100644
|
| --- a/src/interpreter/bytecode-generator.h
|
| +++ b/src/interpreter/bytecode-generator.h
|
| @@ -49,10 +49,32 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
|
| class RegisterAllocationScope;
|
| class TestResultScope;
|
| class ValueResultScope;
|
| + class SimpleTryCatchBuilder;
|
| + class SimpleTryFinallyBuilder;
|
| +
|
| + template <class T>
|
| + class TryBlockBuilder;
|
| + typedef TryBlockBuilder<SimpleTryCatchBuilder> TryBlockBuilderForCatch;
|
| + typedef TryBlockBuilder<SimpleTryFinallyBuilder> TryBlockBuilderForFinally;
|
| + class CatchBlockBuilder;
|
| + class FinallyBlockBuilder;
|
| +
|
| + friend class SimpleTryCatchBuilder;
|
| + friend class SimpleTryFinallyBuilder;
|
|
|
| enum class TestFallthrough { kThen, kElse, kNone };
|
|
|
| void GenerateBytecodeBody();
|
| + void GenerateBytecodeBodyForAsyncFunction(FunctionLiteral* literal);
|
| + void GenerateBytecodeBodyForGenerator(FunctionLiteral* literal);
|
| + void GenerateBytecodeBodyForModule(FunctionLiteral* literal);
|
| +
|
| + enum class BuildJSGeneratorObject { kNoInitialYield, kInitialYield };
|
| + void BuildAllocateAndStoreJSGeneratorObject(FunctionLiteral* literal,
|
| + BuildJSGeneratorObject tag);
|
| + void BuildAllocateAndStoreJSPromise();
|
| + void BindUnboundGeneratorResumePoints();
|
| +
|
| void AllocateDeferredConstants(Isolate* isolate);
|
|
|
| DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
|
| @@ -164,6 +186,10 @@ 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);
|
| +
|
| // Returns the runtime function id for a store to super for the function's
|
| // language mode.
|
| inline Runtime::FunctionId StoreToSuperRuntimeId();
|
| @@ -220,6 +246,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_;
|
|
|