Lines Matching refs:function

20 Lambda-lifting.  If every call point to a function can be identified we can
24 function of a stack-closure cannot call a stack-closure with tail-recursion
25 because the closure must remain on the stack until the function returns.
26 Also we can lambda-lift a function even if it is used in a function that
28 function if the closure would be used in a full, heap closure.
70 | checkCode(Eval{function as Extract _, argList, resultType}) =
71 (* A call of a function. We don't need to mark the function as needing a closure. *)
73 Eval{function=function, argList=map(fn (c, t) => (checkMapCode c, t)) argList,
133 (* Lambdas - check the function body and any recursive uses. *)
152 | LiftConst of codetree (* A lifted function. *)
173 fun processCode(Eval{function=Extract ext, argList, resultType}) =
176 The function may also now be a constant. *)
185 SOME(Eval{function=newFunction,
190 | processCode(Eval{function=Lambda(lambda as { recUse=[], ...}), argList, resultType}) =
191 (* We have a call to a lambda. This must be a recursive function otherwise it
198 SOME(Eval{function=fnConstnt,
206 rebuild the closure but if we get a lifted function it's an error. *)
209 | _ => raise InternalError "Lifted function out of context"
290 (* If the function is a local we have to add it to the closure.
291 If it is a lifted function the function itself will be a
312 of a function or a single anonymous lambda.
314 be used when we can identify all the call sites of the function and add
315 the extra arguments. Because the transformed function has an empty closure
320 arguments are taken from the original function closure there may be
322 functions. In that case the function may become a constant, and
324 arguments for that function may need to be added to the closure.
339 (* If the function is a local we have to add it to the closure.
340 If it is a lifted function the function itself will be a
377 (* Process the function bodies. *)
390 have a (recursive) reference to another function in the set we
435 code-generator to the code of each function and will become the