-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
10 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters