aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/utils.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-08-19 16:45:45 +0200
committerSverker Eriksson <[email protected]>2014-08-29 16:20:30 +0200
commit5d66bc37e4583074abd00cb05f9a377f39e2081f (patch)
tree8e9c8be8a014a7caea730dab383b62eb6e488dbf /erts/emulator/beam/utils.c
parentc1676f09ea1176116b503de88604816a2da36ac5 (diff)
downloadotp-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.c11
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;
}