diff options
author | Sverker Eriksson <[email protected]> | 2014-11-03 18:07:02 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2014-11-03 18:07:02 +0100 |
commit | c84fdab1ad76931b98cd298c3421d3202eb7b52a (patch) | |
tree | c8e954a4093f42942a3beec1eb91680b3759b7f3 /erts/emulator/beam/utils.c | |
parent | c3d006f6542e924c73dbfc76da64dacbeeeadfd0 (diff) | |
parent | d3f0abb4daf5c823f05c3908fdc4f6ee01035937 (diff) | |
download | otp-c84fdab1ad76931b98cd298c3421d3202eb7b52a.tar.gz otp-c84fdab1ad76931b98cd298c3421d3202eb7b52a.tar.bz2 otp-c84fdab1ad76931b98cd298c3421d3202eb7b52a.zip |
Merge branch 'sverk/yielding-distr-send/OTP-12232'
* sverk/yielding-distr-send/OTP-12232:
erts: Add constant TERM_TO_BINARY_MEMCPY_FACTOR
erts: Optimize some repeated calls to {E,W}STACK_PUSH
erts: Yield in term_to_binary when encoding big maps
erts: Remove unnecessary goto for fun encoding
erts: Yield in term_to_binary while copying large binaries
erts: Implement yielding for distributed send of large messages
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r-- | erts/emulator/beam/utils.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index 9b3ee5cc65..e03cd22070 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -1232,25 +1232,20 @@ make_hash2(Eterm term) if (size == 0) { goto hash2_common; } - ESTACK_PUSH(s, hash_xor_values); - ESTACK_PUSH(s, hash_xor_keys); - ESTACK_PUSH(s, hash); - ESTACK_PUSH(s, HASH_MAP_TAIL); + ESTACK_PUSH4(s, hash_xor_values, hash_xor_keys, hash, HASH_MAP_TAIL); hash = 0; hash_xor_keys = 0; hash_xor_values = 0; for (i = size - 1; i >= 0; i--) { tmp = vs[i]; - ESTACK_PUSH(s, HASH_MAP_VAL); - ESTACK_PUSH(s, tmp); + ESTACK_PUSH2(s, HASH_MAP_VAL, tmp); } /* We do not want to expose the tuple representation. * Do not push the keys as a tuple. */ for (i = size - 1; i >= 0; i--) { tmp = ks[i]; - ESTACK_PUSH(s, HASH_MAP_KEY); - ESTACK_PUSH(s, tmp); + ESTACK_PUSH2(s, HASH_MAP_KEY, tmp); } goto hash2_common; } |