tshort / StaticCompiler.jl

Compiles Julia code to a standalone library (experimental)
Other
490 stars 31 forks source link

codegen-norecursion has merged #28

Closed MasonProtter closed 3 years ago

MasonProtter commented 4 years ago

https://github.com/JuliaLang/julia/pull/25984 has merged into master so the note in the readme about it should probably be updated, especially because the link is now dead.

Does anything here need to change to support recursion or should StaticCompiler now support recursion on the julia master branch?

tshort commented 4 years ago

StaticCompiler needs to change. It's a welcome change, because we'll (hopefully) be able to compile more code.

tshort commented 4 years ago

For reference, see the comparable changes needed in CUDAnative: https://github.com/JuliaGPU/CUDAnative.jl/pull/162

tshort commented 4 years ago

I've started a branch to adapt to Julia's codegen-restructuring changes:

With the changes, StaticCompiler has several issues I'm stuck on. These are:

tshort commented 4 years ago

It's a depressing amount of issues.

aminya commented 4 years ago

Does LLVM.jl need to change to accomodate the latest update? I think some of these are related to LLVM.jl.

tshort commented 4 years ago

Not that I'm aware of. CUDAnative changes have merged.

tshort commented 4 years ago

I figured out one of the issues. To create a blank.ji file, the following works:

ccall(:jl_save_incremental, Cint, (Cstring, Array), "blank.ji", [])

It's a small thing, but it's nice to finally push the ball forward a little bit.

tshort commented 4 years ago

Spoke too soon. It creates a blank.ji, but jl_init_with_image fails to finish with that file, so it must need more content than that.