summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-12-16 12:30:01 +0000
committerDavid Mitchell <davem@iabyn.com>2016-02-03 09:18:34 +0000
commit799da9d7a389d2e825fba9c63b2f6876513385c7 (patch)
tree2b77332b832f7cf6a5ceec8e0a97936aadf2a5ed /embed.fnc
parentd8bdd59a731e612643be6a230102949e419f17db (diff)
downloadperl-799da9d7a389d2e825fba9c63b2f6876513385c7.tar.gz
make pp_leavesublv use S_leavesub_adjust_stacks()
Currently S_leavesub_adjust_stacks() is just used by pp_leavesub. Rename it to Perl_leave_adjust_stacks(), extend its functionality slightly, then make pp_leavesublv() use it too. This means that lvalue sub exit gains the benefit of FREETMPS being done, and (where mortal copying needs doing) the optimised copying code. It also means there is now one less version of the "process args on scope exit" code. pp_leavesublv() still does a scan of its return args looking for things to croak() on, but leaves everything else to leave_adjust_stacks(). leave_adjust_stacks() is intended shortly to be used in place of S_leave_common() too, thus unifying all args-on-scope-exit code. The changes to leave_adjust_stacks() in this commit (apart from the renaming and doc changes) are: * a new arg to indicate what condition to use to decide whether to pass or copy the arg; * a new branch to mortalise and ref count bump an arg
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc2
1 files changed, 2 insertions, 0 deletions
diff --git a/embed.fnc b/embed.fnc
index 61509f0b7c..b8c5810315 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2878,4 +2878,6 @@ Ei |STRLEN |sv_or_pv_pos_u2b|NN SV *sv|NN const char *pv|STRLEN pos \
EMpPX |SV* |_get_encoding
Xp |void |clear_defarray |NN AV* av|bool abandon
+ApM |void |leave_adjust_stacks|NN SV **base_sp|I32 gimme|int filter
+
: ex: set ts=8 sts=4 sw=4 noet: