[cmucl-imp] fdefns for flets

Helmut Eller heller at common-lisp.net
Fri Jan 21 19:33:26 CET 2011


* Raymond Toy [2011-01-21 15:42] writes:

>> I think this is only generated by genesis.  Or is there another way how
>> such names can end up in globaldb?
> I'm sorry, I don't quite follow.  What is only generated by genesis?

The fdefn objects for flet/labels.  fdefn objects are needed for those
functions that are called by name.  As symbols in CMUCL have no function
slot the place to store named functions are fdefn objects.

The loader needs to find the fdefn object for a symbol so somebody has
to put it in globaldb first.  Usually that's done by %%defun but %%defun
is not a options during genesis so the compiler additionally emits
fop-fset.  fop-fset is a nop after genesis.

fop-fset is emitted in c::dump-one-entry and it's guarded by 

  (when (and name (or (symbolp name) (listp name)))
    ...

flet/labels don't need fdefns because those are always called with
local-call.  Those could probably be filtered out.  For trace, we
probably only need the global name; with that we can find the code
component and then scan the functions in the component for a matching
flet/labels name.

Macros seem to have names like (:macro foo) and we probably need to keep
them.

Helmut



More information about the cmucl-imp mailing list