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

Issue 1234433002: [es6] Sloppy functions in block (Closed)

Created:
5 years, 5 months ago by arv (Not doing code reviews)
Modified:
5 years, 5 months ago
Reviewers:
Dan Ehrenberg, rossberg
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] Sloppy functions in block http://www.ecma-international.org/ecma-262/6.0/#sec-block-level-function-declarations-web-legacy-compatibility-semantics With --harmony-sloppy we now create the 2 bindings as needed for sloppy functions in blocks. BUG=v8:4285 LOG=N R=rossberg@chromium.org, littledan@chromium.org

Patch Set 1 #

Patch Set 2 : We need to use 2 different unresoved proxies #

Total comments: 3

Patch Set 3 : Add more tests and discover we do report wrong error #

Total comments: 1

Patch Set 4 : Don't report errors #

Total comments: 1

Patch Set 5 : Turns out resolve was needed after all #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -18 lines) Patch
M src/parser.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/parser.cc View 1 2 3 4 10 chunks +41 lines, -13 lines 0 comments Download
M src/pattern-rewriter.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A test/mjsunit/harmony/block-function-sloppy.js View 1 2 1 chunk +226 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/block-let-semantics-sloppy.js View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
arv (Not doing code reviews)
I need to add another bailout id because we cannot reuse the id.
5 years, 5 months ago (2015-07-09 21:05:05 UTC) #1
arv (Not doing code reviews)
We need to use 2 different unresoved proxies
5 years, 5 months ago (2015-07-09 21:23:16 UTC) #2
rossberg
LGTM modulo comment https://codereview.chromium.org/1234433002/diff/20001/test/mjsunit/harmony/block-function-sloppy.js File test/mjsunit/harmony/block-function-sloppy.js (right): https://codereview.chromium.org/1234433002/diff/20001/test/mjsunit/harmony/block-function-sloppy.js#newcode30 test/mjsunit/harmony/block-function-sloppy.js:30: (function TestNoInitIf() { You have all ...
5 years, 5 months ago (2015-07-10 12:18:27 UTC) #3
arv (Not doing code reviews)
Thanks. I'll add more tests and investigate the error reporting. https://codereview.chromium.org/1234433002/diff/20001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1234433002/diff/20001/src/parser.cc#newcode2230 ...
5 years, 5 months ago (2015-07-10 12:56:12 UTC) #4
arv (Not doing code reviews)
Add more tests and discover we do report wrong error
5 years, 5 months ago (2015-07-10 16:36:10 UTC) #5
arv (Not doing code reviews)
https://codereview.chromium.org/1234433002/diff/40001/test/mjsunit/harmony/block-function-sloppy.js File test/mjsunit/harmony/block-function-sloppy.js (right): https://codereview.chromium.org/1234433002/diff/40001/test/mjsunit/harmony/block-function-sloppy.js#newcode225 test/mjsunit/harmony/block-function-sloppy.js:225: assertEquals("Identifier 'y' has already been declared", ex.message); We are ...
5 years, 5 months ago (2015-07-10 16:37:23 UTC) #6
arv (Not doing code reviews)
Don't report errors
5 years, 5 months ago (2015-07-10 16:54:32 UTC) #7
arv (Not doing code reviews)
PTAL https://codereview.chromium.org/1234433002/diff/60001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/1234433002/diff/60001/src/parser.cc#newcode1996 src/parser.cc:1996: bool report_error, bool* ok) { Turned out that ...
5 years, 5 months ago (2015-07-10 16:56:33 UTC) #8
arv (Not doing code reviews)
That did not quite work...
5 years, 5 months ago (2015-07-10 17:49:07 UTC) #9
arv (Not doing code reviews)
Turns out resolve was needed after all
5 years, 5 months ago (2015-07-10 18:20:00 UTC) #10
arv (Not doing code reviews)
Now I managed to repro the issue...
5 years, 5 months ago (2015-07-10 18:42:55 UTC) #11
arv (Not doing code reviews)
Dan, can you take over this when you get a chance?
5 years, 5 months ago (2015-07-10 18:53:58 UTC) #12
arv (Not doing code reviews)
5 years, 5 months ago (2015-07-12 19:01:41 UTC) #13
This CL is not going to work. We can only determine if it is OK to add the var
binding as we are done with the function/program, at the same place where we
call CheckConflictingVarDeclarations.

I think we can add the declaration as well leave the function/program but the
assignment is a bit trickier. The assignment should be done to both bindings
when the function is created (and not what I did in this CL). I think that we
have to update the codegen to support this.

Anyway, closing this CL since it is incorrect.

Powered by Google App Engine
This is Rietveld 408576698