Abstract:
Meta-interpreter-based just-in-time compiler frameworks provide a convenient way for language designers to implement efficient virtual machines. Those frameworks either employ tracing-based or method- (or partial evaluation) based strategies, which have their own pros and cons. This paper proposes an approach to enable both tracing- and method-based compilation so that the runtime can selectively apply an appropriate strategy to different parts of a program. The proposal basically extends a meta-tracing compiler to method-based compilation by roll backing at conditional branches, trace-splitting at loop entries, and not following at function calls. As a proof-of-concept, we implemented a tiny meta-tracing compiler in MinCaml by following the RPython's architecture and extended it to support both tracing- and method-based compilation.
Reference:
Extending a Meta-Tracing Compiler to Mix Method and Tracing Compilation (Yusuke Izawa, Hidehiko Masuhara and Tomoyuki Aotani), In Proceedings of the Workshop on Modern Language Runtimes, Ecosystems, and VMs (MoreVMs'19) in Proceedings of the Conference Companion of the 3rd International Conference on Art, Science, and Engineering of Programming, ACM, 2019.
Bibtex Entry:
@inproceedings{izawa2019morevms,
address = {New York, NY, USA},
publisher = {ACM},
isbn = {978-1-4503-6257-3},
date = {2019-04-02},
location = {Genova, Italy},
series = {Programming '19},
booktitle = {Proceedings of the Workshop on Modern Language Runtimes,
Ecosystems, and VMs (MoreVMs'19) in Proceedings of the
Conference Companion of the 3rd International Conference
on Art, Science, and Engineering of Programming},
author = {Yusuke Izawa and Hidehiko Masuhara and Tomoyuki Aotani},
title = {Extending a Meta-Tracing Compiler to Mix Method and Tracing Compilation},
pages = {5:1--5:3},
articleno = 5,
numpages = 3,
opturl = {http://doi.acm.org/10.1145/3328433.3328439},
doi = {10.1145/3328433.3328439},
acmid = 3328439,
keywords = {RPython, language implementation frameworks, tracing JIT compilation, BacCaml, MinCaml},
pdf = {morevms2019meta-tracing.pdf},
year = 2019,
month = apr,
abstract = {Meta-interpreter-based just-in-time compiler frameworks provide a convenient way for language designers to implement efficient virtual machines. Those frameworks either employ tracing-based or method- (or partial evaluation) based strategies, which have their own pros and cons. This paper proposes an approach to enable both tracing- and method-based compilation so that the runtime can selectively apply an appropriate strategy to different parts of a program. The proposal basically extends a meta-tracing compiler to method-based compilation by roll backing at conditional branches, trace-splitting at loop entries, and not following at function calls. As a proof-of-concept, we implemented a tiny meta-tracing compiler in MinCaml by following the RPython's architecture and extended it to support both tracing- and method-based compilation.}
}