Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RT 131898: Fix native closures failing on the second run
On the first call of a native sub we create a new subroutine body and replace the original (stored in the routine's $!do attribute). We also set the invocation spec so the body will be called instead of the CALL-ME method. This invocation spec is shared between an original routine and it's clones. If the routine is a clousre, the body won't be shared as only a clone of the routine will be actually visible in the lexical scope. So until someone comes up with a better idea, we won't create an optimized version for a closure anymore.
- Loading branch information
Showing
2 changed files
with
19 additions
and
2 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