fix(core-logic): ensure store IDs fit in 5 bits

This commit is contained in:
Simon Cruanes 2022-08-13 13:29:49 -04:00
parent 7d46a38e2c
commit 632d5e3f40
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -161,7 +161,8 @@ module Store = struct
let n = ref 0
let create ?(size = 256) () : t =
let s_uid = !n in
(* store id, modulo 2^5 *)
let s_uid = !n land store_id_mask in
incr n;
{ s_uid; s_exprs = Hcons.create ~size () }