Continuation-passing, closure-passing style

Continuation-passing, closure-passing style
复制标题

延续传递、闭包传递风格

DOI:
10.1145/75277.75303
复制
发表时间:
1989
期刊:
Proceedings Design, Automation and Test in Europe. Conference and Exhibition 2001
影响因子:
--
通讯作者:
T. Jim
T. Jim
中科院分区:
--
文献类型:
--
作者:
A. Appel;T. Jim

文献摘要

被引文献

相似文献

我们为ML实现了一个连续传递风格(CPS)代码生成器。我们的CPS语言被表示为ML数据类型,其中所有函数都被命名,并且大多数类型的格式错误的表达式是不可能的。我们将代码生成分成几个阶段,这些阶段将这种表示形式重写为更简单的形式。闭包被显式地表示为记录,因此闭包策略可以从一个阶段传递到另一个阶段。不使用堆栈。我们的基准测试数据表明,新方法是对以前基于抽象机的代码生成器的改进。
We implemented a continuation-passing style (CPS) code generator for ML. Our CPS language is represented as an ML datatype in which all functions are named and most kinds of ill-formed expressions are impossible. We separate the code generation into phases that rewrite this representation into ever-simpler forms. Closures are represented explicitly as records, so that closure strategies can be communicated from one phase to another. No stack is used. Our benchmark data shows that the new method is an improvement over our previous, abstract-machine based code generator.