[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MULTIPLE-VALUE error checking
- To: WGD at MIT-MC
- Subject: MULTIPLE-VALUE error checking
- From: JONL at MIT-MC (Jon L White)
- Date: Fri, 6 Feb 81 22:18:00 GMT
- Cc: (BUG LISP) at MIT-MC
- Original-date: 6 FEB 1981 1718-EST
I've refined the error checking for MULTIPLE-VALUE/MULTIPLE-BIND:
Date: 5 February 1981 00:30-EST
From: William G. Dubuque <WGD at MIT-MC>
Why does (MULTIPLE-VALUES (A B) (VALUES 1 2)) lose? Also, why doesn't
(MULTIPLE-VALUE (A) ...) do the correct thing instead of losing; this
would be important for automatically generated code. ... also
for instance, we have (MULTIPLE-VALUE (A) 1) ).
In the cases where 0 or 1 variables are being set, the expander will now
permit atomic evaluations, and produce a "simple" SETQ or LET. The
problem with (MULTIPLE-VALUES (A B) (VALUES 1 2)) is more subtle, and
the correction for it is simply to special-case the "evaluations" which
call VALUES or VALUES-LIST; in particular, VALUES is a macro which
expands into (PROG1 ...) and in general, a PROG1 can't work there (but
of course this specific prog1 is setting up the values vector ...)
. . .
PS, MULTIPLE-VALUE should also work with () as first arg, as it
does on the Lispm (also with 1 arg).
Right, fixed -- a null varlist just "calls the function", or whatever.
. . .I think the sysp check should either
by eliminated or changed to an appropriate warning.
It's more accurate now. But a general problem with these system macros
is that there are many places where "abnormalities" are found, and a
specific diagnosis would require many more words of memory to store
the specific msgs; until we're willing to give up a lot more address
space, we'll just have to make do with a single message saying that the
expansion didn't make it. LET, DEFUN& and DEFMACRO are other system
macros which come to mind.