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

Issue 1864553002: [destructuring] don't attempt to visit contents of FunctionLiterals (Closed)

Created:
4 years, 8 months ago by caitp (gmail)
Modified:
4 years, 8 months ago
Reviewers:
Dan Ehrenberg, adamk
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[destructuring] don't attempt to visit contents of FunctionLiterals The parser eagerly rewrites destructuring assignments occuring in formal parameter initializers, because not doing so would cause the BindingPattern rewriting to be confused and do the wrong thing. This change prevents this rewriting from descending into the bodies of lazily parsed functions. In general, it's a mistake to descend into the bodies of function literals anyways, since they are rewritten separately on their own time, so there is no distinction made between lazily "throw away" eagerly parsed functions in the temporary parser arena, or "real" eagerly parsed functions that will be compiled. BUG=chromium:594084, v8:811 LOG=N R=adamk@chromium.org, littledan@chromium.org Committed: https://crrev.com/f60048c5563761863463a5b685685ee1af8de04a Cr-Commit-Position: refs/heads/master@{#35277}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Use adam's preferred approach #

Total comments: 1

Patch Set 3 : and add a comment explaining why #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -8 lines) Patch
M src/parsing/parser.cc View 1 2 2 chunks +5 lines, -1 line 0 comments Download
A + test/mjsunit/es6/regress/regress-594084.js View 1 chunk +5 lines, -7 lines 0 comments Download

Messages

Total messages: 15 (5 generated)
caitp (gmail)
PTAL --- the approach taken to fix this might need adjustments depending on if it ...
4 years, 8 months ago (2016-04-05 16:31:28 UTC) #1
adamk
https://codereview.chromium.org/1864553002/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1864553002/diff/1/src/parsing/parser.cc#newcode4388 src/parsing/parser.cc:4388: class InitializerRewriter : public AstExpressionVisitor { It seems like ...
4 years, 8 months ago (2016-04-05 17:54:30 UTC) #4
caitp (gmail)
https://codereview.chromium.org/1864553002/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1864553002/diff/1/src/parsing/parser.cc#newcode4388 src/parsing/parser.cc:4388: class InitializerRewriter : public AstExpressionVisitor { On 2016/04/05 17:54:30, ...
4 years, 8 months ago (2016-04-05 18:02:05 UTC) #5
adamk
https://codereview.chromium.org/1864553002/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1864553002/diff/1/src/parsing/parser.cc#newcode4388 src/parsing/parser.cc:4388: class InitializerRewriter : public AstExpressionVisitor { On 2016/04/05 18:02:05, ...
4 years, 8 months ago (2016-04-05 18:06:26 UTC) #6
caitp (gmail)
https://codereview.chromium.org/1864553002/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1864553002/diff/1/src/parsing/parser.cc#newcode4388 src/parsing/parser.cc:4388: class InitializerRewriter : public AstExpressionVisitor { On 2016/04/05 18:06:26, ...
4 years, 8 months ago (2016-04-05 18:13:23 UTC) #7
adamk
https://codereview.chromium.org/1864553002/diff/20001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1864553002/diff/20001/src/parsing/parser.cc#newcode4405 src/parsing/parser.cc:4405: void VisitFunctionLiteral(FunctionLiteral* expr) override {} Please add a comment ...
4 years, 8 months ago (2016-04-05 18:14:54 UTC) #8
adamk
lgtm
4 years, 8 months ago (2016-04-05 18:19:02 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1864553002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1864553002/40001
4 years, 8 months ago (2016-04-05 18:20:19 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-05 18:41:52 UTC) #13
commit-bot: I haz the power
4 years, 8 months ago (2016-04-05 18:43:30 UTC) #15
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f60048c5563761863463a5b685685ee1af8de04a
Cr-Commit-Position: refs/heads/master@{#35277}

Powered by Google App Engine
This is Rietveld 408576698