On 1 July 2015 at 17:12, Domenic Denicola <[email protected]> wrote: > Similarly, for several V8 built-ins, private state is not done via the > allocator at all, but instead via "private symbols" that act quite similar > to data properties. They can be added or removed at any time. In short, > they're much more part of initialization than of allocation. >
For the record, the ability to do this is rather an incidental consequence of private symbols. We don't remove private state anywhere, nor did I intend it to be used that way. There is one case where we add a private field dynamically (attaching a stack trace to a thrown object), but that is a half-broken hack anyway. I'd love to have a proper allocation-time notion of private state, like Allen & Kevin suggest. You still have weak maps for more dynamic relations. /Andreas
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

