diff options
author | Sverker Eriksson <[email protected]> | 2014-08-19 16:45:45 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2014-08-29 16:20:30 +0200 |
commit | 5d66bc37e4583074abd00cb05f9a377f39e2081f (patch) | |
tree | 8e9c8be8a014a7caea730dab383b62eb6e488dbf /erts/emulator/beam/utils.c | |
parent | c1676f09ea1176116b503de88604816a2da36ac5 (diff) | |
download | otp-5d66bc37e4583074abd00cb05f9a377f39e2081f.tar.gz otp-5d66bc37e4583074abd00cb05f9a377f39e2081f.tar.bz2 otp-5d66bc37e4583074abd00cb05f9a377f39e2081f.zip |
erts: Optimize some repeated calls to {E,W}STACK_PUSH
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 72092ec7b0..cd62394987 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -1228,25 +1228,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; } |