Chromium Code Reviews| Index: fusl/src/regex/regcomp.c |
| diff --git a/fusl/src/regex/regcomp.c b/fusl/src/regex/regcomp.c |
| index 0e1255f707f38704f3275f4aa28dd1fbad9ed8ef..45c0f349c327165fa18b9ce1df46f3ef9b07800d 100644 |
| --- a/fusl/src/regex/regcomp.c |
| +++ b/fusl/src/regex/regcomp.c |
| @@ -2312,21 +2312,20 @@ static reg_errcode_t tre_make_trans(tre_pos_and_tags_t* p1, |
| trans = transitions + offs[p1->position]; |
| while (trans->state != NULL) { |
| #if 0 |
| - /* If we find a previous transition from `p1->position' to |
| - `p2->position', it is overwritten. This can happen only |
| - if there are nested loops in the regexp, like in "((a)*)*". |
| - In POSIX.2 repetition using the outer loop is always |
| - preferred over using the inner loop. Therefore the |
| - transition for the inner loop is useless and can be thrown |
| - away. */ |
| - /* XXX - The same position is used for all nodes in a bracket |
| - expression, so this optimization cannot be used (it will |
| - break bracket expressions) unless I figure out a way to |
| - detect it here. */ |
| - if (trans->state_id == p2->position) |
| - { |
| - break; |
| - } |
| + /* If we find a previous transition from `p1->position' to |
| + `p2->position', it is overwritten. This can happen only |
| + if there are nested loops in the regexp, like in "((a)*)*". |
| + In POSIX.2 repetition using the outer loop is always |
| + preferred over using the inner loop. Therefore the |
|
viettrungluu
2016/02/19 17:21:53
You still have a tab!
kulakowski
2016/02/19 18:03:22
Yeah. I said in the message that I didn't get ones
|
| + transition for the inner loop is useless and can be thrown |
| + away. */ |
| + /* XXX - The same position is used for all nodes in a bracket |
| + expression, so this optimization cannot be used (it will |
| + break bracket expressions) unless I figure out a way to |
| + detect it here. */ |
| + if (trans->state_id == p2->position) { |
| + break; |
| + } |
| #endif |
| trans++; |
| } |