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

Issue 2123953002: [parser] Fix bug in destructuring binding for catch. (Closed)

Created:
4 years, 5 months ago by neis
Modified:
4 years, 5 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

[parser] Fix bug in destructuring binding for catch. For variables introduced as part of a catch pattern, we used to set their "initializer position" to the beginning of the pattern. This lead to full-codegen eliminating crucial hole checks when reading such variables inside the pattern itself. R=adamk@chromium.org, littledan@chromium.org BUG=v8:5178 Committed: https://crrev.com/4a4f7175dfdc246f1ed864cd0b86ccb6e837dee3 Cr-Commit-Position: refs/heads/master@{#37569}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -6 lines) Patch
M src/parsing/parser.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/parsing/parser.cc View 1 chunk +4 lines, -1 line 0 comments Download
A + test/mjsunit/regress/regress-5178.js View 1 chunk +1 line, -3 lines 1 comment Download

Messages

Total messages: 16 (6 generated)
neis
4 years, 5 months ago (2016-07-06 12:28:36 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2123953002/1
4 years, 5 months ago (2016-07-06 12:33:07 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-06 12:59:38 UTC) #6
Dan Ehrenberg
lgtm Interestingly, this seems to use the same strategy (put the initializer position at the ...
4 years, 5 months ago (2016-07-06 18:17:41 UTC) #7
neis
On 2016/07/06 18:17:41, Dan Ehrenberg wrote: > lgtm > > Interestingly, this seems to use ...
4 years, 5 months ago (2016-07-07 07:02:54 UTC) #8
Dan Ehrenberg
lgtm Adam is OOO through next Wednesday. I think this change is good for now ...
4 years, 5 months ago (2016-07-07 07:15:09 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2123953002/1
4 years, 5 months ago (2016-07-07 07:26:54 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-07 07:29:37 UTC) #13
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/4a4f7175dfdc246f1ed864cd0b86ccb6e837dee3 Cr-Commit-Position: refs/heads/master@{#37569}
4 years, 5 months ago (2016-07-07 07:31:26 UTC) #15
adamk
4 years, 5 months ago (2016-07-12 21:15:23 UTC) #16
Message was sent while issue was closed.
Since this doesn't have the lazy/eager parsing problem of my earlier patch, I
don't think this is dangerous, but I would like a bit more test coverage.

I agree that this is one more strike against full-codegen hole check
elimination, but not sure how much investigation it's worth.

https://codereview.chromium.org/2123953002/diff/1/test/mjsunit/regress/regres...
File test/mjsunit/regress/regress-5178.js (right):

https://codereview.chromium.org/2123953002/diff/1/test/mjsunit/regress/regres...
test/mjsunit/regress/regress-5178.js:6: try { throw {} } catch({a=b, b}) { a+b }
Can you also add a test case where we do a hole check but it passes? Something
like:

try { throw {a: 42} } catch ({a, b = a}) { assertEquals(42, b) }

Powered by Google App Engine
This is Rietveld 408576698