Affiliation:
1. JKU Linz, Austria
2. Oracle Labs, UK
3. Oracle Labs, Austria
4. Oracle Labs, Switzerland
Abstract
Programmers combine different programming languages because it allows them to use the most suitable language for a given problem, to gradually migrate existing projects from one language to another, or to reuse existing source code. However, existing cross-language mechanisms suffer from complex interfaces, insufficient flexibility, or poor performance. We present the TruffleVM, a multi-language runtime that allows composing different language implementations in a seamless way. It reduces the amount of required boiler-plate code to a minimum by allowing programmers to access foreign functions or objects by using the notation of the host language. We compose language implementations that translate source code to an intermediate representation (IR), which is executed on top of a shared runtime system. Language implementations use language-independent messages that the runtime resolves at their first execution by transforming them to efficient foreign-language-specific operations. The TruffleVM avoids conversion or marshaling of foreign objects at the language boundary and allows the dynamic compiler to perform its optimizations across language boundaries, which guarantees high performance. This paper presents an implementation of our ideas based on the Truffle system and its guest language implementations JavaScript, Ruby, and C.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
10 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. SecV;Proceedings of the 24th International Middleware Conference on ZZZ;2023-11-27
2. Polyglot AST: Towards Enabling Polyglot Code Analysis;2023 27th International Conference on Engineering of Complex Computer Systems (ICECCS);2023-06-14
3. DynQ: a dynamic query engine with query-reuse capabilities embedded in a polyglot runtime;The VLDB Journal;2023-03-13
4. A Multi-threaded Fast Hardware Compiler for HDLs;Proceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction;2023-02-17
5. Babelfish;Proceedings of the VLDB Endowment;2021-10