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

Issue 873823003: Move object literal checking into checker classes (Closed)

Created:
5 years, 11 months ago by arv (Not doing code reviews)
Modified:
5 years, 10 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

Move object literal checking into checker classes This removes the duplicate property check from object literals. Instead we repurpose the ObjectLiteralChecker into two cases, implemented by two subclasses to ObjectLiteralCheckerBase called ObjectLiteralChecker and ClassLiteralChecker. The object literal checker now only checks for duplicate __proto__ fields in object literals. The class literal checker checks for duplicate constructors, non constructor fields named constructor as well as static properties named prototype. BUG=v8:3819 LOG=Y R=adamk, dslomov@chromium.org Committed: https://crrev.com/b004b1d821e28ffec8212a7cdf46b84cbdf74b67 Cr-Commit-Position: refs/heads/master@{#26336}

Patch Set 1 #

Patch Set 2 : Duplicate __proto__ is no longer allowed so no need to special case those in CalculateEmitStore #

Patch Set 3 : Remove branch from codegens now that PROTOTYPE is always emit_store #

Patch Set 4 : Use variables #

Total comments: 1

Patch Set 5 : Split the impl of the checker into 2 classes #

Total comments: 4

Patch Set 6 : Remove unused error messages #

Patch Set 7 : git rebase #

Patch Set 8 : Fix assert #

Unified diffs Side-by-side diffs Delta from patch set Stats (+352 lines, -352 lines) Patch
M src/arm/full-codegen-arm.cc View 1 2 3 4 5 6 3 chunks +6 lines, -11 lines 0 comments Download
M src/arm64/full-codegen-arm64.cc View 1 2 3 4 5 6 3 chunks +10 lines, -15 lines 0 comments Download
M src/ast.cc View 1 2 chunks +1 line, -8 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 4 5 6 1 chunk +6 lines, -7 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 4 5 6 2 chunks +4 lines, -10 lines 0 comments Download
M src/messages.js View 1 2 3 4 5 2 chunks +2 lines, -4 lines 0 comments Download
M src/mips/full-codegen-mips.cc View 1 2 3 4 5 6 3 chunks +6 lines, -11 lines 0 comments Download
M src/mips64/full-codegen-mips64.cc View 1 2 3 4 5 6 3 chunks +6 lines, -11 lines 0 comments Download
M src/parser.cc View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M src/ppc/full-codegen-ppc.cc View 1 2 3 4 5 6 2 chunks +4 lines, -6 lines 0 comments Download
M src/preparser.h View 1 2 3 4 5 6 7 11 chunks +113 lines, -114 lines 0 comments Download
M src/preparser.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 3 4 5 6 3 chunks +6 lines, -11 lines 0 comments Download
M src/x87/full-codegen-x87.cc View 1 2 3 4 5 6 2 chunks +4 lines, -10 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 5 6 7 chunks +72 lines, -39 lines 0 comments Download
M test/mjsunit/object-literal-multiple-proto-fields.js View 1 chunk +12 lines, -10 lines 0 comments Download
M test/mjsunit/strict-mode.js View 2 chunks +44 lines, -43 lines 0 comments Download
M test/test262-es6/test262-es6.status View 1 2 3 4 1 chunk +9 lines, -10 lines 0 comments Download
M test/test262/test262.status View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M test/webkit/object-literal-syntax.js View 1 chunk +14 lines, -14 lines 0 comments Download
M test/webkit/object-literal-syntax-expected.txt View 2 chunks +15 lines, -14 lines 0 comments Download

Messages

Total messages: 19 (1 generated)
arv (Not doing code reviews)
Duplicate __proto__ is no longer allowed so no need to special case those in CalculateEmitStore
5 years, 11 months ago (2015-01-23 23:41:08 UTC) #1
arv (Not doing code reviews)
Remove branch from codegens now that PROTOTYPE is always emit_store
5 years, 11 months ago (2015-01-23 23:56:43 UTC) #2
arv (Not doing code reviews)
Use variables
5 years, 11 months ago (2015-01-24 00:03:15 UTC) #3
arv (Not doing code reviews)
PTAL Now that duplicate __proto__ is a syntax error it allows some simplifications in the ...
5 years, 11 months ago (2015-01-24 00:03:56 UTC) #4
adamk
https://codereview.chromium.org/873823003/diff/60001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/873823003/diff/60001/src/preparser.h#newcode3003 src/preparser.h:3003: if (in_class_) { Did you consider having two separate ...
5 years, 11 months ago (2015-01-24 00:18:07 UTC) #5
arv (Not doing code reviews)
Split the impl of the checker into 2 classes
5 years, 10 months ago (2015-01-27 00:36:03 UTC) #6
adamk
Looking good. Please update the CL description to match the new implementation (with two subclasses). ...
5 years, 10 months ago (2015-01-27 20:05:48 UTC) #7
arv (Not doing code reviews)
Remove unused error messages
5 years, 10 months ago (2015-01-27 21:45:59 UTC) #8
arv (Not doing code reviews)
git rebase
5 years, 10 months ago (2015-01-28 02:07:47 UTC) #9
arv (Not doing code reviews)
Fix assert
5 years, 10 months ago (2015-01-28 02:36:53 UTC) #10
arv (Not doing code reviews)
PTAL https://codereview.chromium.org/873823003/diff/80001/src/preparser.h File src/preparser.h (left): https://codereview.chromium.org/873823003/diff/80001/src/preparser.h#oldcode3056 src/preparser.h:3056: parser()->ReportMessage("strict_duplicate_property"); On 2015/01/27 20:05:48, adamk wrote: > If ...
5 years, 10 months ago (2015-01-28 02:37:15 UTC) #11
adamk
Code looks good to me, but can you address my question up-thread about compatibility before ...
5 years, 10 months ago (2015-01-28 17:57:26 UTC) #12
arv (Not doing code reviews)
On 2015/01/28 17:57:26, adamk wrote: > Code looks good to me, but can you address ...
5 years, 10 months ago (2015-01-28 18:18:45 UTC) #13
adamk
On 2015/01/28 18:18:45, arv wrote: > On 2015/01/28 17:57:26, adamk wrote: > > Code looks ...
5 years, 10 months ago (2015-01-28 18:19:30 UTC) #14
arv (Not doing code reviews)
On 2015/01/28 18:19:30, adamk wrote: > On 2015/01/28 18:18:45, arv wrote: > > On 2015/01/28 ...
5 years, 10 months ago (2015-01-29 17:39:33 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/873823003/140001
5 years, 10 months ago (2015-01-29 23:10:43 UTC) #17
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 10 months ago (2015-01-29 23:12:36 UTC) #18
commit-bot: I haz the power
5 years, 10 months ago (2015-01-29 23:12:56 UTC) #19
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/b004b1d821e28ffec8212a7cdf46b84cbdf74b67
Cr-Commit-Position: refs/heads/master@{#26336}

Powered by Google App Engine
This is Rietveld 408576698