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

Issue 1859423002: [es6] Fix bug in pattern re-writing (Closed)

Created:
4 years, 8 months ago by mike3
Modified:
4 years, 8 months ago
Reviewers:
caitp (gmail), 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

[es6] Fix bug in pattern re-writing As originally implemented, a SingleNameBinding within a BindingPattern was incorrectly interpreted as an assignment if an initializer was present and that initializer was itself an AssignmentExpresion. For example: let x; { let [x = y = 1] = []; } print(x); // expected: undefined, actual: 1 Extend the heuristic that detects the "context" of a destructuring pattern to account for AssignmentExpressions within SingleNameBindings. BUG=v8:4891 LOG=N R=adamk@chromium.org Committed: https://crrev.com/9acbca18456c6d4b704f0e98004d2c78795602fe Cr-Commit-Position: refs/heads/master@{#35334}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -1 line) Patch
M src/parsing/pattern-rewriter.cc View 1 chunk +5 lines, -1 line 0 comments Download
M test/mjsunit/es6/destructuring.js View 1 chunk +57 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
mike3
4 years, 8 months ago (2016-04-06 14:38:24 UTC) #1
mike3
I initially wrote parser tests for this, but I had to remove them. They relied ...
4 years, 8 months ago (2016-04-06 14:41:52 UTC) #2
adamk
This sounds right to me, but adding Caitlin as the original author of this code. ...
4 years, 8 months ago (2016-04-07 00:00:00 UTC) #4
caitp (gmail)
On 2016/04/07 00:00:00, adamk wrote: > This sounds right to me, but adding Caitlin as ...
4 years, 8 months ago (2016-04-07 00:10:22 UTC) #5
adamk
Okay, I started some try runs.
4 years, 8 months ago (2016-04-07 00:20:30 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1859423002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1859423002/1
4 years, 8 months ago (2016-04-07 00:21:03 UTC) #8
adamk
This lgtm based on the bots so far and some code examination. Thanks for the ...
4 years, 8 months ago (2016-04-07 00:38:56 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-07 01:02:59 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1859423002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1859423002/1
4 years, 8 months ago (2016-04-07 13:19:09 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-07 13:25:35 UTC) #14
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/9acbca18456c6d4b704f0e98004d2c78795602fe Cr-Commit-Position: refs/heads/master@{#35334}
4 years, 8 months ago (2016-04-07 13:27:04 UTC) #16
mike3
Thank you, Adam! Thank you, Cait!
4 years, 8 months ago (2016-04-07 13:56:31 UTC) #17
caitp (gmail)
4 years, 8 months ago (2016-04-07 14:44:57 UTC) #18
Message was sent while issue was closed.
On 2016/04/07 13:56:31, mike3 wrote:
> Thank you, Adam! Thank you, Cait!

Thanks for the fix =)

Powered by Google App Engine
This is Rietveld 408576698