Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Unified Diff: src/interpreter/bytecode-generator.h

Issue 1373903005: [Interpreter] Add for/while/do support to the bytecode generator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.h
diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h
index 99536c33fb52fbf8d092eaff624fdd936ee675e5..f03651ee31ff679ce5a759f1342f7cf0b135ca1b 100644
--- a/src/interpreter/bytecode-generator.h
+++ b/src/interpreter/bytecode-generator.h
@@ -25,15 +25,20 @@ class BytecodeGenerator : public AstVisitor {
#undef DECLARE_VISIT
private:
+ class ControlScope;
+ class ControlScopeForIteration;
+
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
void VisitArithmeticExpression(BinaryOperation* binop);
void VisitPropertyLoad(Register obj, Property* expr);
void VisitVariableLoad(Variable* variable);
- inline BytecodeArrayBuilder& builder() { return builder_; }
+ 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; }
@@ -43,6 +48,7 @@ class BytecodeGenerator : public AstVisitor {
BytecodeArrayBuilder builder_;
CompilationInfo* info_;
Scope* scope_;
+ ControlScope* control_scope_;
};
} // namespace interpreter
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698