Re: Is `undefined` garabage collectable?

2016-05-04 Thread /#!/JoePea
> The only v8 shell I have lying around is too old (3.14.5.10) to have Set, so I can't tell you what it would do. On my first attempt, I noticed 8 Major GCs: https://cloud.githubusercontent.com/assets/297678/15036715/f41ea4d4-1247-11e6-8823-f153c3c1b7bb.png On second attempt, no Major GCs: https:

Re: Is `undefined` garabage collectable?

2016-05-04 Thread Boris Zbarsky
On 5/4/16 5:03 PM, Steve Fink wrote: The only v8 shell I have lying around is too old (3.14.5.10) to have Set, so I can't tell you what it would do. I have v8 "4.8.0 (candidate)" (meaning whatever rev I checked out), and it does 1163 minor ("Scavenge") GCs on your testcase. It also does 1163

Re: Is `undefined` garabage collectable?

2016-05-04 Thread Steve Fink
On 05/04/2016 01:43 PM, /#!/JoePea wrote: For example, I have some code that uses a Map just to keep a collection of things (the keys) but values are not important, so they are undefined, like this: ```js let something = {} let otherThing = {} let m = new Map m.set(something) m.set( ​ otherTh

Is `undefined` garabage collectable?

2016-05-04 Thread /#!/JoePea
For example, I have some code that uses a Map just to keep a collection of things (the keys) but values are not important, so they are undefined, like this: ```js let something = {} let otherThing = {} let m = new Map m.set(something) m.set( ​otherThing​ ) ``` where the values for those object k

Re: Adding a non-class-syntax method for subclassing native objects

2016-05-04 Thread Allen Wirfs-Brock
> On May 3, 2016, at 8:01 PM, Michael Theriot > wrote: > > I believe you can do this with `Reflect.construct`. > > ```js > function SubArray(arg1) { > return Reflect.construct(Array, arguments, SubArray); this should probably be: return Reflect.construct(Array, arguments, new.target); If y