public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Laurynas Biveinis <laurynas.biveinis@gmail.com>
To: Basile Starynkevitch <basile@starynkevitch.net>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: gengtype improvements for plugins, thirdround! patch 2/7 [verbosity]
Date: Wed, 22 Sep 2010 11:11:00 -0000	[thread overview]
Message-ID: <AANLkTin9Qgz5+K5Ge4EMj5a_0qAa__kwHukQuvc=zJ61@mail.gmail.com> (raw)
In-Reply-To: <20100921210829.5f2ea8b0.basile@starynkevitch.net>

2010/9/21 Basile Starynkevitch <basile@starynkevitch.net>:
> In addition of verbose messages, we added a tiny but useful feature to
> gengtype. When given a backup directory thru the -B program option and
> when it is generating a file gt-foo.h, gengtype renames the old
> version into the backup directory so that the user could compare the
> old version with the current one.  Verbosity & backing up of old files
> go together (in verbose mode, the renaming is told to the
> user). Backing up is no longer by default.  Per Laurynas' wish, it
> should be enabled by its program option.

Although I agree that if backups go in, they should have their own
switch, my wish was to remove the backup feature altogether. Merits of
backups aside, since now backup is independent from verbosity, it
should be submitted in a separate patch.

@@ -1511,8 +1520,15 @@ static void
 set_gc_used (pair_p variables)
 {
   pair_p p;
+  int nbvars = 0;
   for (p = variables; p; p = p->next)
+    {
+      DBGPRINTF ("set_gc_used p %p '%s' nbvars %d", (void*) p,
p->name, nbvars);
     set_gc_used_type (p->type, GC_USED, NULL);

Indentation is wrong.

+      if (!is_file_equal (of))
+	{

Indentation is wrong.

@@ -2894,11 +2941,26 @@ write_types (outf_p output_header, type_
 	  {
 	    type_p ss;
 	    for (ss = s->u.s.lang_struct; ss; ss = ss->next)
+	      {
+		nbfun++;
+		DBGPRINTF ("writing func #%d lang_struct ss @ %p '%s'",
+			   nbfun, (void*) ss, ss->u.s.tag);
 	      write_func_for_structure (s, ss, NULL, wtd);
 	  }
+	  }
 	else
+	  {
+	    nbfun++;
+	    DBGPRINTF ("writing func #%d struct s @ %p '%s'",
+		       nbfun, (void*) s, s->u.s.tag);
 	  write_func_for_structure (s, s, NULL, wtd);
       }
+      }

Indentation is wrong.

+	  DBGPRINTF ("write_enum_defn s %p #%d is unionorstruct tagged %s",

union or struct. Also indentation is wrong in the code surrounding this line.

> 2010-09-20  Jeremie Salvucci  <jeremie.salvucci@free.fr>
>            Basile Starynkevitch  <basile@starynkevitch.net>
>
>        * gengtype.c (verbosity_level, backup_dir): Added variables.
>        (set_gc_used): Count variables for verbosity.
>        (close_output_files): Backing up files, counting written ones
>        verbosily.
>        (write_types): Count emitted functions for verbosity. Added
>        debug messages.
>        (write_enum_defn): Count structures for verbosity. Added debug
>        messages.
>        (gengtype_long_options): Added "verbose".
>        (print_usage): Ditto.
>        (main): Verbose display of parsed files.
>
>        * gengtype.h (verbosity_level): Added declaration.

-- 
Laurynas

  parent reply	other threads:[~2010-09-22  2:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21 19:41 gengtype improvements for plugins, thirdround! patch 1/7 [declprog] Basile Starynkevitch
2010-09-21 22:07 ` gengtype improvements for plugins, thirdround! patch 2/7 [verbosity] Basile Starynkevitch
2010-09-21 22:43   ` gengtype improvements for plugins, thirdround! patch 3/7 [inputfile] Basile Starynkevitch
2010-09-22  0:29     ` gengtype improvements for plugins, thirdround! patch 4/7 [filerules] Basile Starynkevitch
2010-09-22  1:50       ` gengtype improvements for plugins, thirdround! patch 5/7 [typedopt] Basile Starynkevitch
2010-09-22  1:58         ` gengtype improvements for plugins, thirdround! patch 6/7 [wstate] Basile Starynkevitch
2010-09-22  2:16           ` Basile Starynkevitch
2010-09-22  3:03             ` gengtype improvements for plugins, thirdround! patch 7/7 [doc] Basile Starynkevitch
2010-09-22 14:17               ` Laurynas Biveinis
2010-09-22 14:08           ` gengtype improvements for plugins, thirdround! patch 6/7 [wstate] Laurynas Biveinis
2010-09-22 12:13         ` gengtype improvements for plugins, thirdround! patch 5/7 [typedopt] Laurynas Biveinis
2010-09-23 19:17           ` Basile Starynkevitch
2010-09-23 19:29             ` Diego Novillo
2010-09-23 19:39               ` Richard Guenther
2010-09-22 12:06       ` gengtype improvements for plugins, thirdround! patch 4/7 [filerules] Laurynas Biveinis
2010-09-22 12:05     ` gengtype improvements for plugins, thirdround! patch 3/7 [inputfile] Laurynas Biveinis
2010-10-18 17:21     ` gengtype patch removing location_s Basile Starynkevitch
2010-10-19  6:57       ` Laurynas Biveinis
2010-10-19  7:11         ` Basile Starynkevitch
2010-10-19  7:27           ` Laurynas Biveinis
2010-10-19  7:29             ` Basile Starynkevitch
2010-10-19  8:17               ` Laurynas Biveinis
2010-10-19  8:49               ` Dave Korn
2010-10-19 16:38           ` Tom Tromey
2010-10-20 20:39             ` gengtype plugin improvement last2round - patch3 [inputfile] Basile Starynkevitch
2010-10-21  4:46               ` Laurynas Biveinis
2010-09-22 11:11   ` Laurynas Biveinis [this message]
2010-09-22 11:08 ` gengtype improvements for plugins, thirdround! patch 1/7 [declprog] Laurynas Biveinis

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

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

  git send-email \
    --in-reply-to='AANLkTin9Qgz5+K5Ge4EMj5a_0qAa__kwHukQuvc=zJ61@mail.gmail.com' \
    --to=laurynas.biveinis@gmail.com \
    --cc=basile@starynkevitch.net \
    --cc=gcc-patches@gcc.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.
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).