Re:Graal and Truffle could accelerate programming language d...
by qwertyuiop924 on Tuesday July 19, 2016 @09:17PM
(#12126207)
But if the calling and stack semantics are different from Java's (and the kind of have to be), than you can't just merge the ASTs. Ruby, provided you don't implement callcc, is almost, if not entirely identical in calling convention to C. So if truffle supports magical AST merging, as described, I don't think you can implement anything with a different set of conventions to C/Java.
Re:Graal and Truffle could accelerate programming language d...
by qwertyuiop924 on Tuesday July 19, 2016 @10:50PM
(#12126539)
Wait, nevermind. See above.
Now, as you point out, you lose Java interop that way. However, you can imagine using Truffle + Graal to also build a similar interpreter for Java. For interop, your interpreter 'simply' has to merge in the AST for the Java interpreter (with its own 'execute' methods). As I understand it the RubyTruffle project uses a similar trick to do C interop.