JuliaLang / AllocCheck.jl

AllocCheck
Other
209 stars 8 forks source link

design of `@check_allocs` for static compilation #63

Open JeffBezanson opened 8 months ago

JeffBezanson commented 8 months ago

The way @check_allocs currently works is unintuitive, since it is a static analysis but requires you to actually call the function. Of course we need that to pick up actual argument types, and it works ok for running tests, but we will need something that is compatible with a static compilation workflow. For example, a macro that records the method in a list somewhere, and then if you compile the code with PackageCompiler or StaticCompiler it calls check_allocs on all specializations to report errors before generating the output. We can use this issue to hash out exactly how it should work.