| 1226 | } |
| 1227 | |
| 1228 | void Parse1BitState(benchmark::State& state, const char* regexp, |
| 1229 | const StringPiece& text) { |
| 1230 | for (auto _ : state) { |
| 1231 | Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL); |
| 1232 | CHECK(re); |
| 1233 | Prog* prog = re->CompileToProg(0); |
| 1234 | CHECK(prog); |
| 1235 | CHECK(prog->CanBitState()); |
| 1236 | StringPiece sp[2]; // 2 because sp[0] is whole match. |
| 1237 | CHECK(prog->SearchBitState(text, text, Prog::kAnchored, Prog::kFullMatch, sp, 2)); |
| 1238 | delete prog; |
| 1239 | re->Decref(); |
| 1240 | } |
| 1241 | } |
| 1242 | |
| 1243 | void Parse1PCRE(benchmark::State& state, const char* regexp, |
| 1244 | const StringPiece& text) { |
nothing calls this directly
no test coverage detected