4 ms·
Related: the Futamura projections https://en.wikipedia.org/wiki/Partial_evaluation#Futamura_projections https://en.wikipedia.org/wiki/Partial_evaluation#Futamu
by duped 3y ago
Related: the Futamura projections
https://en.wikipedia.org/wiki/Partial_evaluation#Futamura_projections https://en.wikipedia.org/wiki/Partial_evaluation#Futamura_pr...
- rightbyte 3y agoYe well my head went spinning reading that. Does such a "compiler factory" exist?
- duped 3y agoYes, this is what Truffle is all about (1). You use Truffle to write the AST interpreter for your language and then GraalVM uses it to compile a JIT compiler for you automatically, with the bonus of interop with other languages. (1) https://www.graalvm.org/latest/graalvm-as-a-platform/language-implementation-framework/HostOptimization/ https://www.graalvm.org/latest/graalvm-as-a-platform/languag...
- mikmoila 3y agoWasn't it so that as Graal jitter is written in Java, Truffle can easily call it by using ordinary Java api? By the way there's an excellent series of articles about implementing an interpreter with Truffle by Adam Ruka: https://www.endoflineblog.com/graal-truffle-tutorial-part-12-classes-1-methods-new https://www.endoflineblog.com/graal-truffle-tutorial-part-12...
- mikmoila 3y agoGood point, isn't this the partial compilation?