Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
enforce invariant of correct # of NFA fates
The mergesubstates method now always guarantees that states[0] has a size reflecting the number of fates used by this NFA. Previously it relied on its caller to set the fates list, and since /@array/ didn't do that (oops), the fate count was off, resulting in reallocations in the NFA engine. Since alternatives just use the fate numbers directly, they no longer have to set the fates. Protoregexes, on the other hand, still override the fate number with rxname, but now do so by setting it after mergesubstates sets it to the number.
- Loading branch information
Showing
2 changed files
with
4 additions
and
5 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