aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/utils.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-03-10 19:03:19 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-12 19:15:33 +0100
commit27e57aa05354b743b735a41716c0e3af18f2843e (patch)
treee4fd8e92ce0af4e758864d800abbadb4f5c4bf3e /erts/emulator/beam/utils.c
parent693b99697950661cea7dbf2b504a4cf9a12a0880 (diff)
downloadotp-27e57aa05354b743b735a41716c0e3af18f2843e.tar.gz
otp-27e57aa05354b743b735a41716c0e3af18f2843e.tar.bz2
otp-27e57aa05354b743b735a41716c0e3af18f2843e.zip
erts: Refactor maps naming convention
flatmap: Small map hashmap: Large map map: flatmap or hashmap
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r--erts/emulator/beam/utils.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 66f13461a1..cc97e2f3d1 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -1274,11 +1274,11 @@ make_hash2(Eterm term)
break;
case MAP_SUBTAG:
{
- map_t *mp = (map_t *)map_val(term);
+ flatmap_t *mp = (flatmap_t *)flatmap_val(term);
int i;
- int size = map_get_size(mp);
- Eterm *ks = map_get_keys(mp);
- Eterm *vs = map_get_values(mp);
+ int size = flatmap_get_size(mp);
+ Eterm *ks = flatmap_get_keys(mp);
+ Eterm *vs = flatmap_get_values(mp);
UINT32_HASH(size, HCONST_16);
if (size == 0) {
goto hash2_common;
@@ -1669,11 +1669,11 @@ make_internal_hash(Eterm term)
break;
case MAP_SUBTAG:
{
- map_t *mp = (map_t *)map_val(term);
+ flatmap_t *mp = (flatmap_t *)flatmap_val(term);
int i;
- int size = map_get_size(mp);
- Eterm *ks = map_get_keys(mp);
- Eterm *vs = map_get_values(mp);
+ int size = flatmap_get_size(mp);
+ Eterm *ks = flatmap_get_keys(mp);
+ Eterm *vs = flatmap_get_values(mp);
UINT32_HASH(size, HCONST_16);
if (size == 0) {
goto pop_next;
@@ -2574,13 +2574,13 @@ tailrecur_ne:
}
case MAP_SUBTAG:
{
- aa = map_val_rel(a, a_base);
+ aa = flatmap_val_rel(a, a_base);
if (!is_boxed(b) || *boxed_val_rel(b,b_base) != *aa)
goto not_equal;
- bb = map_val_rel(b,b_base);
- sz = map_get_size((map_t*)aa);
+ bb = flatmap_val_rel(b,b_base);
+ sz = flatmap_get_size((flatmap_t*)aa);
- if (sz != map_get_size((map_t*)bb)) goto not_equal;
+ if (sz != flatmap_get_size((flatmap_t*)bb)) goto not_equal;
if (sz == 0) goto pop_next;
aa += 2;
@@ -3119,16 +3119,16 @@ tailrecur_ne:
++bb;
goto term_array;
case (_TAG_HEADER_MAP >> _TAG_PRIMARY_SIZE) :
- if (!is_map_rel(b,b_base)) {
+ if (!is_flatmap_rel(b,b_base)) {
a_tag = MAP_DEF;
goto mixed_types;
}
- aa = (Eterm *)map_val_rel(a,a_base);
- bb = (Eterm *)map_val_rel(b,b_base);
+ aa = (Eterm *)flatmap_val_rel(a,a_base);
+ bb = (Eterm *)flatmap_val_rel(b,b_base);
- i = map_get_size((map_t*)aa);
- if (i != map_get_size((map_t*)bb)) {
- RETURN_NEQ((int)(i - map_get_size((map_t*)bb)));
+ i = flatmap_get_size((flatmap_t*)aa);
+ if (i != flatmap_get_size((flatmap_t*)bb)) {
+ RETURN_NEQ((int)(i - flatmap_get_size((flatmap_t*)bb)));
}
if (i == 0) {
goto pop_next;