[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: disassemble and compile questions
- To: common-lisp <@CSNET-RELAY.ARPA,@hplabs.CSNET:common-lisp@su-ai.arpa>
- Subject: Re: disassemble and compile questions
- From: Bob Shaw <bs%hplabs.csnet@CSNET-RELAY.ARPA>
- Date: Mon, 30 Sep 85 11:28:47 pdt
- Cc: bs@hplabs.CSNET
- Source-info: From (or Sender) name not authenticated.
Well, I essentially shot myself in the foot with the wording of my
question about compiling things other than lambda-expressions.
Lexical closures were a convenient example, not the real concern.
Let me make another attempt.
Is it allowable to have a function object that is specified by
a lambda-expression but is not stored as a lambda-expression or
compiled code? In other words, does Common Lisp allow intermediate,
iterpretable representations? If it is possible to have such a
function object, is there a mechanism by which it can be later compiled?
In section 5.3.1 it states, "Evaluating a defun form causes the symbol
name to be a global name for the function specified by the lambda-
expression ... ." This doesn't seem to preclude an intermediate form.
In section 2.13 it states, "A function is anything that may be correctly
given to the funcall or apply function, and is to be executed as code
when arguments are supplied." Funcall is defined in terms of functions
(section 7.3) and apply (section 7.3) states, "function may be a
compiled-code object, or a lambda-expression, or a symbol ... ." If
I interpret "may" as "must" in the preceding statement, then, for
such an intermediate form, (apply 'f 1 2 3) is legal, but
(apply (symbol-function 'f) 1 2 3) is not.
Thanks for any help.