unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 1/4] dfa: omit unnecessary allocation
@ 2017-01-10 10:13 Paul Eggert
  2017-01-10 10:13 ` [PATCH 2/4] dfa: omit unnecessary ptrdiff_t check Paul Eggert
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paul Eggert @ 2017-01-10 10:13 UTC (permalink / raw)
  To: bug-gnulib, emacs-devel; +Cc: Paul Eggert

* lib/dfa.c (dfaanalyze): Do not allocate follow set, since
an all-zero follow set works just fine.
---
 ChangeLog | 4 ++++
 lib/dfa.c | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f0cd277..beeefb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2017-01-09  Paul Eggert  <eggert@cs.ucla.edu>
 
+	dfa: omit unnecessary allocation
+	* lib/dfa.c (dfaanalyze): Do not allocate follow set, since
+	an all-zero follow set works just fine.
+
 	dfa: omit unused local
 	* lib/dfa.c (build_state): Fix up recent change.
 
diff --git a/lib/dfa.c b/lib/dfa.c
index e8cb6bb..b27bef4 100644
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -2501,8 +2501,6 @@ dfaanalyze (struct dfa *d, bool searchflag)
           firstpos->index = lastpos->index = i;
           firstpos->constraint = lastpos->constraint = NO_CONSTRAINT;
 
-          /* Allocate the follow set for this position.  */
-          alloc_position_set (&d->follows[i], 1);
           break;
         }
 #ifdef DEBUG
-- 
2.9.3




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-10 10:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 10:13 [PATCH 1/4] dfa: omit unnecessary allocation Paul Eggert
2017-01-10 10:13 ` [PATCH 2/4] dfa: omit unnecessary ptrdiff_t check Paul Eggert
2017-01-10 10:13 ` [PATCH 3/4] dfa: shrink constraints from 4 bits to 3 Paul Eggert
2017-01-10 10:13 ` [PATCH 4/4] dfa: minor simplification with emptyset Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).