#90: resetSpecialBindings efficiency -------------------------+-------------------------------------------------- Reporter: ehuelsmann | Owner: ehuelsmann Type: enhancement | Status: new Priority: major | Milestone: unscheduled Component: compiler | Version: Keywords: | -------------------------+-------------------------------------------------- The code
{{{ (PROGN (DEFVAR *X*) (DEFUN F (*X*) (LET (*X*) (PRINT "OK")))) }}}
will compile 2 specials-restoring blocks after the PRINT form: one for LET and one for the function argument list.
If the function indicated to the body that it would be clearing the specials, the LET form could skip that action (being the last form in the body), reducing the number of CATCH/THROWs in case of non-local exits and the number of resetSpecialBindings() calls in case of normal exits.