okuoku / yuni

R7RS/R6RS/Generic Scheme portability platform
Other
32 stars 3 forks source link

s7: hash-table-set! may reject eq? comparable object #144

Closed okuoku closed 2 years ago

okuoku commented 4 years ago
;hash-table-set! key 0, is an integer, but the hash-table's key function is eq?
;    (if (eq? #f v) (hash-table-set! ht k...
;    /home/oku/repos/yuni/lib-compat/s7-yuni/compat/hashtables.sls, line 54, position: 1380
; hashtable-set!: (if (eq? #f v) (hash-tabl... ; v: 1, ht: (hash-table), k: 0
;                                              %%yuni-false-guard-obj: (#f . #f)
; ((hashtable-set! {ht}-70 -1 "m") (hashtab... ; {ht}-70: (hash-table)
; ((%%selfboot-load-program prog))
; ("home" "oku" "repos" "yuni")

In most Scheme any numbers are location-preserving but it seems s7 is not.

okuoku commented 4 years ago

Introduced: https://github.com/spurious/snd-mirror/commit/fb779ee2a0fd60bd33efa2f6c2e1e58075c434c9

Workarounded: https://github.com/okuoku/yuni/commit/3b95a78dd770b40a4a738a48d63a074c3772a94b

okuoku commented 2 years ago

It's now okay. test added: https://github.com/okuoku/yuni/commit/dcb67db975575a8f867defaea68fa2eb3d10a151