forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd3f4532
committed
Improve code clarity in epilogue of UTF-8 verification fast path
The previous coding was correct, but the style and commentary were a bitvague about which operations had to happen, in what circumstances, andin what order. Rearrange so that the epilogue does nothing in the DFA ENDstate. That allows turning some conditional statements in the backtrackinglogic into asserts. With that, we can be more explicit about needingto backtrack at least one byte in non-END states to ensure checking thecurrent byte sequence in the slow path. No change to the regression tests,since they should be able catch deficiencies here already.In passing, improve the comments around DFA states where the firstcontinuation byte has a restricted range.1 parent9007d4e commitd3f4532
1 file changed
+25
-25
lines changedLines changed: 25 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1807 | 1807 |
| |
1808 | 1808 |
| |
1809 | 1809 |
| |
1810 |
| - | |
1811 |
| - | |
1812 |
| - | |
1813 |
| - | |
1814 |
| - | |
1815 |
| - | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
1816 | 1815 |
| |
1817 | 1816 |
| |
1818 | 1817 |
| |
| |||
1941 | 1940 |
| |
1942 | 1941 |
| |
1943 | 1942 |
| |
1944 |
| - | |
1945 |
| - | |
1946 |
| - | |
1947 |
| - | |
1948 |
| - | |
| 1943 | + | |
1949 | 1944 |
| |
1950 | 1945 |
| |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
1951 | 1950 |
| |
1952 | 1951 |
| |
1953 | 1952 |
| |
1954 |
| - | |
1955 |
| - | |
1956 |
| - | |
1957 |
| - | |
1958 |
| - | |
1959 |
| - | |
1960 |
| - | |
1961 |
| - | |
1962 |
| - | |
| 1953 | + | |
1963 | 1954 |
| |
1964 |
| - | |
1965 |
| - | |
1966 |
| - | |
1967 |
| - | |
1968 |
| - | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
1969 | 1969 |
| |
1970 | 1970 |
| |
1971 | 1971 |
| |
|
0 commit comments
Comments
(0)