Get rid of memoizing delay + switch to a strict store #1949
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1948; see that issue for a much more in-depth discussion.
Depends on merging #1928 first.
A lot of this PR consists in deleting code that is either (1) ugly or (2) overly clever! 🥳
The short version is that the
Store
used to incorporate some laziness + memoization: when a cell was first allocated, it was an unevaluated thunk; it then got evaluated the first time it was referenced. However, this wasn't really needed to handle recursive definitions (which is the only thing we were using it for). Getting rid of it means we can get rid of a lot of weird ugly code needed to wrap free variables in extra calls toforce
and so on.The new and improved
Store
just storesValue
s, period. A specialVBlackhole
value was added, to be used while evaluating a recursivelet
.Note that
VRef
is no longer really used, but I left it there for use in implementing #1660 . Once we have mutable references we can use them + delay/force to implement lazy cells.