forked from schacon/perl
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use PL_parser->lex_shared instead of Sv[IN]VX(PL_linestr)
Unfortunately, PL_parser->linestr and PL_parser->bufptr are both part of the API, so we can’t just move them to PL_parser->lex_shared. Instead, we have to copy them in sublex_push, to make them visible to inner lexing scopes. This allows the SvIVX(PL_linestr) and SvNVX(PL_linestr) hack to be removed. It should also speed things up slightly. We are already allocating PL_parser->lex_shared in sublex_push, so there should be no need to upgrade PL_linestr to SvNVX as well. I was pleasantly surprised to see how the here-doc code seemed to shrink all by itself when modified to account. PL_sublex_info.super_bufptr is also superseded by the addition of ->ls_bufptr to the LEXSHARED struct. Its old values when localised were not visible, being stashed away on the savestack, so it was harder to use.
- Loading branch information
Father Chrysostomos
committed
Aug 28, 2012
1 parent
4730151
commit 60f40a3
Showing
3 changed files
with
23 additions
and
40 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
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