[Openmcl-devel] Tracing local functions

Gary Byers gb at clozure.com
Tue Jan 6 14:49:38 PST 2009


Unfortunately, there's no way to trace local functions in CCL.

I added an enhancement ticket (<http://trac.clozure.com/openmcl/ticket/396>)
and promptly started babbling about some of the more obscure issues that
came to mind.  It'd clearly be useful to be able to trace local functions,
and we should think more about what'd be involved in implementing that.

On Mon, 5 Jan 2009, Daniel Gackle wrote:

> Hi,
>
> My partner and I recently switched our project to CCL (from SBCL and
> before that ACL Express) and so far I am enjoying it a lot. I have a
> question about trace. In Allegro if I compile a function that includes
> a local function, like this:
>
> (defun outer ()
>  (flet ((inner (x)
>       (* x 2)))
>    (inner 2)))
>
> ...I can trace the local function:
>
>> (trace (flet outer inner))
> ((FLET OUTER INNER))
>
>> (outer)
> 0[7]: ((FLET OUTER INNER) 2)
> 0[7]: returned 4
> 4
>
> Is there a way to do this in CCL? Or something equivalent? I have some
> complex functions containing many flet/labels forms. I like them
> because they're nicely encapsulated. However, they're hard to debug
> without something like the above. I wrote them in Allegro and made
> heavy use of the feature at the time.
>
> Thank you,
> Daniel
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list