-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use database of partial paths to speed up bindings resolution #1198
Use database of partial paths to speed up bindings resolution #1198
Conversation
This results in some references being resolved to many ambiguous definitions, some of which we were able to resolve via ranking.
…assertions to snapshots
Most remaining assertion tests were redundant as there were already snapshots that cover those cases.
This also removes the ranking algorithm for resolution results, since it's no longer needed.
…attributes This *should* make it easier to construct a partial paths databases in which these nodes are endpoints.
|
5d3a2e6
to
156722b
Compare
crates/codegen/runtime/cargo/wasm/src/runtime/wrappers/bindings/mod.rs
Outdated
Show resolved
Hide resolved
This uses the added `save_checkpoint`/`restore_checkpoint` which rewind the allocation pointer in the `PartialPaths` arenas. For this to work properly, we also first `ensure_both_directions` in the database so that after that it doesn't need further mutation.
The database resolver will resolve all references at once by using a database of minimal partial paths.
… the `BindingGraph`
This makes it impossible to try to access definitions/references before resolving, and allows dropping the entire stack graph and database of partial paths used for resolution after they are no longer necessary.
15f35da
to
8c55602
Compare
After #1195 is merged, I'll rebase this PR and the conflicts should be resolved. |
…records The `definitions` test name is now a bit misleading since no definitions are retrieved there, but it's still where user source files are ingested.
Replaced by #1204 |
Rebasing #1198 on latest after #1195 was merged. --------- Co-authored-by: Gustavo Giráldez <[email protected]>
Builds on top of #1195
Definition
andReference
to hold aRc<>
to theBindingGraph
as opposed to a normal reference. This should allow easier integration with WASM since there are already wrappers for ref counted objects.BindingGraph
and splint off aBindingGraphBuilder
in which to add user files and built-ins and then callresolve()
which will consume the builder and return a leanerBindingGraph
with all bindings resolved.stack-graphs
which adds the ability to rewind the arena allocator used for partial paths after resolving each reference, but still allows using the default database to hold the set of minimal partial paths.