Exceptional Continuations in JavaScript
Exceptional Continuations in JavaScript
复制标题
JavaScript 中的异常延续
DOI:
--
复制
发表时间:
2007
期刊:
影响因子:
--
通讯作者:
Florian Loitsch
中科院分区:
文献类型:
--
作者:
Florian Loitsch
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.