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

Issue 352173004: Relax object literal checking to follow ES6 (Closed)

Created:
6 years, 6 months ago by wingo
Modified:
5 years, 7 months ago
Reviewers:
rossberg, marja
CC:
v8-dev, Michael Starzinger
Visibility:
Public.

Description

Relax object literal checking to follow ES6 R=marja@chromium.org, rossberg@chromium.org BUG=

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -177 lines) Patch
M src/ast.cc View 1 chunk +125 lines, -9 lines 0 comments Download
M src/preparser.h View 5 chunks +0 lines, -71 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 chunk +27 lines, -35 lines 0 comments Download
M test/cctest/test-parsing.cc View 2 chunks +25 lines, -10 lines 0 comments Download
M test/mjsunit/strict-mode.js View 1 chunk +43 lines, -44 lines 0 comments Download
M test/preparser/duplicate-property.pyt View 3 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
wingo
PTAL; an early RFC patch for comments. Some more tests are needed for accessor/data duplicate ...
6 years, 6 months ago (2014-06-25 16:08:37 UTC) #1
rossberg
On 2014/06/25 16:08:37, wingo wrote: > PTAL; an early RFC patch for comments. Some more ...
6 years, 6 months ago (2014-06-26 15:55:12 UTC) #2
wingo
On 2014/06/26 15:55:12, rossberg wrote: > On 2014/06/25 16:08:37, wingo wrote: > > PTAL; an ...
6 years, 5 months ago (2014-07-02 13:39:38 UTC) #3
wingo
On 2014/07/02 13:39:38, wingo wrote: > verbose) way to answer these questions once in a ...
6 years, 5 months ago (2014-07-02 14:06:21 UTC) #4
rossberg
On 2014/07/02 13:39:38, wingo wrote: > On 2014/06/26 15:55:12, rossberg wrote: > > On 2014/06/25 ...
6 years, 5 months ago (2014-07-02 14:08:26 UTC) #5
wingo
6 years, 5 months ago (2014-07-02 15:11:05 UTC) #6
On 2014/07/02 14:08:26, rossberg wrote:
> On 2014/07/02 13:39:38, wingo wrote:
> >   ({ get foo() { 42 }, foo: 10, set foo(x) { ... } })
> 
> My understanding of the proposed semantics is simple left-to-right calls of
> DefineProperty

Interesting, I didn't realize that Object.defineProperty(o, 'foo', { get: fn })
would inherit the corresponding setter.  Thanks for pointing that out.

> I had hoped that this would be easy to achieve by skipping boilerplates and
> instead dumbly calling the appropriate runtime functions in order for any
object
> literal where we cannot statically determine the property names or their
> disjointness.
> 
> But I may be convinced otherwise. :)

Sure; I'll give it another go.

> >   ({ get __proto__() { 42 }, __proto__: 10, set __proto__(x) { ... } })
> > 
> > Clearly the __proto__:10 sets the [[Prototype]].  But does it have a getter?

> 
> Yeah, this one is uglier, but I would extrapolate that the magic __proto__
value
> property is treated specially and simply filtered out of the sequence of
regular
> properties. So the object would have both getter and setter.

OK, sounds fine to me.

Powered by Google App Engine
This is Rietveld 408576698