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

Issue 1317033005: Always lazy compile arrow functions (Closed)

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

Always lazy compile arrow functions This causes the scope of default parameters to be correct, where otherwise we'd get it wrong, as expressions in default parameters would be evaluated in the scope containing the arrow function. This is something of a hack. The right way to fix it would likely be to do something like pattern-rewriter, but for scopes. BUG=v8:4395 LOG=n

Patch Set 1 : Add test and comment #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -4 lines) Patch
M src/preparser.h View 2 chunks +7 lines, -2 lines 2 comments Download
A + test/mjsunit/harmony/regress/regress-4395.js View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
adamk
I'm not at all sure we want to land this, but I wanted to bump ...
5 years, 3 months ago (2015-09-19 00:06:05 UTC) #2
caitp (gmail)
On 2015/09/19 00:06:05, adamk wrote: > I'm not at all sure we want to land ...
5 years, 3 months ago (2015-09-19 21:34:20 UTC) #4
caitp (gmail)
https://codereview.chromium.org/1317033005/diff/20001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/1317033005/diff/20001/src/preparser.h#newcode3288 src/preparser.h:3288: !IsArrowFunction(result->AsFunctionLiteral()->kind())) { The only time you _need_ to force ...
5 years, 3 months ago (2015-09-19 21:34:36 UTC) #5
rossberg
https://codereview.chromium.org/1317033005/diff/20001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/1317033005/diff/20001/src/preparser.h#newcode3288 src/preparser.h:3288: !IsArrowFunction(result->AsFunctionLiteral()->kind())) { On 2015/09/19 21:34:36, caitp wrote: > The ...
5 years, 3 months ago (2015-09-22 15:33:05 UTC) #6
adamk
On 2015/09/22 15:33:05, rossberg wrote: > https://codereview.chromium.org/1317033005/diff/20001/src/preparser.h > File src/preparser.h (right): > > https://codereview.chromium.org/1317033005/diff/20001/src/preparser.h#newcode3288 > ...
5 years, 2 months ago (2015-09-25 21:17:39 UTC) #7
adamk
This is not a sufficient fix, see attached bug for details.
5 years, 2 months ago (2015-09-26 00:32:34 UTC) #8
caitp (gmail)
5 years, 2 months ago (2015-09-26 12:20:45 UTC) #9
On 2015/09/26 00:32:34, adamk wrote:
> This is not a sufficient fix, see attached bug for details.

So, a rewriter is probably all we can do

Powered by Google App Engine
This is Rietveld 408576698