diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-07-01 11:55:30 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-07-01 11:55:30 +0200 |
commit | db2e9773f95a79b40e197031c7b8782392fa9d02 (patch) | |
tree | 00a25cf37eff0f2f2195bbe3ffaa0c385e6eaf51 /erts/emulator/beam/erl_map.c | |
parent | 7902dda3e6563755a1f6588e1aa4e246be8b8785 (diff) | |
parent | 5c994d828c05744919144e2977bf13ec37e450f0 (diff) | |
download | otp-db2e9773f95a79b40e197031c7b8782392fa9d02.tar.gz otp-db2e9773f95a79b40e197031c7b8782392fa9d02.tar.bz2 otp-db2e9773f95a79b40e197031c7b8782392fa9d02.zip |
Merge branch 'egil/remove-halfword/OTP-12883'
* egil/remove-halfword/OTP-12883: (21 commits)
erts: Remove halfword etp-commands
erts: Remove halfword MemKind mseg
erts: Remove halfword bases in ETS
erts: Remove halfword CHECK_POINTER_MASK
erts: Remove halfword relative printf
erts: Remove halfword valgrind suppress file
erts: Remove halfword specific tests
erts: Remove halfword specific allocator types
erts: Remove halfword BINARY RELs
erts: Remove halfword is_same bases macro
erts: Reinstate copy_object over-allocation optimization
erts: Remove halfword copy_object_rel
erts: Remove halfword object manipulation
erts: Remove halfword heap relative comparisions
erts: Remove halfword pointer compression
erts: Remove halfword basic relative heap operations
erts: Remove halfword from configure
erts: Remove halfword in lib_src
erts: Remove halfword in erl_nif.h
erts: Remove halfword in erl_driver.h
...
Diffstat (limited to 'erts/emulator/beam/erl_map.c')
-rw-r--r-- | erts/emulator/beam/erl_map.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/erts/emulator/beam/erl_map.c b/erts/emulator/beam/erl_map.c index a91e36e3c5..8f376fe595 100644 --- a/erts/emulator/beam/erl_map.c +++ b/erts/emulator/beam/erl_map.c @@ -170,26 +170,22 @@ BIF_RETTYPE maps_to_list_1(BIF_ALIST_1) { */ const Eterm * -#if HALFWORD_HEAP -erts_maps_get_rel(Eterm key, Eterm map, Eterm *map_base) -#else erts_maps_get(Eterm key, Eterm map) -#endif { Uint32 hx; - if (is_flatmap_rel(map, map_base)) { + if (is_flatmap(map)) { Eterm *ks, *vs; flatmap_t *mp; Uint n, i; - mp = (flatmap_t *)flatmap_val_rel(map, map_base); + mp = (flatmap_t *)flatmap_val(map); n = flatmap_get_size(mp); if (n == 0) { return NULL; } - ks = (Eterm *)tuple_val_rel(mp->keys, map_base) + 1; + ks = (Eterm *)tuple_val(mp->keys) + 1; vs = flatmap_get_values(mp); if (is_immed(key)) { @@ -201,16 +197,16 @@ erts_maps_get(Eterm key, Eterm map) } for (i = 0; i < n; i++) { - if (eq_rel(ks[i], map_base, key, NULL)) { + if (EQ(ks[i], key)) { return &vs[i]; } } return NULL; } - ASSERT(is_hashmap_rel(map, map_base)); + ASSERT(is_hashmap(map)); hx = hashmap_make_hash(key); - return erts_hashmap_get_rel(hx, key, map, map_base); + return erts_hashmap_get(hx, key, map); } BIF_RETTYPE maps_find_2(BIF_ALIST_2) { @@ -1993,11 +1989,7 @@ Eterm* hashmap_iterator_prev(ErtsWStack* s) { } const Eterm * -#if HALFWORD_HEAP -erts_hashmap_get_rel(Uint32 hx, Eterm key, Eterm node, Eterm *map_base) -#else erts_hashmap_get(Uint32 hx, Eterm key, Eterm node) -#endif { Eterm *ptr, hdr, *res; Uint ix, lvl = 0; @@ -2006,7 +1998,7 @@ erts_hashmap_get(Uint32 hx, Eterm key, Eterm node) UseTmpHeapNoproc(2); ASSERT(is_boxed(node)); - ptr = boxed_val_rel(node, map_base); + ptr = boxed_val(node); hdr = *ptr; ASSERT(is_header(hdr)); ASSERT(is_hashmap_header_head(hdr)); @@ -2027,15 +2019,15 @@ erts_hashmap_get(Uint32 hx, Eterm key, Eterm node) node = ptr[ix+1]; if (is_list(node)) { /* LEAF NODE [K|V] */ - ptr = list_val_rel(node,map_base); - res = eq_rel(CAR(ptr), map_base, key, NULL) ? &(CDR(ptr)) : NULL; + ptr = list_val(node); + res = EQ(CAR(ptr), key) ? &(CDR(ptr)) : NULL; break; } hx = hashmap_shift_hash(th,hx,lvl,key); ASSERT(is_boxed(node)); - ptr = boxed_val_rel(node, map_base); + ptr = boxed_val(node); hdr = *ptr; ASSERT(is_header(hdr)); ASSERT(!is_hashmap_header_head(hdr)); |