]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 16 Dec 2003 18:58:47 +0000 (18:58 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 16 Dec 2003 18:58:47 +0000 (18:58 +0000)
2002-12-16  Jakub Jelinek  <jakub@redhat.com>
            Paolo Bonzini  <bonzini@gnu.org>

* posix/regexec.c (group_nodes_into_DFAstates): Never produce
dests_ch items that are empty.

ChangeLog
posix/regexec.c

index ca7aa8493474ef3fa3c9fb893cf944fead7f067c..f852b850a25721aadc4a53e0d7757a7f03a46259 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-12-16  Jakub Jelinek  <jakub@redhat.com>
+            Paolo Bonzini  <bonzini@gnu.org>
+
+       * posix/regexec.c (group_nodes_into_DFAstates): Never produce
+       dests_ch items that are empty.
+
 2003-12-14  Paolo Bonzini  <bonzini@gnu.org>
 
        * posix/regexec.c (check_arrival): Remove duplicate test.
index 731b49dd579a24b1ea2036c4d40ddfb919454f44..0c2f7bf3ff76bfc6674b3f4d4ee5f255ebc3f34a 100644 (file)
@@ -3402,30 +3402,36 @@ group_nodes_into_DFAstates (preg, state, dests_node, dests_ch)
 
          if (constraint & NEXT_WORD_CONSTRAINT)
            {
+             unsigned int any_set = 0;
 #ifdef RE_ENABLE_I18N
              if (dfa->mb_cur_max > 1)
                for (j = 0; j < BITSET_UINTS; ++j)
-                 accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]);
+                 any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]));
              else
 #endif
                for (j = 0; j < BITSET_UINTS; ++j)
-                 accepts[j] &= dfa->word_char[j];
+                 any_set |= (accepts[j] &= dfa->word_char[j]);
+             if (!any_set)
+               continue;
            }
          if (constraint & NEXT_NOTWORD_CONSTRAINT)
            {
+             unsigned int any_set = 0;
 #ifdef RE_ENABLE_I18N
              if (dfa->mb_cur_max > 1)
                for (j = 0; j < BITSET_UINTS; ++j)
-                 accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j]);
+                 any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j]));
              else
 #endif
                for (j = 0; j < BITSET_UINTS; ++j)
-                 accepts[j] &= ~dfa->word_char[j];
+                 any_set |= (accepts[j] &= ~dfa->word_char[j]);
+             if (!any_set)
+               continue;
            }
        }
 
       /* Then divide `accepts' into DFA states, or create a new
-        state.  */
+        state.  Above, we make sure that accepts is not empty.  */
       for (j = 0; j < ndests; ++j)
        {
          bitset intersec; /* Intersection sets, see below.  */
This page took 0.056476 seconds and 5 git commands to generate.