unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: bug-gnulib@gnu.org, emacs-devel@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: [PATCH 1/4] dfa: omit unnecessary allocation
Date: Tue, 10 Jan 2017 02:13:29 -0800	[thread overview]
Message-ID: <20170110101332.15354-1-eggert@cs.ucla.edu> (raw)

* 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




             reply	other threads:[~2017-01-10 10:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 10:13 Paul Eggert [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170110101332.15354-1-eggert@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=bug-gnulib@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).