On 21 December 2012 03:00, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
On Dec 20, 2012, at 12:07 PM, Tom Van Cutsem wrote:
I'm not sure I follow. In my understanding, the original Receiver is only
needed for traps that involve prototype-chain walking and are thus
|this|-sensitive. That
2012/12/21 Allen Wirfs-Brock al...@wirfs-brock.com
On Dec 20, 2012, at 12:07 PM, Tom Van Cutsem wrote:
2012/12/20 Allen Wirfs-Brock al...@wirfs-brock.com
On Dec 20, 2012, at 2:21 AM, Tom Van Cutsem wrote:
If target.baz is a writable data property
proxy.baz = 42 will eventually call
On Dec 21, 2012, at 5:15 AM, Andreas Rossberg wrote:
On 21 December 2012 03:00, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
On Dec 20, 2012, at 12:07 PM, Tom Van Cutsem wrote:
I'm not sure I follow. In my understanding, the original Receiver is only
needed for traps that involve
On Dec 21, 2012, at 7:01 AM, Tom Van Cutsem wrote:
2012/12/21 Allen Wirfs-Brock al...@wirfs-brock.com
On Dec 20, 2012, at 12:07 PM, Tom Van Cutsem wrote:
2012/12/20 Allen Wirfs-Brock al...@wirfs-brock.com
On Dec 20, 2012, at 2:21 AM, Tom Van Cutsem wrote:
If target.baz is a writable
2012/12/21 Allen Wirfs-Brock al...@wirfs-brock.com
On Dec 21, 2012, at 7:01 AM, Tom Van Cutsem wrote:
I think that with the provision of the Handler API, we provide Proxy
authors with the same benefits than if we would add delegation to the ES6
built-ins, without any required changes to
[+jwalden]
2012/12/19 Allen Wirfs-Brock al...@wirfs-brock.com
Consider:
let target = {foo() {return this}};
let proxy = Proxy(target, {});
As currently spec'ed. proxy.foo() is going to return proxy rather than
target.
That's because, proxy.foo evaluates to a Reference whose base is
2012/12/19 Allen Wirfs-Brock al...@wirfs-brock.com
If we make the Option A change that seems right for [[GetP]]/[[SetP]]
then we will have an inconsistency between the this value used for a method
invoked as proxy.foo() and a accessor invoked as proxy.bar
To clarify, if we apply the fix to
On 20 December 2012 11:09, Tom Van Cutsem tomvc...@gmail.com wrote:
Currently, that test is performed in step 5.b. by testing whether the
current object we are visiting in the proto chain O is the Receiver
object. At first sight, this is a rather weird way of deciding between
update vs.
Le 20/12/2012 11:09, Tom Van Cutsem a écrit :
(...)
The right fix (at least, it feels like the obvious right fix to me),
is not to test whether O === Receiver, but rather just let the
algorithm explicitly test whether the Receiver object already defines
an own property with key P, to decide
2012/12/20 Andreas Rossberg rossb...@google.com
On 20 December 2012 11:09, Tom Van Cutsem tomvc...@gmail.com wrote:
Currently, that test is performed in step 5.b. by testing whether the
current object we are visiting in the proto chain O is the Receiver
object. At first sight, this is a
On Dec 20, 2012, at 2:21 AM, Tom Van Cutsem wrote:
2012/12/19 Allen Wirfs-Brock al...@wirfs-brock.com
If we make the Option A change that seems right for [[GetP]]/[[SetP]] then
we will have an inconsistency between the this value used for a method
invoked as proxy.foo() and a accessor
2012/12/20 Allen Wirfs-Brock al...@wirfs-brock.com
On Dec 20, 2012, at 2:21 AM, Tom Van Cutsem wrote:
If target.baz is a writable data property
proxy.baz = 42 will eventually call Object.defineProperty(proxy, 'baz',
{value:42})
(and *not* Object.defineProperty(proxy, 'baz',
2012/12/20 Allen Wirfs-Brock al...@wirfs-brock.com
Yes, here is the new step 5 as I have just updated it in my spec. draft
(ignore the 1, it's really 5)
1. If IsDataDescriptor(*ownDesc*) is *true*, then
1. If *ownDesc*.[[Writable]] is *false*, return *false*.
2. If
On Dec 20, 2012, at 12:12 PM, Tom Van Cutsem wrote:
2012/12/20 Allen Wirfs-Brock al...@wirfs-brock.com
Yes, here is the new step 5 as I have just updated it in my spec. draft
(ignore the 1, it's really 5)
If IsDataDescriptor(ownDesc) is true, then
If ownDesc.[[Writable]] is false, return
On Dec 20, 2012, at 12:07 PM, Tom Van Cutsem wrote:
2012/12/20 Allen Wirfs-Brock al...@wirfs-brock.com
On Dec 20, 2012, at 2:21 AM, Tom Van Cutsem wrote:
If target.baz is a writable data property
proxy.baz = 42 will eventually call Object.defineProperty(proxy, 'baz',
{value:42})
(and
On 18 December 2012 22:56, Tom Van Cutsem tomvc...@gmail.com wrote:
Option B:
Address point 2) directly by changing the test that determines property
addition versus property update inside Reflect.set (i.e. the [[SetP]]
internal method of objects) so that the algorithm no longer tests whether
2012/12/19 Allen Wirfs-Brock al...@wirfs-brock.com
I think it has to be A, for consistency with [[Call]]. Note that when
[[Call]] is directly forwarded to the target, the this value is set to
target. It wouldn't be self-consistent if directly forwarded foo.access and
foo.method() invocations
2012/12/19 Andreas Rossberg rossb...@google.com
So it has to be A. (Or the definition of Reflect.set has to change. I
don't have much love for the case distinction in there anyway. But it's
probably a necessary consequence of the somewhat incoherent property
assignment model we are stuck
On Dec 19, 2012, at 2:01 AM, Tom Van Cutsem wrote:
2012/12/19 Allen Wirfs-Brock al...@wirfs-brock.com
I think it has to be A, for consistency with [[Call]]. Note that when
[[Call]] is directly forwarded to the target, the this value is set to
target. It wouldn't be self-consistent if
Andrea Giammarchi has pointed out in the past that it's not possible to
fully shim __noSuchMethod__ because of this same issue. Perhaps introducing
a [[CallProperty]] is not such a bad idea.
On Wednesday, December 19, 2012, Allen Wirfs-Brock wrote:
I'm not sure there is an easy fix that
Hi,
Someone recently reported an issue [1] while using my harmony-reflect shim
for direct proxies. The fix probably requires a change in the proxy
specification. I'm unsure how to resolve it, so I thought I'd bring it to
the list.
The issue is as follows:
consider a proxy with an empty handler:
I think it has to be A, for consistency with [[Call]]. Note that when [[Call]]
is directly forwarded to the target, the this value is set to target. It
wouldn't be self-consistent if directly forwarded foo.access and foo.method()
invocations used different this values.
I assume that by proxy
22 matches
Mail list logo