On Tue, Oct 28, 2014 at 10:58 PM, Fabrício Matté <[email protected]> wrote:
> Looks nice, then. `;)` Though, this may not be so easy to implement in other
> languages which don't provide direct access to memory addresses, affecting
> implementations such as Rhino which is written in Java.

Nit: Object properties in Java are passed by reference, not value.
Method behavior is similar. It would still be possible in this case.

>
> Also worth noting that as this can't be implemented in pure ECMAScript,
> polyfilling is impossible. Though, the whole Weak* semantics are very hard
> to implement in pure ECMAScript anyway.
>
> On Wed, Oct 29, 2014 at 12:41 AM, Isiah Meadows <[email protected]> wrote:
>>
>> Actually, the de-opts shouldn't exist, considering it's effective
>> equivalent in C++ would be pretty straightforward (and could be polyfilled
>> in Node literally via native code):
>>
>> ```cpp
>> Handle<JSWeakMap>* createClearedInstance() {
>>   // ...
>> }
>>
>> // ...
>>
>> Handle<JSWeakMap>* wm->inst = createClearedInstance();
>> ```
>>
>> On Oct 28, 2014 10:30 PM, "Fabrício Matté" <[email protected]> wrote:
>>>
>>> > Not in pure ECMAScript being interpreted, but it can definitely be done
>>> > in the implementation.
>>>
>>> Yeah I think so too, but if no where else in the specification uses this
>>> pattern, implementations would be required to implement new mechanisms and
>>> possibly have de-optimizations.
>
>



-- 
Isiah Meadows
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to