Skip to main content

TS

Hop, skip, & jump: Practical on-stack replacement for a cross-platform language-neutral VM

Authors

Kunshan Wang, Stephen Blackburn, Tony Hosking and Michael Norrish

DATA61

Australian National University

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.

BibTeX Entry

  @inproceedings{Wang_BHN_18,
    publisher        = {ACM},
    doi              = {10.1145/3186411.3186412},
    isbn             = {978-1-4503-55},
    booktitle        = {Virtual Execution Environments},
    author           = {Wang, Kunshan and Blackburn, Stephen and Hosking, Tony and Norrish, Michael},
    month            = mar,
    keywords         = {on-stack replacement slapstick feedback-directed optimisation language implementation},
    year             = {2018},
    date             = {2018-3-25},
    title            = {Hop, Skip, \& Jump: Practical On-Stack Replacement for a Cross-Platform Language-Neutral {VM}},
    pages            = {1-16},
    address          = {Williamsburg, VA}
  }

Download

Served by Apache on Linux on seL4.