Exceptional Continuations in JavaScript
Florian Loitsch · 2007
JavaScript, the main language for web-site development, does not feature continuation. However, as part of client-server communication they would be useful as a means to suspend the currently running execution. In this paper we present our adaption of exception-based continuations to JavaScript. The enhanced technique deals with closures and features improvements that reduce the cost of the work-around for the missing goto-instruction. We furthermore propose a practical way of dealing with exception-based continuations in the context of non-linear executions, which frequently happen due to callbacks. Our benchmarks show that under certain conditions continuations are still expensive, but are often viable. Especially compilers translating to JavaScript could benefit from static control flow analyses to make continuations less costly.
Cited by 8 works.
Authors
References
- Orbit
- Revised5 Report on the Algorithmic Language Scheme
- LAMBDA: The Ultimate Declarative
- Control-flow analysis of higher-order languages of taming lambda
- The essence of compiling with continuations
- Links: Web Programming Without Tiers
- Moxalactam therapy for neonatal meningitis due to gram-negative enteric bacilli. A prospective controlled evaluation
- Coagulopathy associated with the use of moxalactam.
- Hop Client-Side Compilation.
- Portable Implementation of Continuation Operators in Imperative Languages by Exception Handling