[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
23-fyi-bitset-zero.patch
From: |
Akim Demaille |
Subject: |
23-fyi-bitset-zero.patch |
Date: |
Mon, 04 Mar 2002 13:06:51 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
* src/reduce.c: Remove the `bitset_zero's following the
`bitset_create's, as now it is performed by the latter.
Index: src/closure.c
--- src/closure.c Fri, 01 Mar 2002 14:02:26 +0100 akim
+++ src/closure.c Sun, 03 Mar 2002 11:50:50 +0100 akim
@@ -124,7 +124,6 @@
for (i = ntokens; i < nsyms; i++)
{
FIRSTS (i) = bitset_create (nvars, BITSET_FIXED);
- bitset_zero (FIRSTS (i));
for (j = 0; derives[i][j] >= 0; ++j)
{
int symbol = ritem[rules[derives[i][j]].rhs];
@@ -157,10 +156,7 @@
fderives = XCALLOC (bitset, nvars);
bitset_stats_init ();
for (i = 0 ; i < nvars; ++i)
- {
- fderives[i] = bitset_create (nrules + 1, BITSET_FIXED);
- bitset_zero (fderives[i]);
- }
+ fderives[i] = bitset_create (nrules + 1, BITSET_FIXED);
set_firsts ();
@@ -185,7 +181,6 @@
itemset = XCALLOC (short, n);
ruleset = bitset_create (nrules + 1, BITSET_FIXED);
- bitset_zero (ruleset);
set_fderives ();
}
Index: src/conflicts.c
--- src/conflicts.c Fri, 01 Mar 2002 16:04:26 +0100 akim
+++ src/conflicts.c Sun, 03 Mar 2002 11:50:50 +0100 akim
@@ -203,9 +203,7 @@
conflicts = XCALLOC (char, nstates);
shiftset = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (shiftset);
lookaheadset = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (lookaheadset);
for (i = 0; i < nstates; i++)
set_conflicts (states[i]);
Index: src/lalr.c
--- src/lalr.c Fri, 01 Mar 2002 15:43:21 +0100 akim
+++ src/lalr.c Sun, 03 Mar 2002 11:50:50 +0100 akim
@@ -141,10 +141,7 @@
LA = XCALLOC (bitset, nLA);
for (i = 0; i < nLA; ++i)
- {
- LA[i] = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (LA[i]);
- }
+ LA[i] = bitset_create (ntokens, BITSET_FIXED);
LAruleno = XCALLOC (short, nLA);
lookback = XCALLOC (shorts *, nLA);
@@ -258,10 +255,7 @@
F = XCALLOC (bitset, ngotos);
for (i = 0; i < ngotos; ++i)
- {
- F[i] = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (F[i]);
- }
+ F[i] = bitset_create (ntokens, BITSET_FIXED);
for (i = 0; i < ngotos; i++)
{
Index: src/print.c
--- src/print.c Fri, 01 Mar 2002 16:04:26 +0100 akim
+++ src/print.c Sun, 03 Mar 2002 11:50:50 +0100 akim
@@ -492,9 +492,7 @@
new_closure (nritems);
/* Storage for print_reductions. */
shiftset = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (shiftset);
lookaheadset = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (lookaheadset);
for (i = 0; i < nstates; i++)
print_state (out, states[i]);
bitset_free (shiftset);
Index: src/reduce.c
--- src/reduce.c Fri, 01 Mar 2002 16:04:26 +0100 akim
+++ src/reduce.c Sun, 03 Mar 2002 11:50:22 +0100 akim
@@ -103,7 +103,6 @@
set of all productions which have a RHS all in N. */
Np = bitset_create (nvars, BITSET_FIXED);
- bitset_zero (Np);
/* The set being computed is a set of nonterminals which can derive
@@ -175,9 +174,7 @@
user can know. */
Vp = bitset_create (nsyms, BITSET_FIXED);
- bitset_zero (Vp);
Pp = bitset_create (nrules + 1, BITSET_FIXED);
- bitset_zero (Pp);
/* If the start symbol isn't useful, then nothing will be useful. */
if (bitset_test (N, start_symbol - ntokens))
@@ -495,13 +492,9 @@
/* Allocate the global sets used to compute the reduced grammar */
N = bitset_create (nvars, BITSET_FIXED);
- bitset_zero (N);
P = bitset_create (nrules + 1, BITSET_FIXED);
- bitset_zero (P);
V = bitset_create (nsyms, BITSET_FIXED);
- bitset_zero (V);
V1 = bitset_create (nsyms, BITSET_FIXED);
- bitset_zero (V1);
useless_nonterminals ();
inaccessable_symbols ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 23-fyi-bitset-zero.patch,
Akim Demaille <=