Making the compiler interface on-demand driven

I'd think of this as a temporary interface until we get end-to-end incremental queries. It should probably be revisited then.

No. However, this would be possible to do if we had generators with arguments. Currently my branch uses a safe abstraction using macros. It would be a bit cleaner to just yield raw pointers here. I structured the code the way I'd write it in safe code given generator arguments.

We want to destroy the arenas while we have a Compiler type around. The resolver has it's owner arena (in BoxedResolver) that is freed and BoxedGlobalCtxt is freed in the compile method to minimize memory usage.

We want to avoid cloning large structures like the AST, HIR, etc. It also allows code to easily free results of queries by just stealing them.

1 Like