julia
0934373b - optimizer: early `finalize` insertion

Commit
1 year ago
optimizer: early `finalize` insertion Currently, in the finalizer inlining pass, if not all the code between the finalizer registration and the end of the object’s lifetime (i.e., where the finalizer would be inlined) is marked as `:nothrow`, it simply bails out. However, even in such cases, we can insert a `finalize` call at the end of the object’s lifetime, allowing us to call the finalizer early if no exceptions occur. This commit implements this optimization. To do so, it also moves `finalize` to `Core`, so the compiler can handle it directly.
Author
Committer
Parents
Loading