Proxies and observable spec algorithms

Allen Wirfs-Brock allen at wirfs-brock.com
Sat Apr 14 19:49:57 PDT 2012


It's already the case that the ordering of most [[Put]] and [[Get]] calls in those algotitms are observable. Other internal methods are observable via attribute manipulation side-effects that cause downstream internal methods to throw. 

I don't thing Proxies will make things much worse.  That said, reviews and critiques of existing algorithms are most welcome.

Allen



Sent from my Samsung Galaxy TabDavid Bruant <bruant.d at gmail.com> wrote:Hi,

Today, I came across a test on Firefox test suite [1]. This test
verifies that on the proxy, the traps gets called in the right order
according to the ES5 algorithm of Array.prototype.splice.
Seeing this test made me realize that as soon as proxy gets in the spec
and implemented in web browsers, every single built-in function
algorithm will be observable, so will need to be frozen while before
proxies, they didn't need to (which allowed internal refactorings).

This seems to be the last time major refactorings can be applied to
these algorithms. Are they ready to be frozen?

Maybe it would be worth having tests for this in test262 as an attempt
to ensure interoperability for all these algorithms when used in
combination with proxies?

David

[1]
http://mxr.mozilla.org/mozilla-central/source/js/src/jit-test/tests/basic/splice-check-steps.js
_______________________________________________
es-discuss mailing list
es-discuss at mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120414/5d4d0996/attachment.html>


More information about the es-discuss mailing list