diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-03-26 10:38:49 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-03-26 10:38:49 +0100 |
commit | cb16ed8d78c9b19e85305dbaad9b5773085e509d (patch) | |
tree | 7a8979c83889989d684bc2e6804acc57ac0336dc /erts/emulator/beam/erl_gc.h | |
parent | 8eb65d33f0be00b06c3b8e44b5a2a830a106b831 (diff) | |
parent | 15ce2d396e5c3e5fe7c775a18764db1f7f589e54 (diff) | |
download | otp-cb16ed8d78c9b19e85305dbaad9b5773085e509d.tar.gz otp-cb16ed8d78c9b19e85305dbaad9b5773085e509d.tar.bz2 otp-cb16ed8d78c9b19e85305dbaad9b5773085e509d.zip |
Merge branch 'egil/maps/refactor-tagscheme/OTP-12585'
* egil/maps/refactor-tagscheme/OTP-12585:
erts: Refactor Map - use multiple values ESTACK_PUSHN
erts: GC needs the size even if the frag is not referenced
Revert "hipe: Handle separate hashmap tag correctly"
erts: Combine flat and hash maps under one unifying tag
Diffstat (limited to 'erts/emulator/beam/erl_gc.h')
-rw-r--r-- | erts/emulator/beam/erl_gc.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_gc.h b/erts/emulator/beam/erl_gc.h index 8afcb060a1..bd6dcc9078 100644 --- a/erts/emulator/beam/erl_gc.h +++ b/erts/emulator/beam/erl_gc.h @@ -55,9 +55,10 @@ do { \ nelts = header_arity(HDR); \ switch ((HDR) & _HEADER_SUBTAG_MASK) { \ case SUB_BINARY_SUBTAG: nelts++; break; \ - case MAP_SUBTAG: nelts+=flatmap_get_size(PTR) + 1; break; \ - case HASHMAP_SUBTAG: nelts=hashmap_bitcount(MAP_HEADER_VAL(HDR)); \ - nelts += is_hashmap_header_head(HDR) ? 1 : 0; break; \ + case MAP_SUBTAG: \ + if (is_flatmap_header(HDR)) nelts+=flatmap_get_size(PTR) + 1; \ + else nelts += hashmap_bitcount(MAP_HEADER_VAL(HDR)); \ + break; \ case FUN_SUBTAG: nelts+=((ErlFunThing*)(PTR))->num_free+1; break; \ } \ gval = make_boxed(HTOP); \ |