JuliaInterpreter.jl
JuliaInterpreter.jl copied to clipboard
Proposal: run all ccall/llvmcall functions in Compiled mode
Most of the remaining bugs seem to have to do with ccall and llvmcall. Here's a daring proposal: when we're constructing the framecode, what if we scan it and return Compiled() whenever we detect a :foreigncall or :llvmcall? That's basically just giving up on our optimizations that snip these out into separate functions; instead it says that any method that contains a ccall in it is one you can't step into.
Obviously this will reduce the number of methods accessible to JuliaInterpreter, but I've not noticed much of a chorus of "I can't step into this function" for the list of things we've added to compiled_methods. Of course this would expand them a lot, but :shrug:?
Any way to run ccall with JuliaInterpretter?
Such that we can use ccall with julia --compile=no
No, JuliaInterpreter ends up asking the Julia compiler to run the ccall: https://github.com/JuliaDebug/JuliaInterpreter.jl/blob/19757b45fa438cf8335601099a21525a88c9bb39/src/optimize.jl#L386.