Changes between Initial Version and Version 4 of Ticket #1293


Ignore:
Timestamp:
08/23/16 21:19:21 (9 years ago)
Author:
sjamaan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1293

    • Property Priority majorcritical
    • Property Summary Locatives get moved around causing hash tables to lose themeq?-hash tables calculcate different value for objects after they're mutated and lose locatives after GC
  • Ticket #1293 – Description

    initial v4  
    1 As [[http://paste.call-cc.org/paste?id=982e393227789ab1a6c471ada66e729eb28f83b8|pointed out by John Croisant]]:
     1If you mutate a pair, it's still `eq?` to itself, but the `hash-by-identity` / `eq?-hash` doesn't calculate the same hash anymore, which means the hash table cannot find the key, unless the randomization factor happens to be such that it finds the same bucket, of course, but that's highly unlikely for simple cases like the one below:
     2
     3{{{
     4#;1> (use srfi-69)
     5; loading /home/sjamaan/chickens/4.11.0/lib/chicken/8/srfi-69.import.so ...
     6; loading library srfi-69 ...
     7#;2> (define x (cons 1 2))
     8#;3> (hash-by-identity x)
     9380849329
     10#;4> (set-car! x 3)
     11#;5> (hash-by-identity x)
     12380718257
     13#;6> (= #3 #5)
     14#f
     15#;7>
     16}}}
     17
     18Originally [[http://paste.call-cc.org/paste?id=982e393227789ab1a6c471ada66e729eb28f83b8|pointed out by John Croisant]]:
    219
    320{{{#!scm