axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Re: root chunks


From: C Y
Subject: Re: [Axiom-developer] Re: root chunks
Date: Fri, 22 Jun 2007 04:11:44 -0700 (PDT)

--- Ralf Hemmecke <address@hidden> wrote:

> > In general, I agree.  In the specific case of intermediate
> > generated files, I would like the filenames to retain some 
> > relationship to their origin to aid debugging.
> 
> Again, look at ALLPROSE. The idea is that while generating the .as
> files you also generate line information into that file. Something 
> like
> 
> #line 56 "myalps/prtype.as.nw"
> 
> that gives the compiler a hint where it should look for the original 
> source. Of course, you need a smart compiler to deal with #line 
> directives. The same applies for a debugger. The compiler should
> forward the #line information into the executable so that the 
> debugger can deal with that information.

Yes, that is the best case.  However, I don't know that there is a
general way to have the Lisp compiler preserve that information in
useful form in the binary.  We can preserve it when we translate to
Lisp (or C or whatever - regardless of language) but when that final
file is compiled by a compiler we didn't write I'm not sure how to make
it preserve the information for the debugger.  I'm even less sure how
to do this portably - we might be able to talk to the GCL and SBCL
devs, I guess.

> There is simply no need to have chunk names corresponding to
> filenames.

At some point I think the Algebra code needs to dictate file names
(unless the build somehow records what it needs for loading), in order
to be able to load the correct binary files corresponding to various
bits of functionality later.  However until that point random filenames
(e.g. (defvar filename (format nil "~a.lisp" (gensym))) are probably
the most robust for cross-platform filename legality and avoidance of
unintended name collisions.
 
Well, this being Lisp, I could just program in more power, set working
defaults, and let the user deside.  Default Lisp and boot files to one
behavior, spad to whatever the algebra needs, and have some variables
to switch behavior around if anyone needs it :-).

Thanks all.

Cheers,
CY


      
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the 
Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 




reply via email to

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