aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/utils.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-02-11 21:50:25 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-12 19:15:23 +0100
commit442c9b4d11a62c55b46ffb25f27b5ec5fb3adda7 (patch)
tree1167524b8fea2e3299cfdc33b97da180d784805e /erts/emulator/beam/utils.c
parentaad7d6fe4e1e9fe086d275ab3ea34c5285cc8edb (diff)
downloadotp-442c9b4d11a62c55b46ffb25f27b5ec5fb3adda7.tar.gz
otp-442c9b4d11a62c55b46ffb25f27b5ec5fb3adda7.tar.bz2
otp-442c9b4d11a62c55b46ffb25f27b5ec5fb3adda7.zip
erts: First recursive version of hashmap compare
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r--erts/emulator/beam/utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 908116c64c..9fd53e941d 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -2702,6 +2702,19 @@ tailrecur_ne:
goto tailrecur;
}
+ case (_TAG_HEADER_HASHMAP >> _TAG_PRIMARY_SIZE) :
+ {
+ if (!is_hashmap_rel(b,b_base)) {
+ a_tag = HASHMAP_DEF;
+ goto mixed_types;
+ }
+ i = (((hashmap_head_t*) hashmap_val_rel(a,a_base))->size -
+ ((hashmap_head_t*) hashmap_val_rel(b,b_base))->size);
+ if (i) {
+ RETURN_NEQ(i);
+ }
+ ON_CMP_GOTO(hashmap_cmp(a, b));
+ }
case (_TAG_HEADER_FLOAT >> _TAG_PRIMARY_SIZE):
if (!is_float_rel(b,b_base)) {
a_tag = FLOAT_DEF;