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

Issue 1225413005: [es6] Check declaration conflicts between non-simple parameters and the function body (Closed)

Created:
5 years, 5 months ago by rossberg
Modified:
5 years, 3 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[es6] Check declaration conflicts between non-simple parameters and the function body Also, more tests for parameters containing functions or eval or both. R=adamk@chromium.org, caitpotter88@gmail.com, littledan@chromium.org BUG=v8:811 LOG=N Committed: https://crrev.com/fa94ca3ea422bbdc5a2b0d2ad42f7438456a95a9 Cr-Commit-Position: refs/heads/master@{#29752}

Patch Set 1 : Rebased #

Total comments: 6

Patch Set 2 : Comments #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -20 lines) Patch
M src/parser.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M src/scopes.cc View 2 chunks +11 lines, -2 lines 0 comments Download
M test/mjsunit/harmony/destructuring.js View 5 chunks +105 lines, -18 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
rossberg
5 years, 5 months ago (2015-07-15 13:21:46 UTC) #1
adamk
https://codereview.chromium.org/1225413005/diff/20001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1225413005/diff/20001/src/parser.cc#newcode4435 src/parser.cc:4435: if (inner_scope) CheckConflictingVarDeclarations(inner_scope, CHECK_OK); CHECK_OK shouldn't be used in ...
5 years, 5 months ago (2015-07-15 21:12:30 UTC) #3
rossberg
https://codereview.chromium.org/1225413005/diff/20001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1225413005/diff/20001/src/parser.cc#newcode4435 src/parser.cc:4435: if (inner_scope) CheckConflictingVarDeclarations(inner_scope, CHECK_OK); On 2015/07/15 21:12:30, adamk wrote: ...
5 years, 5 months ago (2015-07-16 14:26:40 UTC) #4
adamk
lgtm https://codereview.chromium.org/1225413005/diff/20001/src/scopes.cc File src/scopes.cc (right): https://codereview.chromium.org/1225413005/diff/20001/src/scopes.cc#newcode582 src/scopes.cc:582: // If the declaration scope is a (declaration) ...
5 years, 5 months ago (2015-07-16 17:05:14 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1225413005/40001
5 years, 5 months ago (2015-07-17 08:19:56 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/2428) v8_linux_arm64_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 5 months ago (2015-07-17 08:20:54 UTC) #9
rossberg
https://codereview.chromium.org/1225413005/diff/20001/src/scopes.cc File src/scopes.cc (right): https://codereview.chromium.org/1225413005/diff/20001/src/scopes.cc#newcode582 src/scopes.cc:582: // If the declaration scope is a (declaration) block ...
5 years, 5 months ago (2015-07-17 08:27:41 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1225413005/60001
5 years, 5 months ago (2015-07-20 13:25:41 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:60001)
5 years, 5 months ago (2015-07-20 13:49:02 UTC) #14
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/fa94ca3ea422bbdc5a2b0d2ad42f7438456a95a9 Cr-Commit-Position: refs/heads/master@{#29752}
5 years, 5 months ago (2015-07-20 13:49:24 UTC) #15
caitp (gmail)
On 2015/07/20 13:49:24, commit-bot: I haz the power wrote: > Patchset 3 (id:??) landed as ...
5 years, 3 months ago (2015-09-02 02:16:17 UTC) #16
caitp (gmail)
5 years, 3 months ago (2015-09-02 04:36:54 UTC) #17
Message was sent while issue was closed.
On 2015/09/02 02:16:17, caitp wrote:
> On 2015/07/20 13:49:24, commit-bot: I haz the power wrote:
> > Patchset 3 (id:??) landed as
> > https://crrev.com/fa94ca3ea422bbdc5a2b0d2ad42f7438456a95a9
> > Cr-Commit-Position: refs/heads/master@{#29752}
> 
> While debugging some failures (from
https://codereview.chromium.org/1272673003/)
> in tests added by this CL (particularly `f34()` --- probably others), I found
a
> problem:
> 
> We're lazily compiling the default parameter initializer function, which
becomes
> totally separated from the parameter scope where `...a` gets declared. This
> works great for eager compilation, but not so great for lazy compilation.
> 
> Just to test that this wasn't caused by a problem in my CL, I tried an
> experiment on master (29d793728abf24d7078809f128d3f82437855ff2) with no
patches
> applied: I tried removing the `...` from the rest parameter, making it a
simple
> parameter. It hangs the process.
> 
> Simple repro case:
> 
> ``` test.js
> function f({x = function defaultFn() { return a }}, a) { return x()[0] }
> f({})
> ```
> 
> ``` runner
> out/x64.release/d8 --harmony-destructuring --harmony-default-parameters
test.js
> ```
> 
> So, even if the rest parameter issue is my bug, I think it's at least
partially
> related to this simple parameter version of the bug

hmmm, nevermind this --- I think the hanging was a local system problem of some
kind maybe, I can't reproduce it now

Powered by Google App Engine
This is Rietveld 408576698