Code Generation and JIT
sirinath opened this issue · 5 comments
Have the ability to have multistage programming with code generation, JITing or compiling.
Right now, Passerine runs on a bytecode interpreter written in Rust. I think that JIT/compilation are a good idea, but because we haven't yet implemented a HM type system, it's currently not possible to monomorphize functions and emit low-level code. I think a nice first step in this direction would be compiling to Wasm.
This is a big ask, and a bit out of scope at the moment. Because of this, I'm closing this issue for now - if you have any particular ideas on what the JIT pipeline would look like for Passerine specifically, please share. Otherwise, we can reopen this issue for discussion when JIT/codegen becomes more of a possibility.
I think the following are worth while pursuing:
Thanks for the further comment. I've had a discussion with some other Core Team Members, and I think JIT is something worth pursuing - for this reason I'm reopening this issue :D
What I had in might was not just code generation but Multi-stage programming (MSP) with Lightweight Modular Staging (LMS). The code generated would be typed assembly language (TAL) and/or Proof-carrying code (PCC)