- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit3cbfe48
committed
Remove useless "retry memory" logic within regex engine.
Apparently some primordial version of Spencer's engine needed cdissect()and child functions to be able to continue matching from a previousposition when re-called. That is dead code, though, since trivialinspection shows that cdissect can never be entered without havingpreviously done zapmem which resets the relevant retry counter. I havealso verified experimentally that no case in the Tcl regression testsreaches cdissect with a nonzero retry value. Accordingly, remove thatlogic. This doesn't really save any noticeable number of cycles in itself,but it is one step towards making dissect() and cdissect() equivalent,which will allow removing hundreds of lines of near-duplicated code.Since struct subre's "retry" field is no longer particularly related toany kind of retry, rename it to "id". As of this commit it's only usedfor identifying a subre node in debug printouts, so you might think weshould get rid of the field entirely; but I have a plan for another use.1 parent1fbacbf commit3cbfe48
3 files changed
+78
-150
lines changedLines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1623 | 1623 |
| |
1624 | 1624 |
| |
1625 | 1625 |
| |
1626 |
| - | |
| 1626 | + | |
1627 | 1627 |
| |
1628 | 1628 |
| |
1629 | 1629 |
| |
| |||
1693 | 1693 |
| |
1694 | 1694 |
| |
1695 | 1695 |
| |
1696 |
| - | |
| 1696 | + | |
1697 | 1697 |
| |
1698 | 1698 |
| |
1699 | 1699 |
| |
| |||
1704 | 1704 |
| |
1705 | 1705 |
| |
1706 | 1706 |
| |
1707 |
| - | |
| 1707 | + | |
1708 | 1708 |
| |
1709 | 1709 |
| |
1710 | 1710 |
| |
| |||
1999 | 1999 |
| |
2000 | 2000 |
| |
2001 | 2001 |
| |
2002 |
| - | |
2003 |
| - | |
| 2002 | + | |
| 2003 | + | |
2004 | 2004 |
| |
2005 |
| - | |
2006 |
| - | |
| 2005 | + | |
| 2006 | + | |
2007 | 2007 |
| |
2008 | 2008 |
| |
2009 | 2009 |
| |
|
0 commit comments
Comments
(0)