[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

**DRAFT** issue COMPILED-FUNCTION-REQUIREMENTS, version 2



re: ... but there should be no real obstacle to making:
	    (FUNCALL (THE COMPILED-FUNCTION x) ...)
       turn into
	    (FUNCALL-INTERNAL x ...)
       at least in low safety modes.

    Not quite.  Lucid's optimization is for the type PROCEDURE, which is
    used for both interpreted and compiled functions. ...

This ought to work, because COMPILED-FUNCTION is a subtype of
PROCEDURE. [If it doesn't, then we have YetAnotherSubtypepBug!]

True, we should also be able to optimize a form like:
	    (FUNCALL (THE INTERPRETED-FUNCTION x) ...)
if there were such a type, since "interpreted" functions are just
procedures that "trampoline" back in to the interpreter.  

Incidentally, VAX/NIL did this trick too back in 1979; I'm not at all
sure that it was the first to do so.  Anyone know of an earlier Lisp
that *always* had something instantly FUNCALLable in the function cell
-- either to an undefined trap routine, or to a trampoline back into
APPLY?



-- JonL --