4 ms·
> I believe both Truffle and byteocde are then represented as internal Graal ASTs. I hope Graal converts both JVM bytecode and Truffle ASTs directly into an in
by KMag 11y ago
> I believe both Truffle and byteocde are then represented as internal Graal ASTs.
I hope Graal converts both JVM bytecode and Truffle ASTs directly into an internal SSA form, without first building an AST from JVM bytecode.
Actually, come to think of it, if I were a Graal author, I'd be tempted to have a JVM bytecode interpreter, two non-optimizing Wirth-style compilers that emitted native code directly from JVM bytecode and Truffle ASTs, two middle-ends that generated SSA from JVM bytecode and Truffle ASTs, and an optimizing SSA-based native code back-end.
> I don't know how useful it would be because I think Truffle has an interpreter fallback.
Every Truffle AST node contains Java code for evaluating that node, so a tree-walking interpreter is trivial.