next up previous
Next: Call/cc Up: Informal Development Previous: Eval

   
Apply

Since eval can produce functions with unknown arity, we need a way to deal with them. Specifically, we must be able to apply such a function to a variable number of arguments. Unfortunately, most offline partial evaluators for Scheme [6,8] do not treat variadic functions at all.

If we consider argument lists as partially static data structures [26] it is surprisingly simple to handle variadic functions. Hence the possible cases for specialization of :

1.
If , E, and F are all available at the same binding time, apply is either executed immediately or the code (apply F' E') is generated.
2.
If and F are dynamic and E is an argument list of known length with dynamic elements the specializer can omit the application of apply and can directly generate the residual .



Matt Hurlbut
1998-07-15