[WIP] Adding in fragmentary Decl Cache #1396
Draft
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.
I'm testing a Cache scheme that allows us to cache individual Decls. The idea is that when we transpile we cache most of the compiled Decls to be used on the next build. Since it looks the decl up with a unique full name (I still need to filter out non-unique names that might occur) this will pick out the decls on creating. If a decl isn't defined, then it is generated. The ast.Files for the sources are also cached so that type checking and instantiation of generics still work as before.
It may be possible in the future to add templated/stencil decls for generics but for now we can skip caching decls for specific decls, specifically those which came from generics definitions.