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

Issue 1301523004: WIP parse destructuring assignment (Closed)

Created:
5 years, 4 months ago by caitp (gmail)
Modified:
4 years, 11 months ago
Reviewers:
adamk
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

WIP parse destructuring assignment

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+459 lines, -36 lines) Patch
M src/ast.h View 2 chunks +9 lines, -0 lines 0 comments Download
M src/expression-classifier.h View 1 chunk +7 lines, -0 lines 0 comments Download
M src/messages.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/parser.h View 3 chunks +10 lines, -0 lines 0 comments Download
M src/parser.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M src/preparser.h View 30 chunks +196 lines, -32 lines 0 comments Download
M test/cctest/test-parsing.cc View 3 chunks +225 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
caitp (gmail)
This is still a work in progress. It was an attempt to put the logic ...
5 years, 4 months ago (2015-08-18 17:50:09 UTC) #1
adamk
Haven't dug in yet, but to your issue with 'let []': I suspect you're just ...
5 years, 4 months ago (2015-08-19 00:40:33 UTC) #3
caitp (gmail)
5 years, 4 months ago (2015-08-19 01:25:16 UTC) #4
On 2015/08/19 00:40:33, adamk wrote:
> Haven't dug in yet, but to your issue with 'let []': I suspect you're just
> testing in sloppy mode. Here are my results with this patched in:
> 
> $ d8 --harmony-destructuring -e 'let [x] = [42]; print(x)'
> unnamed:1: ReferenceError: let is not defined
> let [x] = [1]; print(x)
> ^
> ReferenceError: let is not defined
>     at unnamed:1:1
> 
> $ d8 --harmony-destructuring -e '"use strict"; let [x] = [42]; print(x)'
> 42
> 
> $ d8 --harmony-destructuring --harmony-sloppy --harmony-sloppy-let -e 'let [x]
=
> [42]; print(x)'
> 42

No, it's actual test cases in the tree. The thing it breaks on mostly is
rest/spread elements, which it runs into during ParsePrimaryExpression(). It is
possible it's broken upstream, but i haven't tested on master, so i assume it's
this code that broke it.

Powered by Google App Engine
This is Rietveld 408576698