julia
53300647 - juliac: Add basic `finalizer` support

Commit
1 year ago
juliac: Add basic `finalizer` support This implementation is fairly sloppy (and also limited), but it's sufficient to get the finalizer functions for I/O implemented and working, which is pretty important to make sure that files get closed, etc. For a proper implementation later, we probably want to move the method lookup to type-inference and have it emit a `Core.finalizer_invoke` intrinsic for us to use in codegen, which would allow us to handle more cases where e.g. `inlining` would like to union-split the finalizer invoke or the target function has a single method that covers us. `atexit()` will likely need a similar trick to "lift" the dispatch that it defers too.
Author
Committer
Parents
Loading