racket / ChezScheme

Chez Scheme
Apache License 2.0
110 stars 8 forks source link

hashtable cell immutability checks cleanup #55

Closed jltaylor-us closed 1 year ago

jltaylor-us commented 1 year ago

Update release notes to specify which functions have this backwards incompatible change.

Fix missing mutability check for hashtable-ref-cell in the symbol hashtable case.

It's not clear if there is a reason that hashtable-cell and hashtable-ref-cell had the immutability check in each branch after type dispatch rather than checking it before the type dispatch. The only case in which that's a different behavior is when the key argument for a symbol hashtable is not a symbol. I don't know of any reason why we'd need to keep the specific order in which it's checking for those error conditions. The 3rd commit in this PR makes all of the operations on symbol hashtables consistent in the order of checking for a symbol key vs checking for mutability (when applicable), and moves the mutability check in hashtable-cell and hashtable-ref-cell before the type dispatch.