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

Issue 7616009: Parse harmony let declarations. (Closed)

Created:
9 years, 4 months ago by Steven
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Parse harmony let declarations. Implementation of the harmony block scoped let bindings as proposed here: http://wiki.ecmascript.org/doku.php?id=harmony:block_scoped_bindings Changes to the syntax are explained there. They are active under the harmony_block_scoping_ flag in the parser. Committed: http://code.google.com/p/v8/source/detail?r=8944

Patch Set 1 #

Total comments: 36

Patch Set 2 : Pushing harmony flag through (pre)parser/scanner. #

Total comments: 6

Patch Set 3 : Updated tests. #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+486 lines, -400 lines) Patch
M src/api.cc View 1 3 chunks +4 lines, -3 lines 0 comments Download
M src/ast.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M src/compiler.cc View 1 1 chunk +8 lines, -2 lines 0 comments Download
M src/contexts.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M src/messages.js View 1 chunk +1 line, -0 lines 0 comments Download
M src/parser.h View 1 3 chunks +14 lines, -4 lines 0 comments Download
M src/parser.cc View 1 19 chunks +88 lines, -53 lines 0 comments Download
M src/preparser.h View 1 4 chunks +15 lines, -3 lines 0 comments Download
M src/preparser.cc View 1 9 chunks +41 lines, -13 lines 0 comments Download
M src/preparser-api.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/scanner-base.h View 1 2 chunks +11 lines, -0 lines 0 comments Download
M src/scanner-base.cc View 1 4 chunks +71 lines, -65 lines 0 comments Download
M src/scopes.cc View 1 chunk +3 lines, -1 line 0 comments Download
src/token.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/variables.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/variables.cc View 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 3 chunks +4 lines, -2 lines 0 comments Download
A + test/mjsunit/bugs/harmony/debug-blockscopes.js View 1 2 chunks +20 lines, -185 lines 0 comments Download
A + test/mjsunit/harmony/block-let-declaration.js View 1 2 1 chunk +23 lines, -26 lines 4 comments Download
M test/mjsunit/harmony/block-scoping.js View 1 1 chunk +134 lines, -9 lines 4 comments Download
M test/mjsunit/harmony/debug-blockscopes.js View 1 2 4 chunks +28 lines, -28 lines 0 comments Download
M test/mjsunit/harmony/debug-evaluate-blockscopes.js View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Steven
PTAL
9 years, 4 months ago (2011-08-11 13:41:16 UTC) #1
rossberg
As per our off-line discussion, I think it would be highly preferable to make the ...
9 years, 4 months ago (2011-08-11 14:34:59 UTC) #2
Lasse Reichstein
I assume we will never enable Harmony syntax in non-Harmony-opt-in code. I.e., this is only ...
9 years, 4 months ago (2011-08-12 08:08:33 UTC) #3
Steven
Can you PTAL again. http://codereview.chromium.org/7616009/diff/1/preparser/preparser-process.cc File preparser/preparser-process.cc (right): http://codereview.chromium.org/7616009/diff/1/preparser/preparser-process.cc#newcode41 preparser/preparser-process.cc:41: } } // namespace v8::internal ...
9 years, 4 months ago (2011-08-16 09:05:32 UTC) #4
rossberg
http://codereview.chromium.org/7616009/diff/11001/test/mjsunit/harmony/block-scoping.js File test/mjsunit/harmony/block-scoping.js (right): http://codereview.chromium.org/7616009/diff/11001/test/mjsunit/harmony/block-scoping.js#newcode118 test/mjsunit/harmony/block-scoping.js:118: // Variable shadowing. What about shadowing between "var" and ...
9 years, 4 months ago (2011-08-16 09:49:43 UTC) #5
Lasse Reichstein
LGTM http://codereview.chromium.org/7616009/diff/1/src/contexts.cc File src/contexts.cc (right): http://codereview.chromium.org/7616009/diff/1/src/contexts.cc#newcode183 src/contexts.cc:183: case Variable::LET: I was just trying to understand ...
9 years, 4 months ago (2011-08-16 11:00:46 UTC) #6
rossberg
http://codereview.chromium.org/7616009/diff/1/src/contexts.cc File src/contexts.cc (right): http://codereview.chromium.org/7616009/diff/1/src/contexts.cc#newcode183 src/contexts.cc:183: case Variable::LET: On 2011/08/16 11:00:46, Lasse Reichstein wrote: > ...
9 years, 4 months ago (2011-08-16 11:23:14 UTC) #7
Steven
http://codereview.chromium.org/7616009/diff/1/src/contexts.cc File src/contexts.cc (right): http://codereview.chromium.org/7616009/diff/1/src/contexts.cc#newcode183 src/contexts.cc:183: case Variable::LET: The context slot for the variable is ...
9 years, 4 months ago (2011-08-16 15:06:08 UTC) #8
Lasse Reichstein
9 years, 4 months ago (2011-08-17 10:57:04 UTC) #9
http://codereview.chromium.org/7616009/diff/1/src/contexts.cc
File src/contexts.cc (right):

http://codereview.chromium.org/7616009/diff/1/src/contexts.cc#newcode183
src/contexts.cc:183: case Variable::LET:
I was relying on BE's comment in
http://www.mail-archive.com/es-discuss@mozilla.org/msg08908.html
It sounded authoritative enough for me to assume it was the consensus., although
obviously, I couldn't know for sure.
(It is, however, the what I would prefer too :)

Powered by Google App Engine
This is Rietveld 408576698