Implement new allocator and support garbage collection #4994
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
enhancement
New feature or request
For supporting long-term compilation sessions (for LSP use) we want to support garbage collecting the engines.
Right now this is not possible due to our current slab allocator not supporting removing previously allocated ids.
We should re-implement the slab allocator using either an optimized slot map, or the buddy allocator algorithm.
(Tests using a slotmap crate based implementation proved to be 15-20% slower than the current allocator.)
Additionally we can move to a multiple allocator model, where we setup a slab per module, and allow cross-linking of type/decl ids.
This will also allow for easier incremental compilation as well as less transient caching due to a more straight forward cache serialization.
The text was updated successfully, but these errors were encountered: