closure conversion

closure conversion

(theory)
The transformation of continuation passing style code so that the only free variables of functions are names of other functions.

See also Lambda lifting.
Mentioned in ?
References in periodicals archive ?
The goal of closure conversion is to choose closure representations that minimize stores (for closure creation), fetches (to access free variables), and memory use (for reachable data).
The main contribution of this paper is an efficient and safe-for-space closure conversion algorithm that integrates and improves most previous closure-analysis technique [Kranz 1987; Appel and Shao 1992; Steele 1978; Rozas 1984; Hanson 1990; Johnsson 1985] using a simple and general framework expressed in continuation-passing and closure-passing style [Appel and Jim 1989; Appel and Shao 1992].
We use CPS as the intermediate language for closure conversion because we want to treat all activation records as continuation closures.
Previous closure conversion algorithms [Steele 1978; Kranz et al.
EDA funds may be made available to assist a community with base closure conversion or realignment.
An optimizing compiler for a high-level language such as ML may make as many as 20 passes over a single program, performing sophisticated analyses and transformations such as CPS conversion, closure conversion, unboxing, subsumption elimination, or region inference.
The first and main step, closure conversion proper, rewrites all functions so that they contain no free variables.
We begin with closure conversion proper; the hoisting step is considered in Section 5.
Although the operational explanation of closure conversion is quite simple, there are a number of subtle issues involved in type-checking the resulting code.
We consider the problem of lightweight closure conversion, in which multiple procedure call protocols may coexist in the same code.
Additional Key Words and Phrases: Closure conversion, compiler construction, global optimization/flow analysis, program transformations
Here we study one such transformation, called closure conversion.