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

Issue 1382513003: Test for var declarations in eval which conflict with let (Closed)

Created:
5 years, 2 months ago by Dan Ehrenberg
Modified:
5 years, 2 months ago
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

Test for var declarations in eval which conflict with let Previously, name conflicts between var and let declarations were only made into exceptions if they were visible at parse-time. This patch adds runtime checks so that sloppy-mode direct eval can't introduce conflicting var declarations. The change is implemented by traversing the scope chain when a direct eval introduces a var declaration to look for conflicting let declarations, up to the function boundary. BUG=v8:4454 R=adamk LOG=Y Committed: https://crrev.com/d515e5138d30ab5b2a79e4cac99fcc5ca8d8991b Cr-Commit-Position: refs/heads/master@{#31211}

Patch Set 1 #

Total comments: 9

Patch Set 2 : Better testing and removing the extra check unless it's introduced by eval #

Patch Set 3 : Fix MIPS backends, formatting #

Patch Set 4 : MIPS fix (again) #

Patch Set 5 : mask out eval bit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+404 lines, -73 lines) Patch
M src/contexts.h View 1 1 chunk +7 lines, -3 lines 0 comments Download
M src/contexts.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M src/full-codegen/arm/full-codegen-arm.cc View 1 2 chunks +4 lines, -5 lines 0 comments Download
M src/full-codegen/arm64/full-codegen-arm64.cc View 1 2 chunks +4 lines, -5 lines 0 comments Download
M src/full-codegen/ia32/full-codegen-ia32.cc View 1 2 2 chunks +6 lines, -5 lines 0 comments Download
M src/full-codegen/mips/full-codegen-mips.cc View 1 2 3 2 chunks +4 lines, -5 lines 0 comments Download
M src/full-codegen/mips64/full-codegen-mips64.cc View 1 2 3 2 chunks +4 lines, -5 lines 0 comments Download
M src/full-codegen/ppc/full-codegen-ppc.cc View 1 2 2 chunks +8 lines, -5 lines 0 comments Download
M src/full-codegen/x64/full-codegen-x64.cc View 1 2 chunks +4 lines, -5 lines 0 comments Download
M src/full-codegen/x87/full-codegen-x87.cc View 1 2 chunks +4 lines, -5 lines 0 comments Download
M src/parser.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/property-details.h View 1 2 1 chunk +16 lines, -11 lines 0 comments Download
M src/runtime/runtime.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/runtime/runtime-scopes.cc View 1 2 3 4 2 chunks +20 lines, -15 lines 0 comments Download
M src/variables.h View 1 3 chunks +15 lines, -0 lines 0 comments Download
M src/variables.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
A test/mjsunit/harmony/block-eval-var-over-legacy-const.js View 1 1 chunk +109 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/block-eval-var-over-let.js View 1 1 chunk +191 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (13 generated)
Dan Ehrenberg
5 years, 2 months ago (2015-10-02 23:42:10 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1382513003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1382513003/1
5 years, 2 months ago (2015-10-02 23:42:22 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-03 00:06:21 UTC) #5
adamk
+mstarzinger for more eyes on the Context code (picked via git blame, feel free to ...
5 years, 2 months ago (2015-10-05 17:20:36 UTC) #7
Dan Ehrenberg
https://codereview.chromium.org/1382513003/diff/1/test/mjsunit/regress/regress-4454.js File test/mjsunit/regress/regress-4454.js (right): https://codereview.chromium.org/1382513003/diff/1/test/mjsunit/regress/regress-4454.js#newcode15 test/mjsunit/regress/regress-4454.js:15: eval('var x = 2'); On 2015/10/05 at 17:20:36, adamk ...
5 years, 2 months ago (2015-10-05 18:27:14 UTC) #8
Dan Ehrenberg
Added more tests and skipped the traversal if it's not from an eval. https://codereview.chromium.org/1382513003/diff/1/src/contexts.h File ...
5 years, 2 months ago (2015-10-08 23:01:26 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1382513003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1382513003/20001
5 years, 2 months ago (2015-10-08 23:01:48 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_mips64el_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mips64el_compile_rel/builds/5398) v8_linux_mipsel_compile_rel on ...
5 years, 2 months ago (2015-10-08 23:03:55 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1382513003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1382513003/40001
5 years, 2 months ago (2015-10-08 23:29:12 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_mips64el_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mips64el_compile_rel/builds/5399)
5 years, 2 months ago (2015-10-08 23:33:03 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1382513003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1382513003/60001
5 years, 2 months ago (2015-10-09 00:07:39 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/10515)
5 years, 2 months ago (2015-10-09 00:19:09 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1382513003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1382513003/80001
5 years, 2 months ago (2015-10-09 00:32:02 UTC) #23
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-09 00:52:30 UTC) #25
adamk
This change lgtm. mstarzinger, please review (you're needed for full-codegen/OWNERS anyway, but I'm also interested ...
5 years, 2 months ago (2015-10-09 15:53:45 UTC) #26
Michael Starzinger
LGTM for full-codegen. I don't have an opinion about the changes to the context lookup ...
5 years, 2 months ago (2015-10-12 09:17:34 UTC) #27
Toon Verwaest
LGTM I'm not particularly a fan of abusing PropertyAttributes for all kinds of flags, but ...
5 years, 2 months ago (2015-10-12 13:50:35 UTC) #29
Dan Ehrenberg
On 2015/10/12 at 13:50:35, verwaest wrote: > LGTM > I'm not particularly a fan of ...
5 years, 2 months ago (2015-10-12 14:07:19 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1382513003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1382513003/80001
5 years, 2 months ago (2015-10-12 14:07:35 UTC) #32
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 2 months ago (2015-10-12 14:30:51 UTC) #33
commit-bot: I haz the power
5 years, 2 months ago (2015-10-12 14:31:12 UTC) #34
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/d515e5138d30ab5b2a79e4cac99fcc5ca8d8991b
Cr-Commit-Position: refs/heads/master@{#31211}

Powered by Google App Engine
This is Rietveld 408576698