autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.63-54-g


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-54-g257a2a6
Date: Thu, 16 Oct 2008 16:56:42 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=257a2a68d02470c252b1183308d9f484a56c8ae6

The branch, master has been updated
       via  257a2a68d02470c252b1183308d9f484a56c8ae6 (commit)
      from  2535dcc192d86c46478463049b2acb39f4856413 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 257a2a68d02470c252b1183308d9f484a56c8ae6
Author: Eric Blake <address@hidden>
Date:   Thu Oct 16 10:14:09 2008 -0600

    Speed up m4_qlen with caching.
    
    * lib/m4sugar/m4sugar.m4 (_m4_qlen): Renamed from old m4_qlen.
    (m4_qlen): Cache results for speed.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |    6 ++++++
 lib/m4sugar/m4sugar.m4 |   19 +++++++++++++------
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8eef61d..dfbbdfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-16  Eric Blake  <address@hidden>
+
+       Speed up m4_qlen with caching.
+       * lib/m4sugar/m4sugar.m4 (_m4_qlen): Renamed from old m4_qlen.
+       (m4_qlen): Cache results for speed.
+
 2008-10-16  Paolo Bonzini  <address@hidden>
 
        Add a testcase using more then one language.
diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4
index 2e02a77..681f4b0 100644
--- a/lib/m4sugar/m4sugar.m4
+++ b/lib/m4sugar/m4sugar.m4
@@ -2221,7 +2221,7 @@ dnl either way, insert the word
                      m4_eval(m4_Indent + m4_qlen(_m4_defn([m4_Word])) + 1))
 [$2]],
       [m4_Separator[]])_m4_defn([m4_Word])])]],
-dnl finally, clean up the local variabls
+dnl finally, clean up the local variables
 [[_m4_popdef([m4_Separator], [m4_Cursor], [m4_Indent])]]))
 
 
@@ -2246,12 +2246,19 @@ m4_define([m4_text_box],
 # ---------------
 # Expands to the length of STRING after autom4te converts all quadrigraphs.
 #
-# Avoid bpatsubsts for the common case of no quadrigraphs.
+# Avoid bpatsubsts for the common case of no quadrigraphs.  Cache
+# results, as configure scripts tend to ask about lengths of common
+# strings like `/*' and `*/' rather frequently.  Minimize the number
+# of times that $1 occurs in m4_qlen, so there is less text to parse
+# on a cache hit.
 m4_define([m4_qlen],
-[m4_if(m4_index([$1], address@hidden), [-1], [m4_len([$1])],
-       [m4_len(m4_bpatsubst([[$1]],
-                           
address@hidden(\(<:\|:>\|S|\|%:\|\{:\|:\}\)\(@\)\|&address@hidden)],
-                           [\3]))])])
+[m4_ifdef([$0-$1], [_m4_defn([$0-]], [_$0(])[$1])])
+m4_define([_m4_qlen],
+[m4_define([m4_qlen-$1],
+m4_if(m4_index([$1], address@hidden), [-1], [m4_len([$1])],
+      [m4_len(m4_bpatsubst([[$1]],
+                          
address@hidden(\(<:\|:>\|S|\|%:\|\{:\|:\}\)\(@\)\|&address@hidden)],
+                          [\3]))]))_m4_defn([m4_qlen-$1])])
 
 
 # m4_qdelta(STRING)


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

[Prev in Thread] Current Thread [Next in Thread]