JuliaInterpreter.jl icon indicating copy to clipboard operation
JuliaInterpreter.jl copied to clipboard

Proposal: run all ccall/llvmcall functions in Compiled mode

Open timholy opened this issue 4 years ago • 2 comments
trafficstars

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:?

timholy avatar Dec 17 '20 12:12 timholy

Any way to run ccall with JuliaInterpretter? Such that we can use ccall with julia --compile=no

VarLad avatar Nov 17 '21 14:11 VarLad

No, JuliaInterpreter ends up asking the Julia compiler to run the ccall: https://github.com/JuliaDebug/JuliaInterpreter.jl/blob/19757b45fa438cf8335601099a21525a88c9bb39/src/optimize.jl#L386.

KristofferC avatar Nov 17 '21 14:11 KristofferC