diff --git a/src/duk_hobject.h b/src/duk_hobject.h index 757faf42..deab307f 100644 --- a/src/duk_hobject.h +++ b/src/duk_hobject.h @@ -369,6 +369,10 @@ #define DUK_HOBJECT_A_MIN_GROW_ADD 16 #define DUK_HOBJECT_A_MIN_GROW_DIVISOR 8 /* 2^3 -> 1/8 = 12.5% min growth */ +/* probe sequence */ +#define DUK_HOBJECT_HASH_INITIAL(hash,h_size) ((hash) % (h_size)) +#define DUK_HOBJECT_HASH_PROBE_STEP(hash) DUK_UTIL_GET_HASH_PROBE_STEP((hash)) + /* * PC-to-line constants */ diff --git a/src/duk_hobject_props.c b/src/duk_hobject_props.c index c8d9885a..3a677f10 100644 --- a/src/duk_hobject_props.c +++ b/src/duk_hobject_props.c @@ -48,8 +48,8 @@ #define NO_ARRAY_INDEX DUK_HSTRING_NO_ARRAY_INDEX /* hash probe sequence */ -#define HASH_INITIAL(hash,h_size) ((hash) % (h_size)) -#define HASH_PROBE_STEP(hash) DUK_UTIL_GET_HASH_PROBE_STEP((hash)) +#define HASH_INITIAL(hash,h_size) DUK_HOBJECT_HASH_INITIAL((hash),(h_size)) +#define HASH_PROBE_STEP(hash) DUK_HOBJECT_HASH_PROBE_STEP((hash)) /* marker values for hash part */ #define HASH_UNUSED DUK_HOBJECT_HASHIDX_UNUSED