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

Unified Diff: src/ast.h

Issue 14416011: Fix yield inside with (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Add assertion Created 7 years, 8 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 | « no previous file | src/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 2d5c200c0257d535b41e7374bb9f7a099798d75b..10ae7de458d1653e36a7ab688dd15b9b68e297f4 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -942,15 +942,18 @@ class WithStatement: public Statement {
public:
DECLARE_NODE_TYPE(WithStatement)
+ Scope* scope() { return scope_; }
Expression* expression() const { return expression_; }
Statement* statement() const { return statement_; }
protected:
- WithStatement(Expression* expression, Statement* statement)
- : expression_(expression),
+ WithStatement(Scope* scope, Expression* expression, Statement* statement)
+ : scope_(scope),
+ expression_(expression),
statement_(statement) { }
private:
+ Scope* scope_;
Expression* expression_;
Statement* statement_;
};
@@ -2787,9 +2790,11 @@ class AstNodeFactory BASE_EMBEDDED {
VISIT_AND_RETURN(ReturnStatement, stmt)
}
- WithStatement* NewWithStatement(Expression* expression,
+ WithStatement* NewWithStatement(Scope* scope,
+ Expression* expression,
Statement* statement) {
- WithStatement* stmt = new(zone_) WithStatement(expression, statement);
+ WithStatement* stmt = new(zone_) WithStatement(
+ scope, expression, statement);
VISIT_AND_RETURN(WithStatement, stmt)
}
« no previous file with comments | « no previous file | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698