Removal of WeakMap/WeakSet clear

C. Scott Ananian ecmascript at cscott.net
Thu Dec 4 10:23:09 PST 2014


On Thu, Dec 4, 2014 at 9:25 AM, Katelyn Gadd <kg at luminance.org> wrote:

> The only way I can imagine to solve
> this is to make really aggressive use of type information gathering
> and/or bailouts in the runtime to identify every type used as a
> weakmap key - at which point I suppose you would have to convert their
> memory layout on the heap in order to ensure consistency, or support
> two different memory layouts for the same type.
>

Yup, this is how it's done.

In JavaScript every object can have new properties added to it at arbitrary
times.
http://jayconrod.com/posts/52/a-tour-of-v8-object-representation
 --scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141204/0db08627/attachment.html>


More information about the es-discuss mailing list