linear-time weak-map gc
dherman at mozilla.com
Sun Mar 20 08:24:32 PDT 2011
Come to think of it, evaluating implementations for proper tail calls is a little easier, at least in implementations with fixed-size stacks and stack overflow exceptions. I'm not quite sure how you write weak map tests that check memory consumption, unless implementations expose heap size measurements. (They'd be especially hard to automate, but I'd rather have the ability to test manually than none at all.)
Anyone have experience with this from, say, the JVM and its weak references?
On Mar 20, 2011, at 8:20 AM, David Herman wrote:
>> It's weird, though--specifying anything about WeakMap reachability at
>> all is a lot like specifying proper tail calls: it's hard to say what
>> you mean without being a lot more concrete about the abstract machine
>> the language runs on than you would be otherwise. The real requirement
>> is simply that the WeakMap not observably consume space for entries
>> that can't be queried. Maybe we could just say that.
> Yeah. The perfect is the enemy of the good when it comes to specifying these kinds of features. We don't have a formal semantics for the rest of the language anyway, so we shouldn't be aiming for a formal cost model, too. Instead I think we need a combination of as-precise-as-reasonably-possible informal English in the spec with the best tests we can come up with for evaluating implementations.
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss