TY - JOUR
T1 - Hop, Skip, & Jump: Practical On-Stack Replacement for a Cross-Platform Language-Neutral VM
AU - Wang, Kunshan
AU - Blackburn, Stephen M.
AU - Hosking, Antony L.
AU - Norrish, Michael
N1 - Publisher Copyright:
© 2018 Copyright held by the owner/author(s).
PY - 2018/3/25
Y1 - 2018/3/25
N2 - 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.
AB - 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.
KW - Feedback-directed optimization
KW - Language implementation
KW - On-stack replacement
KW - Swapstack
UR - http://www.scopus.com/inward/record.url?scp=85084749605&partnerID=8YFLogxK
U2 - 10.1145/3186411.3186412
DO - 10.1145/3186411.3186412
M3 - Article
SN - 1523-2867
VL - 53
JO - ACM SIGPLAN Notices
JF - ACM SIGPLAN Notices
IS - 3
T2 - 14th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments, VEE 2018
Y2 - 25 March 2018 through 25 March 2018
ER -