[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
intercepting undefined function errors
- To: KAHLE@Think.COM
- Subject: intercepting undefined function errors
- From: David L. Andre <DLA@DIAMOND.S4CC.Symbolics.COM>
- Date: Wed, 5 Aug 87 20:45 EDT
- Cc: jpg@ALLEGHENY.SCRC.Symbolics.COM, email@example.com
- In-reply-to: <870805154415.3.KAHLE@SPINOZA.THINK.COM>
Date: Wed, 5 Aug 87 15:44 EDT
From: Brewster Kahle <KAHLE@Think.COM>
Date: Wed, 5 Aug 87 12:34 EDT
From: Jeffrey P. Golden <firstname.lastname@example.org>
We are running Beta Version 2.00 on the Apollo.
As you may know, MACSYMA has long had an "autoload" feature
whereby an "undefined function" may have an AUTOLOAD property
which indicates a file which contains the function's definition.
The file is loaded when a call to the undefined function is
attempted. (This scheme was very useful in the days of limited
address space. It is still used to autoload a few "share" files.)
I wrote a local hack that does the same thing, but in a different way:
Vdefun takes a function-name and a file-name (or system name). It
creates a function that has the same name and takes &rest args. The
function loads the file and recalls the function. This takes alittle
more space than the maclisp property method, but it has the advantage that it
the compiler does not complain of undefined functions, it is easy to
write, and it works on any commonlisp.
I guess you would have a NOTINLINE declaration for the recursive call,
so that the compiler doesn't generate tail recursion.