latest-assert-build
Pre-releaseCogVM source as per VMMaker.oscog-eem.3500
Spur:
Fix the new hash generator introduced in VMMaker.oscog-eem.3485.
That version used a 32-bit or 64-bit shift register and
- an object's hash could end up as zero since the least significant 22 bits of
the counter could be zero even if the counter was not (a bad bug!) - the counter would take longer than 2^22 - 1 iterations to cycle through all
possible 2^22 - 1 hash values since again the counter would take either
2^32-1 or 2^64-1 iterations to cycle through all possible 32 or 64 bit values
Replace it with a 22 bit counter that cycles through all 2^22 - 1 possible
non-zero states in 2^22 - 1 iterations. Thanks to Juan Vuletich for the code.
Fix bug in primitiveSetOrHasIdentityHash on Spur where when setting the hash
the primitive would return a new hash value rather than the raw hash bits.
Don't cycle the identityHash PNG on writing a snapshot. Just write its value
direct to the image file.
V3: Fix bug where the hash seed saved to the image would be mre or less
constant because it was derived from freeStart and after a garbage collection
freeStart would be reset. So write the value of freeStart to lastHash before
an incrementalGC and write that to the image header.