]> git.saurik.com Git - bison.git/commitdiff
* src/conflicts.c (print_reductions): Improve variable locality.
authorAkim Demaille <akim@epita.fr>
Wed, 5 Dec 2001 09:30:42 +0000 (09:30 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 5 Dec 2001 09:30:42 +0000 (09:30 +0000)
ChangeLog
src/conflicts.c

index 49745e7ee80433f70b4d85197b9e25511cf69bbd..b4b1b51eb9682ada32c1e5a5ed1a23087be3d10e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-05  Akim Demaille  <akim@epita.fr>
+
+       * src/conflicts.c (print_reductions): Improve variable locality.
+
+       
 2001-12-05  Akim Demaille  <akim@epita.fr>
 
        * src/conflicts.c (print_reductions): Pessimize, but clarify.
index ae5c79e46678622ed6adce6d2709b7115dcdd88f..e26a7adf4142a71fd9df5bb11bc48443ba5ce473 100644 (file)
@@ -502,7 +502,6 @@ print_reductions (FILE *out, int state)
 {
   int i;
   int j;
-  int rule;
   int symbol;
   unsigned mask;
   int m;
@@ -541,8 +540,7 @@ print_reductions (FILE *out, int state)
        {
          if (!errp->errs[i])
            continue;
-         symbol = errp->errs[i];
-         SETBIT (shiftset, symbol);
+         SETBIT (shiftset, errp->errs[i]);
        }
     }
 
@@ -650,12 +648,11 @@ print_reductions (FILE *out, int state)
                  if (count == 0)
                    {
                      if (j != default_LA)
-                       {
-                         rule = LAruleno[j];
-                         fprintf (out,
-                                  _("    %-4s\treduce using rule %d (%s)\n"),
-                                  tags[i], rule, tags[rule_table[rule].lhs]);
-                       }
+                       fprintf (out,
+                                _("    %-4s\treduce using rule %d (%s)\n"),
+                                tags[i],
+                                LAruleno[j],
+                                tags[rule_table[LAruleno[j]].lhs]);
                      else
                        defaulted = 1;
 
@@ -664,17 +661,17 @@ print_reductions (FILE *out, int state)
                  else
                    {
                      if (defaulted)
-                       {
-                         rule = LAruleno[default_LA];
-                         fprintf (out,
-                                  _("    %-4s\treduce using rule %d (%s)\n"),
-                                  tags[i], rule, tags[rule_table[rule].lhs]);
-                         defaulted = 0;
-                       }
-                     rule = LAruleno[j];
+                       fprintf (out,
+                                _("    %-4s\treduce using rule %d (%s)\n"),
+                                tags[i],
+                                LAruleno[default_LA],
+                                tags[rule_table[LAruleno[default_LA]].lhs]);
+                     defaulted = 0;
                      fprintf (out,
                               _("    %-4s\t[reduce using rule %d (%s)]\n"),
-                              tags[i], rule, tags[rule_table[rule].lhs]);
+                              tags[i],
+                              LAruleno[j],
+                              tags[rule_table[LAruleno[j]].lhs]);
                    }
                }