-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vars #269
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Def::true_var -> Def::has_var Also better semantics: Only returns sth if var has ever been created.
* FE: version bump
This reverts commit bd5449c.
* added World::verify * assert in Def::make_external * updated docs * assert if trying to rebuild a mutable * bugfix in cps2ds.cpp * disabled a regression: direct/ad_mem.thorin -> direct/ad_mem.thorin.disabled2 This is a bug in cps2ds.cpp itself that just materializes now with the new debug code.
@fodinabor, @NeuralCoder3 bump |
NeuralCoder3
approved these changes
Apr 3, 2024
* also give Def::stub the same treatement as Def::rebuild
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is sth I wanted to do for years, but I never really figured out how to do that exactly:
I want to get rid of
thorin::Scope
and, instead, work with free Vars. This is a major milestone with the new subsystem working but the old stuff is still in place - although I've already ported some of it. So, expect more PRs to come.Def::local_muts()
/Def::local_vars()
areVar
s/mutables reachable by following immutableDef::extended_ops()
.Def::local_muts()
/Def::local_vars()
are cached and hash-consed.Def::free_vars()
compute a global solution, i.e., by transitively following mutables as well.Def::free_vars()
are computed on demand and cached.They will be transitively invalidated by following
fv_consumers()
, if a mutable is mutated.Def::is_closed()
/Def::is_open()
to check whether aDef
contains free vars.Change log
ScopeRewriter
in favor of newfree_var
-basedVarRewriter
rewrite
interfacePooledSet
andPool
to hash-cons and arena-allocate setscps2ds.cpp
but one issue remains (cps2ds sometimes introduces ownerless Vars #271)Future directions
thorin::Scope