[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 00/17] style: modernize bitsets
From: |
Akim Demaille |
Subject: |
[PATCH 00/17] style: modernize bitsets |
Date: |
Thu, 11 Oct 2018 13:31:31 +0200 |
The core algorithms of the computation of the parsing tables heavily
use bitsets. Initially Bison used its own routines for bitset
manipulation (actually, a lot was done by hand, without abstraction),
but at some point I saw a very nice submission from Michael Hayes on
the GCC lists for a fully featured lib on bitsets.
(https://gcc.gnu.org/ml/gcc/2002-01/msg00825.html).
I don't know whether it finally made it in GCC
(https://gcc.gnu.org/ml/gcc/2002-05/msg01564.html), but I included it
in Bison. Paul (Eggert) also cleaned it.
Now I think it should move to gnulib: it's way more powerful than what
we use in Bison only.
But before actually submitting it, let's clean it:
- always ANSI C
- don't use `extern` for function declarations
- reduce scopes
More can be done on scope reduction, but it's a quite painful
refactoring, I'll have a break.
Akim Demaille (17):
style: modernize lib/abitset.h
style: modernize lib/abitset.c
style: modernize lib/bbitset.h
style: modernize lib/bitset.h
style: modernize lib/bitset.c
style: modernize lib/bitset_stats.h
style: modernize lib/bitset_stats.c
style: modernize lib/bitsetv-print.h
style: modernize lib/bitsetv-print.c
style: modernize lib/bitsetv.h
style: modernize lib/bitsetv.c
style: modernize lib/ebitset.h
style: modernize lib/ebitset.c
style: modernize lib/lbitset.h
style: modernize lib/lbitset.c
style: modernize lib/vbitset.c
style: modernize lib/vbitset.h
lib/abitset.c | 159 +++++++-------------
lib/abitset.h | 4 +-
lib/bbitset.h | 20 +--
lib/bitset.c | 50 ++----
lib/bitset.h | 50 +++---
lib/bitset_stats.c | 83 +++++-----
lib/bitset_stats.h | 6 +-
lib/bitsetv-print.c | 13 +-
lib/bitsetv-print.h | 2 +-
lib/bitsetv.c | 49 ++----
lib/bitsetv.h | 18 +--
lib/ebitset.c | 359 +++++++++++++++-----------------------------
lib/ebitset.h | 6 +-
lib/lbitset.c | 193 +++++++++---------------
lib/lbitset.h | 6 +-
lib/vbitset.c | 354 +++++++++++++++----------------------------
lib/vbitset.h | 4 +-
17 files changed, 495 insertions(+), 881 deletions(-)
--
2.19.1
- [PATCH 00/17] style: modernize bitsets,
Akim Demaille <=
- [PATCH 01/17] style: modernize lib/abitset.h, Akim Demaille, 2018/10/11
- [PATCH 02/17] style: modernize lib/abitset.c, Akim Demaille, 2018/10/11
- [PATCH 03/17] style: modernize lib/bbitset.h, Akim Demaille, 2018/10/11
- [PATCH 04/17] style: modernize lib/bitset.h, Akim Demaille, 2018/10/11
- [PATCH 05/17] style: modernize lib/bitset.c, Akim Demaille, 2018/10/11
- [PATCH 06/17] style: modernize lib/bitset_stats.h, Akim Demaille, 2018/10/11
- [PATCH 09/17] style: modernize lib/bitsetv-print.c, Akim Demaille, 2018/10/11
- [PATCH 07/17] style: modernize lib/bitset_stats.c, Akim Demaille, 2018/10/11
- [PATCH 08/17] style: modernize lib/bitsetv-print.h, Akim Demaille, 2018/10/11
- [PATCH 11/17] style: modernize lib/bitsetv.c, Akim Demaille, 2018/10/11