Index: src/interpreter/bytecode-generator.h |
diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h |
index 99536c33fb52fbf8d092eaff624fdd936ee675e5..b1f11470bcdd7c75b2a4fbd6d9641493788a1efd 100644 |
--- a/src/interpreter/bytecode-generator.h |
+++ b/src/interpreter/bytecode-generator.h |
@@ -24,25 +24,35 @@ class BytecodeGenerator : public AstVisitor { |
AST_NODE_LIST(DECLARE_VISIT) |
#undef DECLARE_VISIT |
+ // Visiting function for declarations list is overridden. |
+ void VisitDeclarations(ZoneList<Declaration*>* declarations) override; |
+ |
private: |
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
void VisitArithmeticExpression(BinaryOperation* binop); |
void VisitPropertyLoad(Register obj, Property* expr); |
- void VisitVariableLoad(Variable* variable); |
+ void VisitVariableLoad(Variable* variable, FeedbackVectorICSlot slot); |
+ void VisitVariableAssignment(Variable* variable, FeedbackVectorICSlot slot); |
inline BytecodeArrayBuilder& builder() { return builder_; } |
inline Scope* scope() const { return scope_; } |
inline void set_scope(Scope* scope) { 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; |
int feedback_index(FeedbackVectorICSlot slot) const; |
+ Register current_context() const; |
BytecodeArrayBuilder builder_; |
CompilationInfo* info_; |
Scope* scope_; |
+ ZoneVector<Handle<Object>> globals_; |
+ |
+ // TODO(rmcilroy): Encapsulate this in an environment object. |
+ Register current_context_; |
}; |
} // namespace interpreter |