Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
review: question about when cleanup is allowed #115
(editor review per #110)
For example, https://tc39.github.io/proposal-weakrefs/#sec-weakmap:
Re the last one - it occurs to me that an alternative reading of that is "if all references to a ECMAScript object are from a [[Target]] (field or internal slot),", in which case I'd be confused why both terms are used.
Related discussion: #105
To summarize that thread: @syg, @erights and I seem to agree that we want somewhat weaker guarantees than this sentence currently implies; it's unclear exactly how the guarantee should be worded, but as long as we have a general agreement on direction, we're OK with settling on the final wording during Stage 3.
WeakMaps are defined in terms of internal slots, so I'm not sure what you're getting at. Yes, [[Target]] is written thinking about WeakRefs, but nothing else uses that internal slot name, so it seems equivalent.
As discussed there, the "or internal slot" is just wrong and should be removed. This is independent of the issue of how to allow more collection than naive spec reachability. However we solve that, it'll treat internal slots and other forms of explicit strong pointing (variables, properties) equivalently.