MLStyle.jl
MLStyle.jl copied to clipboard
removing `eval` when generating match ASTs
The following uses are trivial to fix. They are only to evaluate the type representation from global scope.
https://github.com/thautwarm/MLStyle.jl/blob/2b7f0a7be19462ea741389266d5c3e04ead21409/src/MatchImpl.jl#L172 https://github.com/thautwarm/MLStyle.jl/blob/2b7f0a7be19462ea741389266d5c3e04ead21409/src/MatchImpl.jl#L215 https://github.com/thautwarm/MLStyle.jl/blob/2b7f0a7be19462ea741389266d5c3e04ead21409/src/MatchImpl.jl#L228 https://github.com/thautwarm/MLStyle.jl/blob/2b7f0a7be19462ea741389266d5c3e04ead21409/src/MatchImpl.jl#L237 https://github.com/thautwarm/MLStyle.jl/blob/2b7f0a7be19462ea741389266d5c3e04ead21409/src/MatchImpl.jl#L241
This one needs to expand macros, so the use here might not get eliminated. The good news is that very few people do AST matching using the pattern @mymacro $(args...), and tasks using MLStyle for codegen in the generated functions will be just fine.
https://github.com/thautwarm/MLStyle.jl/blob/2b7f0a7be19462ea741389266d5c3e04ead21409/src/MatchImpl.jl#L266
static_eval: https://github.com/JuliaLang/julia/blob/master/src/codegen.cpp#L2270