Cant push! JuliaInterpreter.compiled_methods

As the name indicates, you should push methods, not functions. This works:

julia> using JuliaInterpreter

julia> function println_(x)
           println(x)
       end;

julia> m = which(println_, (Any,))
println_(x) in Main at REPL[2]:2

julia> push!(JuliaInterpreter.compiled_methods, m)

See also PSA: how to quote code with backticks

2 Likes