#
16b60d57 |
| 09-Feb-2022 |
rillig <rillig@NetBSD.org> |
make: fix mistakes, spelling and typos in comments and manual page
No binary change for -DNDEBUG.
|
#
e029c5fd |
| 27-Jan-2022 |
rillig <rillig@NetBSD.org> |
make: merge duplicate code for finding an entry in a hash table
No functional change.
|
#
c1f38a76 |
| 27-Jan-2022 |
rillig <rillig@NetBSD.org> |
make: replace HashEntry_KeyEquals with strncmp
No functional change.
|
#
3ed5d06f |
| 27-Dec-2021 |
rillig <rillig@NetBSD.org> |
make: replace __func__ with actual strings
Make is supposed to be C90-compatible, and __func__ is from C99.
No functional change.
|
#
028fbff8 |
| 15-Dec-2021 |
rillig <rillig@NetBSD.org> |
make: use consistent indentation for statements and continuations
No binary change, except for line numbers in assertions in suff.c.
|
#
67ff605e |
| 15-Dec-2021 |
rillig <rillig@NetBSD.org> |
make: change return type of HashTable_Set to void
None of the callers needs the HashEntry for further manipulation.
No functional change.
|
#
24034843 |
| 07-Dec-2021 |
rillig <rillig@NetBSD.org> |
make: inline HashIter_Init
It is only used in non-critical code paths, but the generated code gets smaller by inlining.
No functional change.
|
#
6b3ac5ec |
| 12-Sep-2021 |
rillig <rillig@NetBSD.org> |
make: fix build for DEBUG_HASH_LOOKUP
|
#
f015e519 |
| 11-Apr-2021 |
rillig <rillig@NetBSD.org> |
make: avoid allocating memory for simple variable names
The main change is in ParseVarname, where a Buffer is replaced with the newly introduced LazyBuf. LazyBuf is inspired by https://golang.org/s
make: avoid allocating memory for simple variable names
The main change is in ParseVarname, where a Buffer is replaced with the newly introduced LazyBuf. LazyBuf is inspired by https://golang.org/src/path/path.go.
In CanonicalVarname, the pre-comparison of the first letter of the variable name is no longer necessary. GCC 9 optimizes a fixed-length memcmp so well that the code can finally be written to target human readers, leaving the optimization to the compiler.
show more ...
|
#
37e1b182 |
| 03-Apr-2021 |
rillig <rillig@NetBSD.org> |
make: backport to C90
In the past few months I had accidentally used C99 features in the make code. According to tools/README, tools that are used in the build system should restrict themselves to
make: backport to C90
In the past few months I had accidentally used C99 features in the make code. According to tools/README, tools that are used in the build system should restrict themselves to C90.
This allows make to build with GCC's options "-pedantic -Wno-system-headers -Dinline= -Wno-error=cast-qual".
I didn't notice anyone actively complaining though, I just wanted to see how much work this backporting would be. The identifier __func__ is still used, as in other tools.
No functional change.
show more ...
|
#
4ec8d01b |
| 03-Apr-2021 |
rillig <rillig@NetBSD.org> |
make: use C99 bool type instead of defining its own
No functional change.
|
#
36fb5e63 |
| 01-Feb-2021 |
rillig <rillig@NetBSD.org> |
make: clean up comments in hash.c
|
#
3ba2f8a8 |
| 30-Dec-2020 |
rillig <rillig@NetBSD.org> |
make(1): format multi-line comments
|
#
9cfe33a3 |
| 15-Dec-2020 |
rillig <rillig@NetBSD.org> |
make(1): clean up hash function for HashTable
Expressing a multiplication as a bit shifts and subtraction is the job of the compiler. For humans, a multiplication is easier to read.
|
#
93e948ba |
| 23-Nov-2020 |
rillig <rillig@NetBSD.org> |
make(1): use tabs for indentation in hash.h and hash.c
|
#
e1a8a310 |
| 14-Nov-2020 |
rillig <rillig@NetBSD.org> |
make(1): replace a few HashTable_CreateEntry with HashTable_Set
Instead of HashTable_CreateEntry and HashEntry_Set, several places just need the HashEntry for storing a value in it. This makes the
make(1): replace a few HashTable_CreateEntry with HashTable_Set
Instead of HashTable_CreateEntry and HashEntry_Set, several places just need the HashEntry for storing a value in it. This makes the calling code simpler to understand.
These parts of the code are already hard enough to understand since they are about memory management and aliasing. Having a too detailed API for the HashTable only distracts from these topics.
show more ...
|
#
a81634c5 |
| 05-Nov-2020 |
rillig <rillig@NetBSD.org> |
make(1): remove redundant parentheses from sizeof operator
The parentheses are only needed if the argument is a type, not an expression.
|
#
fb42c420 |
| 25-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): print hash in debug log with fixed width
This way all the keys are nicely aligned in the debug log.
|
#
8d2b23a7 |
| 25-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): rename hash functions to identify the type name
This makes it easier to spot mismatches between the function name and its first parameter, although the compiler should already catch most of
make(1): rename hash functions to identify the type name
This makes it easier to spot mismatches between the function name and its first parameter, although the compiler should already catch most of them. Except for void pointers.
show more ...
|
#
5a23dd7b |
| 25-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): clean up comments in hash.c
|
#
58423f93 |
| 25-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): clean up hash table functions
|
#
89f6a4ea |
| 25-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): refactor Hash_DeleteTable
|
#
dc365aee |
| 25-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): refactor Hash_InitTable
First prepare all the data, then initialize the fields in declaration order.
|
#
786cac6f |
| 25-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): clean up RebuildTable for hash tables
The previous code used ++ and -- a lot, it also reused variables a lot for different purposes.
|
#
4c69bad9 |
| 25-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): reduce amount of string hashing
In pkgsrc, running "bmake show-all" in pkgtools/pkglint called the hash function 249130 times before, and only 115502 times after.
Still, a single call to V
make(1): reduce amount of string hashing
In pkgsrc, running "bmake show-all" in pkgtools/pkglint called the hash function 249130 times before, and only 115502 times after.
Still, a single call to Var_Set hashes the same string 3 times.
show more ...
|