Lune

PLDI2020Top-tier venue

Compiler and runtime support for continuation marks

Matthew Flatt, R. Kent Dybvig

Abstract

Continuation marks enable dynamic binding and context inspection in a language with proper handling of tail calls and first-class, multi-prompt, delimited continuations. The simplest and most direct use of continuation marks is to implement dynamically scoped variables, such as the current output stream or the current exception handler. Other uses include stack inspection for debugging or security checks, serialization of an in-progress computation, and run-time elision of redundant checks. By exposing continuation marks to users of a programming language, more kinds of language extensions can be implemented as libraries without further changes to the compiler. At the same time, the compiler and runtime system must provide an efficient implementation of continuation marks to ensure that library-implemented language extensions are as effective as changing the compiler. Our implementation of continuation marks for Chez Scheme (in support of Racket) makes dynamic binding and lookup constant-time and fast, preserves the performance of Chez Scheme's first-class continuations, and imposes negligible overhead on program fragments that do not use first-class continuations or marks.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Handling Scope Checks: A Comparative Framework for Dynamic Scope Extrusion Checks cites Retrofitting effect handlers onto OCaml
  • Continuing WebAssembly with Effect Handlers cites Retrofitting effect handlers onto OCaml
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Retrofitting effect handlers onto OCamlK. C. Sivaramakrishnan, Stephen Dolan, Leo White, Tom Kelly et al.PLDI 2021 · 56 citations
  2. Continuing WebAssembly with Effect HandlersLuna Phipps-Costin, Andreas Rossberg, Arjun Guha, Daan Leijen et al.OOPSLA 2023 · 20 citations
  3. Handling Scope Checks: A Comparative Framework for Dynamic Scope Extrusion ChecksMichael Lee, Ningning Xie, Oleg Kiselyov, Jeremy YallopPOPL 2026 · 3 citations
  4. Effectful Software ContractsCameron Moy, Christos Dimoulas, Matthias FelleisenPOPL 2024 · 1 citation

Related papers

  1. Efficient module-level dynamic analysis for dynamic languages with module recontextualizationNikos Vasilakis, Grigoris Ntousakis, Veit Heller, Martin C. RinardFSE 2021 · 6 citations
  2. Virtualizing ContinuationsCong Ma, Jonghyun Jung, Yizhou ZhangPLDI 2026
  3. Dynamic Wind for Effect HandlersDavid Voigt, Philipp Schuster, Jonathan Immanuel BrachthäuserOOPSLA 2025
  4. Contextual dispatch for function specializationOlivier Flückiger, Guido Chari, Ming-Ho Yee, Jan Jecmen et al.OOPSLA 2020 · 31 citations
  5. A typed continuation-passing translation for lexical effect handlersPhilipp Schuster, Jonathan Immanuel Brachthäuser, Marius Müller, Klaus OstermannPLDI 2022 · 10 citations
Dusk over the sea between two cliffs drawn in fine vertical lines