aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/copy.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-01-16 20:45:58 +0100
committerSverker Eriksson <[email protected]>2018-01-19 17:42:56 +0100
commitb20447803c80740e685feb1e266f8afce4c26cf8 (patch)
tree750fafff5a55fe15301da0a34f1a22251eb5db92 /erts/emulator/beam/copy.c
parentbf8c53ca0ab214ee794ba06376300e2da9cb51d2 (diff)
downloadotp-b20447803c80740e685feb1e266f8afce4c26cf8.tar.gz
otp-b20447803c80740e685feb1e266f8afce4c26cf8.tar.bz2
otp-b20447803c80740e685feb1e266f8afce4c26cf8.zip
erts: Optimize move_cons & move_boxed
Replace double pointer with return that can mostly be ignored. Use restrict pointers.
Diffstat (limited to 'erts/emulator/beam/copy.c')
-rw-r--r--erts/emulator/beam/copy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/copy.c b/erts/emulator/beam/copy.c
index 10bf197405..8a82154a08 100644
--- a/erts/emulator/beam/copy.c
+++ b/erts/emulator/beam/copy.c
@@ -1985,7 +1985,7 @@ move_one_frag(Eterm** hpp, ErlHeapFragment* frag, ErlOffHeap* off_heap, int lite
if (is_header(val)) {
struct erl_off_heap_header* hdr = (struct erl_off_heap_header*)hp;
ASSERT(ptr + header_arity(val) < end);
- move_boxed(&ptr, val, &hp, &dummy_ref);
+ ptr = move_boxed(ptr, val, &hp, &dummy_ref);
switch (val & _HEADER_SUBTAG_MASK) {
case REF_SUBTAG:
if (is_ordinary_ref_thing(hdr))
@@ -2002,7 +2002,7 @@ move_one_frag(Eterm** hpp, ErlHeapFragment* frag, ErlOffHeap* off_heap, int lite
}
else { /* must be a cons cell */
ASSERT(ptr+1 < end);
- move_cons(&ptr, val, &hp, &dummy_ref);
+ move_cons(ptr, val, &hp, &dummy_ref);
ptr += 2;
}
}