fix Huffman table build non-determinism
commit923501ac6af1f83efd6762073ccf09961a2755e9
authorChristophe Rhodes <csr21@cantab.net>
Tue, 28 Oct 2014 17:47:37 +0000 (28 17:47 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Tue, 28 Oct 2014 17:47:37 +0000 (28 17:47 +0000)
tree69ce7f80894e343e28e3f0cd983129fbe5a2b956
parent4d2aa91f0d97473805cb7992bef9dcf727ea1465
fix Huffman table build non-determinism

when building, there might be symbols in the symbol code with
the same implied probability (case in point, the #\( and #\)
characters).  We must make sure that those are processed in
the same order no matter the host's hash-table implementation,
so insert enough SORT / STABLE-SORTs to make that happen.

The hash-table manipulations around the Huffman database in
src/code/target-char.lisp do not lead to any non-determinism:
the outputs eventually get sorted by guaranteed-unique keys
(the character code, or the character name's encoding relative
to the now-deterministic Huffman table).
src/code/huffman.lisp