On 2/4/14 7:02 AM, Boris Zbarsky wrote:
On 2/4/14 1:37 AM, Chris Peterson wrote:
Jeff, regarding proxies and JSClass

Note that we're currently sort of moving in the opposite direction: we
just gave proxies distinct JSClasses.

The goal is to unify the two concepts into one, called "proxy", where the concept of a proxy is basically a suite of hooks for association with some kinds of object. Distinct JSClasses for proxies is not in opposition to this except in name. But naming's easy to fiddle with once we have the concept down correctly.

More importantly, currently "proxy" implies all sorts of behaviors
lumped into one, starting with "no shape and we'll deoptimize the heck
out of you".  In practice, we commonly want _some_ special behaviors
(e.g. addProperty) without needing the full flexibility (and hence
slowness) of proxies.

If the idea is to make it simpler to declare objects that only have some
subset of custom behavior (custom name, custom addProperty, custom
finalize hook) without having to customize everything, then I'm all for
that.  JSClass gives us that today.  Proxies do not, as they stand.

Yes, this is what we want.

Jeff
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to