Changeset 5903 for icGREP/icgrep-devel


Ignore:
Timestamp:
Mar 12, 2018, 7:12:24 PM (13 months ago)
Author:
cameron
Message:

Optimization for ASCII sequences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r5902 r5903  
    130130    } else if (a == &cc::Unicode) {
    131131        MarkerType m = compile(toUTF8(cc), pb);
    132         nextPos = markerVar(AdvanceMarker(marker, FinalPostPositionUnit, pb));
     132        if (isByteLength(cc)) {
     133            if (marker.pos == FinalMatchUnit) {
     134                nextPos = pb.createAdvance(nextPos, 1);
     135            }
     136        } else {
     137            nextPos = markerVar(AdvanceMarker(marker, FinalPostPositionUnit, pb));
     138        }
    133139        return makeMarker(FinalMatchUnit, pb.createAnd(markerVar(m), nextPos));
    134140    } else {
Note: See TracChangeset for help on using the changeset viewer.