diff options
author | Ben Murdoch <benm@google.com> | 2016-11-29 16:50:11 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2017-01-12 12:33:05 +0000 |
commit | f91f0611dbaf29ca0f1d4aecb357ce243a19d2fa (patch) | |
tree | d24b57d9c6d116ea509c621669f8ed7ed8658d3f /src/parsing/rewriter.h | |
parent | 28ba1faee73929922c84d2503d2467afa1fea3c3 (diff) | |
download | v8-f91f0611dbaf29ca0f1d4aecb357ce243a19d2fa.tar.gz |
Merge V8 5.4.500.40
Test: Manual - built & ran d8
Change-Id: I4edfa2853d3e565b729723645395688ece3193f4
Diffstat (limited to 'src/parsing/rewriter.h')
-rw-r--r-- | src/parsing/rewriter.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/parsing/rewriter.h b/src/parsing/rewriter.h index 477644a7..2dbfd32b 100644 --- a/src/parsing/rewriter.h +++ b/src/parsing/rewriter.h @@ -12,6 +12,8 @@ class AstValueFactory; class DoExpression; class ParseInfo; class Parser; +class DeclarationScope; +class Scope; class Rewriter { public: @@ -24,9 +26,13 @@ class Rewriter { static bool Rewrite(ParseInfo* info); // Rewrite a list of statements, using the same rules as a top-level program, - // to ensure identical behaviour of completion result. - static bool Rewrite(Parser* parser, DoExpression* expr, - AstValueFactory* factory); + // to ensure identical behaviour of completion result. The temporary is added + // to the closure scope of the do-expression, which matches the closure scope + // of the outer scope (the do-expression itself runs in a block scope, not a + // closure scope). This closure scope needs to be passed in since the + // do-expression could have dropped its own block scope. + static bool Rewrite(Parser* parser, DeclarationScope* closure_scope, + DoExpression* expr, AstValueFactory* factory); }; |