Commit eaa68d3
committed
regex: don't LEAVE_SCOPE() in S_regtry()
This commit should produce no practical change in functionality.
Currently, S_regtry() notes the position of PL_savestack_ix, calls
S_regmatch(), then pops the savestack back to that position. However,
S_regmatch() also does this just before returning, so it's redundant in
S_regtry(). (A temporary assert confirmed that lastcp == PL_savestack_ix
in S_regtry always while running the test suite).
So this commit removes the REGCP_UNWIND(lastcp) and associated machinery
from S_regtry().
It also regularises the "note current ix; pop back to old ix" code at
the start and end of S_regmatch() to use the standard REGCP_SET() and
REGCP_UNWIND() macros which do the same thing but also produce debugging
messages.1 parent 7ddc008 commit eaa68d3
1 file changed
+6
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4408 | 4408 | | |
4409 | 4409 | | |
4410 | 4410 | | |
4411 | | - | |
4412 | 4411 | | |
4413 | 4412 | | |
4414 | 4413 | | |
4415 | | - | |
4416 | | - | |
4417 | | - | |
4418 | 4414 | | |
4419 | 4415 | | |
4420 | 4416 | | |
| |||
4458 | 4454 | | |
4459 | 4455 | | |
4460 | 4456 | | |
4461 | | - | |
4462 | 4457 | | |
4463 | 4458 | | |
4464 | 4459 | | |
4465 | 4460 | | |
4466 | 4461 | | |
4467 | 4462 | | |
4468 | 4463 | | |
4469 | | - | |
4470 | 4464 | | |
4471 | 4465 | | |
4472 | 4466 | | |
| |||
6712 | 6706 | | |
6713 | 6707 | | |
6714 | 6708 | | |
6715 | | - | |
| 6709 | + | |
6716 | 6710 | | |
6717 | 6711 | | |
6718 | 6712 | | |
| |||
6747 | 6741 | | |
6748 | 6742 | | |
6749 | 6743 | | |
| 6744 | + | |
| 6745 | + | |
6750 | 6746 | | |
6751 | 6747 | | |
6752 | 6748 | | |
| |||
10399 | 10395 | | |
10400 | 10396 | | |
10401 | 10397 | | |
10402 | | - | |
10403 | | - | |
| 10398 | + | |
| 10399 | + | |
| 10400 | + | |
10404 | 10401 | | |
10405 | 10402 | | |
10406 | 10403 | | |
| |||
0 commit comments