m4-patches
[Top][All Lists]
Advanced

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

FYI: 13-gary-remove-redundant-traced-field.patch


From: Gary V. Vaughan
Subject: FYI: 13-gary-remove-redundant-traced-field.patch
Date: Sat, 8 Sep 2001 03:45:16 +0100
User-agent: Mutt/1.3.22.1i

Hi Akim,

I have applied this one because I am 90% sure that it is okay, but
since you have a lot more experience with tracing in m4, please pay
special attention to this patch incase I am missing something.  It
*does* look like a duplicatation between m4_symbol.traced and
m4_symbol.data->traced to me...

Cheers,
        Gary.

Index: ChangeLog
from  Gary V. Vaughan  <address@hidden>
        * m4/m4private.h (struct m4_token_data): Simplified by removing
        the redundant `traced' flag, and one level of structure nesting.
        (M4_TOKEN_DATA_FUNC_TRACED): Removed.
        * m4/input.c (init_macro_token): No need to initialise removed
        `traced' field.
        * m4/macro.c (expand_argument): No need to copy it either.
        * m4/utility.c (m4_token_data_func_traced): Or provide an access
        function.

Index: m4/input.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/input.c,v
retrieving revision 1.8
diff -u -p -u -r1.8 input.c
--- m4/input.c 2001/08/30 21:57:00 1.8
+++ m4/input.c 2001/09/08 02:36:08
@@ -605,7 +605,6 @@ init_macro_token (m4_token_data *td)
 
   M4_TOKEN_DATA_TYPE (td) = M4_TOKEN_FUNC;
   M4_TOKEN_DATA_FUNC (td) = isp->u.u_m.func;
-  M4_TOKEN_DATA_FUNC_TRACED (td) = isp->u.u_m.traced;
   M4_TOKEN_DATA_HANDLE (td) = isp->u.u_m.handle;
 }
 
Index: m4/m4module.h
===================================================================
RCS file: /cvsroot/m4/m4/m4/m4module.h,v
retrieving revision 1.27
diff -u -p -u -r1.27 m4module.h
--- m4/m4module.h 2001/09/08 01:56:34 1.27
+++ m4/m4module.h 2001/09/08 02:36:09
@@ -130,7 +130,6 @@ typedef void m4_module_finish_func (lt_d
 extern m4_token_data_t  m4_token_data_type       (m4_token_data*);
 extern char           *m4_token_data_text        (m4_token_data*);
 extern m4_builtin_func *m4_token_data_func       (m4_token_data*);
-extern boolean         m4_token_data_func_traced (m4_token_data*);
 
 
 #define M4ARG(i)       (argc > (i) ? m4_token_data_text (argv[i]) : "")
Index: m4/m4private.h
===================================================================
RCS file: /cvsroot/m4/m4/m4/m4private.h,v
retrieving revision 1.7
diff -u -p -u -r1.7 m4private.h
--- m4/m4private.h 2001/09/01 20:05:27 1.7
+++ m4/m4private.h 2001/09/08 02:36:09
@@ -40,13 +40,8 @@ struct m4_token_data {
   boolean              blind_no_args;
   lt_dlhandle          handle;
   union {
-    struct {
-       char *          text;
-    } u_t;
-    struct {
-       m4_builtin_func *func;
-       boolean         traced;
-    } u_f;
+    char *             text;
+    m4_builtin_func *  func;
   } u;
 };
 
@@ -55,9 +50,8 @@ struct m4_token_data {
 #define M4_TOKEN_MACRO_ARGS(Td)                ((Td)->macro_args)
 #define M4_TOKEN_BLIND_NO_ARGS(Td)     ((Td)->blind_no_args)
 #define M4_TOKEN_DATA_HANDLE(Td)       ((Td)->handle)
-#define M4_TOKEN_DATA_TEXT(Td)         ((Td)->u.u_t.text)
-#define M4_TOKEN_DATA_FUNC(Td)         ((Td)->u.u_f.func)
-#define M4_TOKEN_DATA_FUNC_TRACED(Td)  ((Td)->u.u_f.traced)
+#define M4_TOKEN_DATA_TEXT(Td)         ((Td)->u.text)
+#define M4_TOKEN_DATA_FUNC(Td)         ((Td)->u.func)
 
 /* Redefine the exported function to this faster
    macro based version for internal use by the m4 code. */
Index: m4/macro.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/macro.c,v
retrieving revision 1.10
diff -u -p -u -r1.10 macro.c
--- m4/macro.c 2001/09/05 07:49:45 1.10
+++ m4/macro.c 2001/09/08 02:36:10
@@ -169,7 +169,6 @@ expand_argument (struct obstack *obs, m4
              M4_TOKEN_DATA_TYPE (argp) = M4_TOKEN_FUNC;
              M4_TOKEN_DATA_HANDLE (argp) = M4_TOKEN_DATA_HANDLE (&td);
              M4_TOKEN_DATA_FUNC (argp) = M4_TOKEN_DATA_FUNC (&td);
-             M4_TOKEN_DATA_FUNC_TRACED (argp) = M4_TOKEN_DATA_FUNC_TRACED 
(&td);
            }
          break;
 
Index: m4/utility.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/utility.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 utility.c
--- m4/utility.c 2001/09/05 07:51:41 1.12
+++ m4/utility.c 2001/09/08 02:36:11
@@ -96,12 +96,6 @@ m4_token_data_func (m4_token_data *name)
   return M4_TOKEN_DATA_FUNC(name);
 }
 
-boolean
-m4_token_data_func_traced (m4_token_data *name)
-{
-  return M4_TOKEN_DATA_FUNC_TRACED(name);
-}
-
 
 
 /* Give friendly warnings if a builtin macro is passed an inappropriate

-- 
  ())_. Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/  Research Scientist  http://www.oranda.demon.co.uk       ,_())____
  / )=  GNU Hacker          http://www.gnu.org/software/libtool  \'      `&
`(_~)_  Tech' Author        http://sources.redhat.com/autobook   =`---d__/



reply via email to

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