SORT VARIABLES: Improve stability of sort.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 20 Sep 2017 15:36:18 +0000 (08:36 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 23 Sep 2017 17:49:37 +0000 (10:49 -0700)
commit85e8724e69cf54946c7b40628e88f2ec12368d7c
tree21f84e301e2f83d96c0e16c5d573e13319348a13
parentcf5c60f6f2c5d7d6dcad09bc30162b70ad01c181
SORT VARIABLES: Improve stability of sort.

The sort was being made "stable" by comparing variables' addresses in
memory.  There's nothing particularly predictable about that, especially
from one malloc implementation to another.  This commit fixes the stability
by comparing the variables' dictionary indexes instead.

Bug #52072.
src/language/dictionary/sort-variables.c