On Sun, 19 Aug 2018 14:08:38 +0200 [email protected] wrote:
> [...]
> I checked the code and, for number types, only fixnums and flonums are
> explicitely handled, other numeric types trigger an incorrect recursion.
>
> It seems we forgot to add support for the new numeric types to srfi-69
> when we introduced them.
> [...]
Hello,
thanks for taking the time to look into this!
Your explanation makes a lot of sense, I also suspected the newly added
numeric tower support in core may have broken some low-level
type-specific logic. I just didn't understand enough of the magic
around ##sys#object->uid, for which I couldn't immediately find any
definition in the CHICKEN source, to get a firm grasp of how the
default hash functions in srfi-69 work at all.
For the moment being I have implemented a hackish workaround using
(define %eq?-hash
(foreign-lambda* int ([scheme-object v] [int bound])
"C_return((((intptr_t) v) >> C_FIXNUM_SHIFT) % bound);"))
which is probably terribly incorrect in case the garbage collector
moves objects around, but memory load seems low enough and table
lifetimes short enough in my use case for this to work momentarily %-]
Ciao,
Thomas
--
There are only two things wrong with C++: The initial concept and the
implementation.
-- Bertrand Meyer
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users