guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I get source properties of procedure source?


From: EricEnderton
Subject: Re: How do I get source properties of procedure source?
Date: Thu, 30 Nov 2000 16:51:17 -0800 (PST)

Matthias Koeppe wrote:
> SOURCE-PROPERTIES applied to the result of PROCEDURE-SOURCE always
> seems to return the empty list.  Is there a way to access the source
> properties for a given procedure?

source properties are attached by READ, so they only show up
on lists that were literally in the source.  (plus memoizing,
but i'm not real clear on that stuff.)  PROCEDURE-SOURCE makes
a new cons, so that won't have properties.  often there are 
properties on the CADR (= lambda args) or CADDR (= first
line of lambda body).

watch out, SOURCE-PROPERTIES throws an exception on ().
i'm don't think there are source properties anywhere on
        (lambda () ())

> (I know that I can access them if
> the procedure invocation lives on the stack.)

oh, how do you do that?  i've augmented display_frame() in
backtrace.c to print the file name and line number of each
frame.  (how does anyone debug a large program without this?)
it works most of the time, but not always.

-Eric





_______________________________________________________
Tired of slow Internet? Get @Home Broadband Internet
http://www.home.com/xinbox/signup.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]