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.


https://codereview.chromium.org/352173004/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to