[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
forwarded for JLL: compiling lisp code
- To: JLL at MIT-MC
- Subject: forwarded for JLL: compiling lisp code
- From: Alan Bawden <ALAN at MIT-MC>
- Date: Wed, 27 Oct 82 07:08:00 GMT
- Cc: BUG-LISP at MIT-MC, GJC at MIT-MC, GSB at MIT-MC, ELLEN at MIT-MC
- Original-date: 27 October 1982 03:08-EDT
Date: 26 October 1982 11:00-EDT
From: Joseph L. Leva <JLL at MIT-MC>
Subject: compiling lisp code
I'm having trouble compiling the lsubrcall function where the 2nd
argument is flonum. The following function works fine in the
interpreter but gives an error when run from compiled code.
(defun fls (fun a1 a2)
((lambda (fpt)
(cond ((null fpt)(displa fun)(error '| has no LSUBR|)))
(lsubrcall flonum fpt a1 a2))
(get fun 'lsubr)))
The solution is to not use (LSUBRCALL FLONUM ...). Just use
(LSUBRCALL T ...). Saying FLONUM tells the compiler that you only plan to
call subrs that support an extended calling convention, not just that
you plan to call subrs that return flonums. +$ in fact does NOT support
this calling convention. Since in fact very few LSUBRs support this
calling convention, while ALL subrs support the normal calling convention,
you should just use T and forget the FLONUM.
I guess the interpreter should have errored rather than looking like it was
working.