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

Issue 332443002: Add support for computed property names in object literals (Closed)

Created:
6 years, 6 months ago by wingo
Modified:
5 years, 9 months ago
CC:
v8-dev
Visibility:
Public.

Description

Add support for computed property names in object literals R=rossberg@chromium.org TEST=mjsunit/object-literal-computed-names.js LOG=N

Patch Set 1 #

Total comments: 2

Patch Set 2 : Dynamic part of object literal initialized with PutOwnProperty #

Total comments: 20

Patch Set 3 : less literally objectionable #

Patch Set 4 : Added tests #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+840 lines, -103 lines) Patch
M src/arm/full-codegen-arm.cc View 1 2 3 chunks +81 lines, -4 lines 0 comments Download
M src/arm64/full-codegen-arm64.cc View 1 2 4 chunks +82 lines, -5 lines 0 comments Download
M src/ast.h View 3 chunks +12 lines, -8 lines 0 comments Download
M src/ast.cc View 5 chunks +28 lines, -14 lines 0 comments Download
M src/flag-definitions.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 4 chunks +80 lines, -5 lines 0 comments Download
M src/mips/full-codegen-mips.cc View 1 2 3 chunks +90 lines, -4 lines 0 comments Download
M src/preparser.h View 1 2 9 chunks +25 lines, -7 lines 1 comment Download
M src/prettyprinter.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/runtime.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 2 4 chunks +119 lines, -38 lines 0 comments Download
M src/typing.cc View 1 1 chunk +20 lines, -6 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 3 chunks +79 lines, -3 lines 0 comments Download
M src/x87/full-codegen-x87.cc View 1 2 3 chunks +79 lines, -3 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 1 chunk +58 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/object-literal-computed-names.js View 1 2 3 1 chunk +74 lines, -0 lines 0 comments Download
A + test/mjsunit/runtime-gen/setownproperty.js View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tools/generate-runtime-tests.py View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
wingo
Seemed like a good idea. Should it be behind a flag? What am I forgetting ...
6 years, 6 months ago (2014-06-11 15:35:29 UTC) #1
arv (Not doing code reviews)
https://codereview.chromium.org/332443002/diff/1/test/mjsunit/object-literal-computed-names.js File test/mjsunit/object-literal-computed-names.js (right): https://codereview.chromium.org/332443002/diff/1/test/mjsunit/object-literal-computed-names.js#newcode26 test/mjsunit/object-literal-computed-names.js:26: var buffer = '/* ' + (' ' * ...
6 years, 6 months ago (2014-06-11 19:28:29 UTC) #2
wingo
On 2014/06/11 19:28:29, arv wrote: > https://codereview.chromium.org/332443002/diff/1/test/mjsunit/object-literal-computed-names.js > File test/mjsunit/object-literal-computed-names.js (right): > > https://codereview.chromium.org/332443002/diff/1/test/mjsunit/object-literal-computed-names.js#newcode26 > ...
6 years, 6 months ago (2014-06-12 09:25:55 UTC) #3
rossberg
On 2014/06/12 09:25:55, wingo wrote: > Hum, this points out a problem in the patch ...
6 years, 6 months ago (2014-06-12 12:40:10 UTC) #4
wingo
On 2014/06/12 12:40:10, rossberg wrote: > On 2014/06/12 09:25:55, wingo wrote: > > Hum, this ...
6 years, 6 months ago (2014-06-12 13:11:01 UTC) #5
rossberg
On 2014/06/12 13:11:01, wingo wrote: > On 2014/06/12 12:40:10, rossberg wrote: > > On 2014/06/12 ...
6 years, 6 months ago (2014-06-12 14:23:46 UTC) #6
wingo
Updated to initialize dynamic part of object literals via a new runtime call. Nastiest code ...
6 years, 6 months ago (2014-06-12 14:29:52 UTC) #7
rossberg
On 2014/06/12 14:23:46, rossberg wrote: > Actually, it's not. I only just saw that we ...
6 years, 6 months ago (2014-06-12 14:38:32 UTC) #8
wingo
On 2014/06/12 14:38:32, rossberg wrote: > I made the stupid JS mistake of not parenthesising ...
6 years, 6 months ago (2014-06-12 14:47:20 UTC) #9
Michael Starzinger
Drive-by comments. https://codereview.chromium.org/332443002/diff/20001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/332443002/diff/20001/src/preparser.h#newcode1607 src/preparser.h:1607: is_computed_name = true; Shouldn't the detection of ...
6 years, 6 months ago (2014-06-13 08:14:19 UTC) #10
marja
https://codereview.chromium.org/332443002/diff/20001/test/mjsunit/object-literal-computed-names.js File test/mjsunit/object-literal-computed-names.js (right): https://codereview.chromium.org/332443002/diff/20001/test/mjsunit/object-literal-computed-names.js#newcode25 test/mjsunit/object-literal-computed-names.js:25: // function is really big. This is not lazily ...
6 years, 6 months ago (2014-06-13 14:10:37 UTC) #11
rossberg
https://codereview.chromium.org/332443002/diff/20001/src/ast.h File src/ast.h (right): https://codereview.chromium.org/332443002/diff/20001/src/ast.h#newcode1455 src/ast.h:1455: bool is_computed_name); Is this flag needed? Isn't it implied ...
6 years, 6 months ago (2014-06-13 15:19:25 UTC) #12
wingo
Updated patch, PTAL. I can give another go at the code generation stuff. Marja thank ...
6 years, 6 months ago (2014-06-16 08:32:27 UTC) #13
marja
On 2014/06/16 08:32:27, wingo wrote: > Updated patch, PTAL. I can give another go at ...
6 years, 6 months ago (2014-06-16 08:35:41 UTC) #14
wingo
On 2014/06/16 08:35:41, marja wrote: > On 2014/06/16 08:32:27, wingo wrote: > > Updated patch, ...
6 years, 6 months ago (2014-06-16 09:35:53 UTC) #15
rossberg
https://codereview.chromium.org/332443002/diff/20001/src/ast.h File src/ast.h (right): https://codereview.chromium.org/332443002/diff/20001/src/ast.h#newcode1455 src/ast.h:1455: bool is_computed_name); On 2014/06/16 08:32:27, wingo wrote: > On ...
6 years, 6 months ago (2014-06-18 14:13:40 UTC) #16
wingo
6 years, 6 months ago (2014-06-26 09:03:34 UTC) #17
See https://codereview.chromium.org/352173004/ for work to relax duplicate
checking.  Once that is resolved I'll revisit this CL.

Powered by Google App Engine
This is Rietveld 408576698