aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_map.h
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-03-17 15:44:07 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-19 14:57:56 +0100
commitfeffe2deac13ad61477c7ecf63342815c750bfe5 (patch)
tree3553b30996c19120bb7b501ef72707bf7a4bcc4b /erts/emulator/beam/erl_map.h
parent3c55267c6176a7183c59fc2ca6c1b278df080373 (diff)
downloadotp-feffe2deac13ad61477c7ecf63342815c750bfe5.tar.gz
otp-feffe2deac13ad61477c7ecf63342815c750bfe5.tar.bz2
otp-feffe2deac13ad61477c7ecf63342815c750bfe5.zip
erts: Ensure maps uses _rel functions in halfword
Diffstat (limited to 'erts/emulator/beam/erl_map.h')
-rw-r--r--erts/emulator/beam/erl_map.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_map.h b/erts/emulator/beam/erl_map.h
index d075d87c83..1333a734a8 100644
--- a/erts/emulator/beam/erl_map.h
+++ b/erts/emulator/beam/erl_map.h
@@ -109,7 +109,6 @@ Eterm* hashmap_iterator_next(struct ErtsWStack_* s);
Eterm* hashmap_iterator_prev(struct ErtsWStack_* s);
int hashmap_key_hash_cmp(Eterm* ap, Eterm* bp);
Eterm erts_hashmap_from_array(ErtsHeapFactory*, Eterm *leafs, Uint n, int reject_dupkeys);
-const Eterm *erts_hashmap_get(Uint32 hx, Eterm key, Eterm map);
#define erts_hashmap_from_ks_and_vs(P, KS, VS, N) \
erts_hashmap_from_ks_and_vs_extra((P), (KS), (VS), (N), THE_NON_VALUE, THE_NON_VALUE);
@@ -117,16 +116,24 @@ const Eterm *erts_hashmap_get(Uint32 hx, Eterm key, Eterm map);
Eterm erts_hashmap_from_ks_and_vs_extra(Process *p, Eterm *ks, Eterm *vs, Uint n,
Eterm k, Eterm v);
-#if HALFWORD_HEAP
const Eterm *
+#if HALFWORD_HEAP
erts_maps_get_rel(Eterm key, Eterm map, Eterm *map_base);
# define erts_maps_get(A, B) erts_maps_get_rel(A, B, NULL)
#else
-const Eterm *
erts_maps_get(Eterm key, Eterm map);
# define erts_maps_get_rel(A, B, B_BASE) erts_maps_get(A, B)
#endif
+const Eterm *
+#if HALFWORD_HEAP
+erts_hashmap_get_rel(Uint32 hx, Eterm key, Eterm node, Eterm *map_base);
+# define erts_hashmap_get(Hx, K, M) erts_hashmap_get_rel(Hx, K, M, NULL)
+#else
+erts_hashmap_get(Uint32 hx, Eterm key, Eterm map);
+# define erts_hashmap_get_rel(Hx, K, M, M_BASE) erts_hashmap_get(Hx, K, M)
+#endif
+
/* hamt nodes v2.0
*
* node :: leaf | array | bitmap