| Index: src/interpreter/bytecode-generator.h
|
| diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h
|
| index 3ce65322cc4314c81798e37397b6531d70583451..2fe8b324d8cc539cd7f952631373b2b8845e9a1c 100644
|
| --- a/src/interpreter/bytecode-generator.h
|
| +++ b/src/interpreter/bytecode-generator.h
|
| @@ -28,15 +28,19 @@ class BytecodeGenerator : public AstVisitor {
|
| void VisitDeclarations(ZoneList<Declaration*>* declarations) override;
|
|
|
| private:
|
| + class ContextScope;
|
| class ControlScope;
|
| class ControlScopeForIteration;
|
|
|
| + void MakeBytecodeBody();
|
| +
|
| DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
|
|
|
| void VisitArithmeticExpression(BinaryOperation* binop);
|
| void VisitPropertyLoad(Register obj, Property* expr);
|
| void VisitVariableLoad(Variable* variable, FeedbackVectorSlot slot);
|
| void VisitVariableAssignment(Variable* variable, FeedbackVectorSlot slot);
|
| + void VisitNewLocalFunctionContext();
|
|
|
| // Dispatched from VisitUnaryOperation.
|
| void VisitVoid(UnaryOperation* expr);
|
| @@ -44,18 +48,23 @@ class BytecodeGenerator : public AstVisitor {
|
| void VisitNot(UnaryOperation* expr);
|
|
|
| inline BytecodeArrayBuilder* builder() { return &builder_; }
|
| +
|
| inline Scope* scope() const { return scope_; }
|
| inline void set_scope(Scope* scope) { scope_ = scope; }
|
| - inline ControlScope* control_scope() const { return control_scope_; }
|
| - inline void set_control_scope(ControlScope* scope) { control_scope_ = scope; }
|
| inline CompilationInfo* info() const { return info_; }
|
| inline void set_info(CompilationInfo* info) { info_ = info; }
|
| - ZoneVector<Handle<Object>>* globals() { return &globals_; }
|
|
|
| - LanguageMode language_mode() const;
|
| + inline ControlScope* control_scope() const { return control_scope_; }
|
| + inline void set_control_scope(ControlScope* scope) { control_scope_ = scope; }
|
| + inline Register current_context() const { return current_context_; }
|
| + inline void set_current_context(Register context) {
|
| + current_context_ = context;
|
| + }
|
| +
|
| + ZoneVector<Handle<Object>>* globals() { return &globals_; }
|
| + inline LanguageMode language_mode() const;
|
| Strength language_mode_strength() const;
|
| int feedback_index(FeedbackVectorSlot slot) const;
|
| - Register current_context() const;
|
|
|
| BytecodeArrayBuilder builder_;
|
| CompilationInfo* info_;
|
| @@ -63,7 +72,6 @@ class BytecodeGenerator : public AstVisitor {
|
| ZoneVector<Handle<Object>> globals_;
|
| ControlScope* control_scope_;
|
|
|
| - // TODO(rmcilroy): Encapsulate this in an environment object.
|
| Register current_context_;
|
| };
|
|
|
|
|