diff options
author | Lukas Larsson <[email protected]> | 2016-05-03 09:55:15 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-05-10 08:33:03 +0200 |
commit | dc203f539692a1191240209fb95afa020fa342b5 (patch) | |
tree | 7c1dc3894f9af840d80f9730df5bfd90f24414b3 | |
parent | e146a3eec5a2d384260aa8829777c89eaab09cbd (diff) | |
download | otp-dc203f539692a1191240209fb95afa020fa342b5.tar.gz otp-dc203f539692a1191240209fb95afa020fa342b5.tar.bz2 otp-dc203f539692a1191240209fb95afa020fa342b5.zip |
erts: Fix pre-bif yield current_function
-rw-r--r-- | erts/doc/src/erlang.xml | 2 | ||||
-rw-r--r-- | erts/emulator/beam/beam_emu.c | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 3930e5e11d..e0723127f2 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4364,7 +4364,7 @@ os_prompt% </pre> <p> <c>size</c> is the entire heap of the process when garbage collection is triggered, this includes all generational heaps, the process stack, - any <seealso marker="process_flag_message_queue_data"> + any <seealso marker="#process_flag_message_queue_data"> messages that are considered to be part of the heap</seealso> and any extra memory that the garbage collector needs during collection. </p> diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index a88fea3802..d00a563087 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -2823,7 +2823,7 @@ do { \ /* If we have run out of reductions, we do a context switch before calling the bif */ c_p->arity = ((Export *)Arg(0))->code[2]; - c_p->current = NULL; + c_p->current = ((Export *)Arg(0))->code; goto context_switch3; } @@ -3538,9 +3538,7 @@ do { \ if (!((FCALLS - 1) > 0 || (FCALLS - 1) > neg_o_reds)) { /* If we have run out of reductions, we do a context switch before calling the nif */ - c_p->arity = I[-1]; - c_p->current = NULL; - goto context_switch3; + goto context_switch; } ERTS_MSACC_SET_STATE_CACHED_M_X(ERTS_MSACC_STATE_NIF); @@ -3589,9 +3587,7 @@ do { \ if (!((FCALLS - 1) > 0 || (FCALLS - 1) > neg_o_reds)) { /* If we have run out of reductions, we do a context switch before calling the bif */ - c_p->arity = I[-1]; - c_p->current = NULL; - goto context_switch3; + goto context_switch; } if (ERTS_MSACC_IS_ENABLED_CACHED_X()) { |