wiki:CompiledClosures

Compiled closures

ABCL has interpreted closures? and compiled closures. The latter category is described at this page.

Construction

Closures of this type consist of 2 building blocks:

  1. The (outer) closure function of the CompiledClosure? type (which extends Closure)
  2. The (inner) function of the ClosureTemplateFunction? type (which also extends Closure)

The inner function is loaded once and re-used for each CompiledClosure? being instantiated (need to verify: isn't it reloaded/created every time?). The outer closure provides the required part of its environment through a 'context array'.

Context arrays

Each instantiated outer closure creates a 'context array' based on the state of its lexical environment at creation time.

(need to fill this in: how do they interact with parameter-construction?)

Last modified 15 years ago Last modified on 12/16/08 19:26:38