On Wed, Nov 21, 2012 at 12:42 PM, Tom Van Cutsem <[email protected]> wrote:
> 2012/11/21 Mark S. Miller <[email protected]> > > On Wed, Nov 21, 2012 at 8:55 AM, Allen Wirfs-Brock >> <[email protected]> wrote: >> > [...] Essentially we could internally turn the [[Extensible]] internal >> property into a four state value: open,non-extensible,sealed,frozen. [...] >> > [...] > If JS objects could be in only one of four states, things would be a lot > simpler to reason about. That said, I don't see how we can get there > without radically breaking with ES5's view of object invariants. > Why can't an implementation cache the knowledge that an object is frozen (after Object.freeze or after a full pattern-check) exactly as if the fourth state exists, and get the efficiency benefit (but not the observability-of-the-test-on-a-proxy benefit) without changing the ES5 model?
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

