[armedbear-devel] How can I build ABCL 1.1.1 without recording the absolute path of the source ?

Mark Evenson evenson at panix.com
Sat Feb 23 06:47:29 UTC 2013


Congratulations!  You've met the autoloader, now level up...

In order to reduce initial system boot times (and also to partially optimize for booting over the network), not all functions corresponding to symbols in the base ABCL system are loaded initially.  Instead, the symbol function slot contains a stub which when first executed as a function loads the necessary code, which as a side effect also populates the symbol plist.

Users of the implementation may currently interact with this mechanism meaningfullly through the EXT:AUTOLOADP and EXT:RESOLVE functions, which tell you if a symbol needs to be autoloaded and to resolve it, respectively.

Using these functions we may define 

    (defun maybe-resolve-symbol-plist (symbol)
      (when (autoloadp symbol)
        (resolve symbol))
     (symbol-plist symbol))

which you can then use in your code to change the source locations.

yers,
Mark 

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad idea?
A: Top-posting.
Q: What is the most annoying thing in email?

On Feb 23, 2013, at 7:25 AM, Xiaofeng Yang <n.akr.akiiya at gmail.com> wrote:

> Thanks.
> 
> More details, I found that after the REPL started:
> ; SLIME 2011-10-19
> CL-USER> (symbol-plist 'disassemble)
> NIL
> CL-USER> (disassemble 'disassemble)
> ; Compiled from "disassemble.lisp"
> ... very long output
> NIL
> CL-USER> (symbol-plist 'disassemble)
> (SYSTEM::%SOURCE (#P"L:/abcl-src-1.1.1/src/org/armedbear/lisp/disassemble.lisp" . 1693)) 
> 
> After I called DISASSEMBLE, the result of (symbol-plist 'disassemble) was not NIL. How can I make the result of the first (symbol-plist 'disassemble) no NIL?
> 
> 
> 
>      Best regards,
> Xiaofeng Yang
> 
> 
> 2013/2/23 Mark Evenson <evenson at panix.com>
>> On 2/22/13 4:01 PM, Xiaofeng Yang wrote:
>> > Hi, all
>> >
>> > I built ABCL 1.1.1 using Ant. After I built it, I found that the source
>> > locations of all the symbols are absolute path. For exmaple:
>> > [1] CL-USER(1): (symbol-plist 'defun)
>> > (SYSTEM::%SOURCE
>> > (#P"L:/abcl-src-1.1.1/src/org/armedbear/lisp/precompiler.lisp" . 44441)
>> > PRECOMPILER::PRECOMPILE-HANDLER PRECOMPILER::PRECOMPILE-DEFUN)
>> >
>> > I tried  using '--nosystem', setting (LOGICAL-PATHNAME-TRANSLATIONS
>> > "sys") by myself, and even deleting system.lisp from the jar. But the
>> > source location didn't change.
>> >
>> > How can I build ABCL 1.1.1 without recording the absolute path of the
>> > source ? Or, making the source location changable so that I can locate
>> > it even if I change the path of the source code ? I think I can do it
>> > manually by i.g.
>> > (dolist (pkg (list-all-packages))
>> >   (do-symbols (sym pkg)
>> >              if there exists system::%source in symbol-plist, replace it)).
>> > Is there any other way to do this ?
>> 
>> Currently, there is no way of building to not recording the physical
>> pathname, but there should be.  The values stored in the symbol plists
>> should use the SYS:SRC logical pathname.  I've recorded this as ticket
>> [#301][].
>> 
>> 
>> [#301]: http://trac.common-lisp.net/armedbear/ticket/301
>> 
>> --
>> 
>> "A screaming comes across the sky.  It has happened before, but there is
>> nothing to compare it to now."
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20130223/552ae610/attachment.html>


More information about the armedbear-devel mailing list