diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-04-16 15:01:55 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-04-16 15:01:55 +0200 |
commit | 51a270568842ffd4f764293f25044337695618fa (patch) | |
tree | 94c0a04c05be3fee0bd6f3a4321ee91a2855c2ac /erts/emulator/beam/erl_map.c | |
parent | 77484f2430133ec98ce0c63e037c3e3d183910be (diff) | |
parent | 647c66952afa9036c060a7685071bb27e01c2151 (diff) | |
download | otp-51a270568842ffd4f764293f25044337695618fa.tar.gz otp-51a270568842ffd4f764293f25044337695618fa.tar.bz2 otp-51a270568842ffd4f764293f25044337695618fa.zip |
Merge branch 'egil/maps-refactor'
* egil/maps-refactor:
erts: Use make_small for size terms on flat maps
Conflicts:
erts/emulator/beam/erl_bif_guard.c
Diffstat (limited to 'erts/emulator/beam/erl_map.c')
-rw-r--r-- | erts/emulator/beam/erl_map.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/erts/emulator/beam/erl_map.c b/erts/emulator/beam/erl_map.c index 3aebbfdaa3..bb2a2bcdf9 100644 --- a/erts/emulator/beam/erl_map.c +++ b/erts/emulator/beam/erl_map.c @@ -102,14 +102,8 @@ static int hxnodecmpkey(hxnode_t* a, hxnode_t* b); BIF_RETTYPE map_size_1(BIF_ALIST_1) { if (is_flatmap(BIF_ARG_1)) { - Eterm *hp; - Uint hsz = 0; flatmap_t *mp = (flatmap_t*)flatmap_val(BIF_ARG_1); - Uint n = flatmap_get_size(mp); - - erts_bld_uint(NULL, &hsz, n); - hp = HAlloc(BIF_P, hsz); - BIF_RET(erts_bld_uint(&hp, NULL, n)); + BIF_RET(make_small(flatmap_get_size(mp))); } else if (is_hashmap(BIF_ARG_1)) { Eterm *head, *hp, res; Uint size, hsz=0; |