Improve the efficiency of RE2::Set match tracking.

Previously, RE2::Set match tracking worked by obtaining the match IDs
from the kInstMatch instructions in the final DFA state at the end of
the input string, but that required each kInstMatch instruction to be
propagated through intermediate DFA states. We can avoid most of that
inefficiency by propagating the match IDs only to the next DFA state.

Change-Id: I1340cb6d090b8ce5527eb34f6e2d382296185c47
Reviewed-on: https://code-review.googlesource.com/17470
Reviewed-by: Paul Wankadia <junyer@google.com>
2 files changed