polyglot-compiler / JLang

JLang: Ahead-of-time compilation of Java programs to LLVM
http://polyglot-compiler.github.io/JLang/
Other
284 stars 29 forks source link

Update the polyglot of JLang to the latest version 2.8.0 #81

Closed ljcppp closed 11 months ago

ljcppp commented 1 year ago

Is it easy to update the polyglot of JLang to 2.8.0? I'm working with JLang for some project which meets some lambda calculus in the program. I find these features are supported by Polyglot 2.8.0. So I want to know is it easy to update the polyglot of JLang by myself.

andrewcmyers commented 1 year ago

I don't think it should be difficult, but @dz333 would know better than I.

dz333 commented 1 year ago

I think the main effort would involve including support for the new language features (i.e., Lambdas) in JLang. Swapping out the polyglot versions should be only a small amount of work -- but if you want to compile lambdas then we would need to update JLang to translate them to LLVM.

andrewcmyers commented 1 year ago

Actually, the new version of the compiler supports translating lambda expressions into classes, so it should not be necessary to add an LLVM translation of lambdas. On the other hand, there is probably some opportunity in doing so to make lambdas more efficient than the usual inner class translation.