Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

compiled-function-p and interpreted functions (CMUCL)

1 view
Skip to first unread message

Lyle Borg-Graham

unread,
Mar 21, 1997, 3:00:00 AM3/21/97
to

Quick question - compiled-function-p doesn't seem to do right with an
interpreted function under CMUCL17F - any ideas?

Thanks to all,

Lyle

* (defun foo (a b c))
FOO
* (describe *)
FOO is an internal symbol in the SURF-HIPPO package.
Function: #<Interpreted Function FOO {73F0329}>
Function arguments:

In: LAMBDA (A B C)
#'(LAMBDA (A B C) (BLOCK FOO))
Warning: Variable A defined but never used.
Warning: Variable B defined but never used.
Warning: Variable C defined but never used.
(A B C)
Its defined argument types are:
(T T T)
Its result type is:
*
Its definition is:
(LAMBDA (A B C) (BLOCK FOO))
* (describe #'foo)
#<Interpreted Function FOO {73F0329}> is function.
Arguments:
(A B C)
Its defined argument types are:
(T T T)
Its result type is:
*
Its definition is:
(LAMBDA (A B C) (BLOCK FOO))
* (compiled-function-p #'foo)
T
*
--
............................................................

Lyle Borg-Graham
Equipe Cogniscience, Institut Alfred Fessard, CNRS
91198 Gif-sur-Yvette
FRANCE
tel: (33 1) 69 82 34 13 fax: (33 1) 69 82 34 27

_ o
/ /
. . . . . . _ _/|


Barry Margolin

unread,
Mar 21, 1997, 3:00:00 AM3/21/97
to

In article <LYLE.97Ma...@cogni.ai.mit.edu>,

Lyle Borg-Graham <ly...@ai.mit.edu> wrote:
>Quick question - compiled-function-p doesn't seem to do right with an
>interpreted function under CMUCL17F - any ideas?

CMU CL compiles everything. Essentially, it defines:

(defun eval (form)
(funcall (compile nil `(lambda () ,form))))

But even if this weren't the case, in some implementations
COMPILED-FUNCTION-P is true for all functions. This is because they
represent interpreted functions using a closure of a compiled function,
something like:

(defun make-interpreted-function (lambda-exp)
#'(lambda (&rest args) (apply-lambda-exp lambda-exp args)))

The printer recognizes these closures and displays them as #<Interpreted
Function ...>, but in actuality they're really a compiled function.
--
Barry Margolin
BBN Corporation, Cambridge, MA
bar...@bbnplanet.com
(BBN customers, call (800) 632-7638 option 1 for support)

0 new messages