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

Hans Hübner hans.huebner at gmail.com
Thu May 21 19:31:49 UTC 2009


On Thu, May 21, 2009 at 20:18, Vladimir Sedach <vsedach at gmail.com> wrote:
> The patch is trivial, but I'd like to know the reason for the current behavior.

The reason is that we want to be able to read snapshots with new
software releases without neccessarily interning all symbols found in
them.

> 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:
> [...]
> 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.

That is indeed the intended behavior.  If a snapshot references a
class that does not exist in the running Lisp image and that is not
interactively renamed, objects of that class should just be skipped.
I have used that mechanism when upgrading software releases, finding
it easier to hack the store so that old snapshots can be read rather
than having to do in-image upgrades (load old software, load snapshot,
load new software, dump).

-Hans




More information about the Bknr-devel mailing list