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

Issue 985643003: [es6] Throw TypeError for computed static prototype property name (Closed)

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

[es6] Throw TypeError for computed static prototype property name The prototype of a class constructor function is read only. When we set computed property names we were ignoring this and we were overriding the property. Since the prototype is the only possible own read only property on the constructor function object we special case this so we do not have to check this for every property in the class literal. BUG=v8:3945 LOG=N R=mstarzinger@chromium.org, dslomov@chromium.org Committed: https://crrev.com/8d946b9c3f6ea42dd5232c0529be4d47798b06aa Cr-Commit-Position: refs/heads/master@{#27106}

Patch Set 1 #

Patch Set 2 : Cleanup comment #

Total comments: 3

Patch Set 3 : Handle branching in TF #

Patch Set 4 : Ports done #

Patch Set 5 : Inline BuildThrowStaticPrototype #

Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -37 lines) Patch
M src/arm/full-codegen-arm.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M src/arm64/full-codegen-arm64.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M src/compiler/ast-graph-builder.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 4 2 chunks +33 lines, -0 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 2 1 chunk +11 lines, -9 lines 0 comments Download
M src/runtime/runtime-classes.cc View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/computed-property-names-classes.js View 1 chunk +61 lines, -28 lines 0 comments Download

Messages

Total messages: 19 (1 generated)
arv (Not doing code reviews)
Cleanup comment
5 years, 9 months ago (2015-03-06 11:50:11 UTC) #1
arv (Not doing code reviews)
PTAL Other ports will follow if this seems like a good approach. https://codereview.chromium.org/985643003/diff/20001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc ...
5 years, 9 months ago (2015-03-06 11:51:29 UTC) #2
Michael Starzinger
https://codereview.chromium.org/985643003/diff/20001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/985643003/diff/20001/src/compiler/ast-graph-builder.cc#newcode1394 src/compiler/ast-graph-builder.cc:1394: javascript()->CallRuntime(Runtime::kThrowIfStaticPrototype, 1); On 2015/03/06 11:51:29, arv wrote: > I'm ...
5 years, 9 months ago (2015-03-06 13:05:19 UTC) #3
caitp (gmail)
The error is that the `prototype` property is set up with writable=false, configurable=false properties --- ...
5 years, 9 months ago (2015-03-06 13:52:13 UTC) #4
arv (Not doing code reviews)
On 2015/03/06 13:52:13, caitp wrote: > The error is that the `prototype` property is set ...
5 years, 9 months ago (2015-03-06 16:10:04 UTC) #5
arv (Not doing code reviews)
I see I didn't reply to this part On 2015/03/06 13:52:13, caitp wrote: > and ...
5 years, 9 months ago (2015-03-09 14:28:13 UTC) #6
arv (Not doing code reviews)
Dmitry, Any comments?
5 years, 9 months ago (2015-03-09 14:28:30 UTC) #7
caitp (gmail)
On 2015/03/09 14:28:13, arv wrote: > I see I didn't reply to this part > ...
5 years, 9 months ago (2015-03-09 14:31:00 UTC) #8
Dmitry Lomov (no reviews)
https://codereview.chromium.org/985643003/diff/20001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/985643003/diff/20001/src/compiler/ast-graph-builder.cc#newcode1394 src/compiler/ast-graph-builder.cc:1394: javascript()->CallRuntime(Runtime::kThrowIfStaticPrototype, 1); On 2015/03/06 13:05:18, Michael Starzinger wrote: > ...
5 years, 9 months ago (2015-03-09 14:46:04 UTC) #9
arv (Not doing code reviews)
Handle branching in TF
5 years, 9 months ago (2015-03-09 16:18:05 UTC) #10
arv (Not doing code reviews)
Ports done
5 years, 9 months ago (2015-03-09 16:29:39 UTC) #11
arv (Not doing code reviews)
Inline BuildThrowStaticPrototype
5 years, 9 months ago (2015-03-09 16:34:28 UTC) #12
arv (Not doing code reviews)
PTAL I added the other ports and implemented the branching in TurboFan.
5 years, 9 months ago (2015-03-09 16:37:03 UTC) #13
Michael Starzinger
LGTM on the TurboFan port, didn't look at the rest.
5 years, 9 months ago (2015-03-09 20:54:06 UTC) #14
Dmitry Lomov (no reviews)
lgtm
5 years, 9 months ago (2015-03-10 10:35:48 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985643003/80001
5 years, 9 months ago (2015-03-10 13:57:51 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 9 months ago (2015-03-10 14:14:37 UTC) #18
commit-bot: I haz the power
5 years, 9 months ago (2015-03-10 14:14:49 UTC) #19
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/8d946b9c3f6ea42dd5232c0529be4d47798b06aa
Cr-Commit-Position: refs/heads/master@{#27106}

Powered by Google App Engine
This is Rietveld 408576698