Graal.js: JavaScript on Graal and Truffle

OVERVIEW

  • Truffle is a multi-language interpreter framework. It is part of the GraalVM. The Truffle API allows implementing interpreters for a large variety of languages, that can then be executed on top of the JVM. Applying partial evaluation allows to compile the interpreted guest-language program to high-performance machine code.

    Based on Truffle, an ECMAScript 6 (or ECMAScript 2015) compliant JavaScript engine is developed. Implementing it as Truffle-based AST interpreter guarantees easy maintainability and adaptability. It allows Oracle Labs to conduct further research on a complete language implementation. Current research directions include parallelization, language interoperability any simplification of interpreter/compiler implementation.

    Using the Graal compiler, Truffle/JavaScript can reach and potentially surpass the performance of current leading JavaScript engines.