[bknr-devel] Motivation for not interning symbols when loading a store

Vladimir Sedach vsedach at gmail.com
Thu May 21 18:18:09 UTC 2009


The patch is trivial, but I'd like to know the reason for the current behavior.

There's also something fishy about %decode-symbol's :intern keyword
parameter. When it's not true, %decode-symbol returns nil. The only
time this is possibly the case occurs in snapshot-read-layout:

(defun snapshot-read-layout (stream layouts)
  (let* ((id (%decode-integer stream))
         (class-name (%decode-symbol stream :usage "class"))
         (nslots (%decode-integer stream))
         (class (find-class-with-interactive-renaming class-name))
         (slot-names (loop repeat nslots collect (%decode-symbol stream

:intern (not (null class))

:usage "slot")))
         (slots (if class
                    (find-class-slots-with-interactive-renaming class
slot-names)
                    slot-names)))
    (setf (gethash id layouts)
          (cons class slots))))

So if find-class-with-interactive-renaming doesn't find a class, all
%decode-symbol does is read the stream and throw what it reads away? I
don't get whether that's intended behavior or a bug.

Vladimir

On Wed, May 20, 2009 at 1:02 PM, Hans Hübner <hans.huebner at gmail.com> wrote:
> On Wed, May 20, 2009 at 20:31, Vladimir Sedach <vsedach at gmail.com> wrote:
>> I'm genuinely perplexed why the BKNR datastore throws an error when it
>> tries to load a store that contains symbols that are not present in a
>> given package. Why not just intern them?
>
> I have never seen this as a problem, and it would be easy to change.
> Maybe you can send me a patch that I could look at?  I'd like to see
> interning on load be controlled by a special variable,
> *intern-symbols-on-load*.
>
> -Hans
>




More information about the Bknr-devel mailing list