summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2022-12-31 22:02:31 +0000
committerYves Orton <demerphq@gmail.com>2023-02-28 20:53:51 +0800
commit214a9432e04871da2b88eba02ea3f1148a99f9c8 (patch)
tree9f1c36e6171d4e7df22d4c29f4bf480fd67c9747 /pp_ctl.c
parente9ba788868247fdfb2a2fbf69079290fb5d11962 (diff)
downloadperl-214a9432e04871da2b88eba02ea3f1148a99f9c8.tar.gz
call_sv, amagic_call: call pp_entersub via runops
These two functions do a slightly odd thing (which has been present since 5.000) when calling out to a CV: they half fake up an OP_ENTERSUB, then call pp_entersub() directly, and only then if it returns a non-null PL_op value, execute the rest of the ops of the sub within a CALLRUNOPS() loop. I can't find any particular reason for this. I guess it might make calling XS subs infinitesimally faster by not have to invoke the runops loop when only a single op is executed (the entersub), but hardly seems worth the effort. Conversely, eliminating this special-case makes the code cleaner, and it will allow the workarounds planned to be added shortly (to the runops loops for reference-counted stacks) to work uniformly. Without this commit, pp_entersub() would get called before runops() has had a chance to fix up the stack if necessary. So this commit *fully* populates the fake OP_ENTERSUB (including type and pp address) then causes pp_entersub to be invoked implicitly from the runops loop rather than explicitly.
Diffstat (limited to 'pp_ctl.c')
0 files changed, 0 insertions, 0 deletions