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

Xiaofeng Yang n.akr.akiiya at gmail.com
Sat Feb 23 08:01:39 UTC 2013


Furthermore, I found that there's not only one symbol cannot be resolve.
Some symbols, like, for example, COMPUTE-CLASS-DIRECT-SLOTS,
CLASS-DIRECT-SLOTS, MAKE-FORWARD-REFERENCED-CLASS,
%SET-STREAM-EXTERNAL-FORMAT, and more, cannot be resolved. These symbols
signalled  conditions when I resolved them. Each one has its own reason for
the signalled condition. And, I tried to catch these conditions using
HANDLER-CASE, but it seemed no effects.
  (when (extensions:autoloadp symbol)
    (handler-case
        (extensions:resolve symbol)
      (condition (c)                <-- it seemed no effects
        (print symbol))))


     Best regards,
Xiaofeng Yang


2013/2/23 Mark Evenson <evenson at panix.com>

> 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/2b378fd7/attachment.html>


More information about the armedbear-devel mailing list