This PR fixes the compilation of structure projections with unboxed arguments marked `extern`, adding missing `dec` instructions. It led to leaking single allocations when such functions were used as closures or in the interpreter. This is the minimal working fix; `extern` should not replicate parts of the compilation pipeline, which will be possible via #10291.
9 lines
228 B
Text
9 lines
228 B
Text
module
|
|
|
|
/-! Applying `[extern]` to a projection should insert necessary `dec`s in `_boxed`. -/
|
|
|
|
structure Foo where
|
|
bar : UInt64 → UInt64
|
|
|
|
set_option trace.compiler.ir.result true
|
|
attribute [extern "does_not_exist"] Foo.bar
|