Affiliation:
1. Australian National University and Data61
2. Trustworthy Systems Group, Data61, CSIRO, Australia
Abstract
On-stack replacement (OSR) is a performance-critical technology for many languages, especially dynamic languages. Conventional wisdom, apparent in JavaScript engines such as V8 and SpiderMonkey, is that OSR must be implemented in a low-level (i.e., in assembly) and language-specific way.
This paper presents an OSR abstraction based on Swapstack, materialized as the API for a low-level virtual machine, and shows how the abstraction of resumption protocols facilitates an elegant implementation of this API on real hardware. Using an experimental JavaScript implementation, we demonstrate that this API enables the language implementation to perform OSR without the need to deal with machine-level details. We also show that the API itself is implementable on concrete hardware. This work helps crystallize OSR abstractions and, by providing a reusable implementation, brings OSR within reach for more language implementers.
Funder
China Scholarship Council
National Science Foundation
Australian Search Council
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
2 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. On-stack replacement for program generators and source-to-source compilers;Proceedings of the 20th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences;2021-10-17
2. Adaptive Level Binning;Proceedings of the International Conference on High Performance Computing in Asia-Pacific Region;2020-01-15