Title
High-performance cross-language interoperability in a multi-language runtime
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.
Year
DOI
Venue
2015
10.1145/2816707.2816714
Dynamic Languages Symposium
Keywords
Field
DocType
cross-language,language implementation,language interoperability,optimization,virtual machine
Specification language,Common Intermediate Language,Programming language,Dynamic compilation,Computer science,Theoretical computer science,Compiled language,High-level programming language,Low-level programming language,Programming language implementation,Runtime system
Conference
Volume
Issue
ISSN
51
2
0362-1340
Citations 
PageRank 
References 
9
0.48
25
Authors
5
Name
Order
Citations
PageRank
Matthias Grimmer1636.19
Chris Seaton2945.68
Roland Schatz3858.95
Thomas Würthinger439625.63
Hanspeter Mössenböck578188.17