Re: fdefns for flets
Raymond Toy <[email protected]>
| Newsgroups | gmane.lisp.cmucl.devel |
|---|---|
| Message-ID | <[email protected]> |
On 1/21/11 1:33 PM, Helmut Eller wrote: > * 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. I changed the above code to skip over list names starting with flet/labels. No problem with that. But now tracing doesn't work. So trace will have to grovel the code component to find the name. That would take some work to do; I'm not that familiar with the code component, and it's been a while since I've looked at that. Ray _______________________________________________ cmucl-imp mailing list [email protected] http://lists.zs64.net/mailman/listinfo/cmucl-imp