| Age | Commit message (Collapse) | Author |
|
No functional change.
|
|
|
|
No binary change on x86_64.
|
|
No functional change.
|
|
Assisted by indent(1), with manual corrections due to its many remaining
bugs.
No functional change.
|
|
No binary change, except for line numbers in assertions in suff.c.
|
|
For symmetry with mem.
No binary change.
|
|
This was the only use of the type MFStr, which produced the same code as
FStr.
No binary change.
|
|
No functional change.
|
|
Now that Enum_ToString is implemented for each type separately, it's
easy to convert them to bit-fields. This gets rid of the magic numbers
12 for CYCLE and 13 for DONECYCLE that left a suspicious gap in the
numbers. This gap was not needed since the code didn't make use of the
relative ordering of the enum constants.
The effects of this conversion are fewer capital letters in the code,
smaller scope for the GNode flags, and clearer code especially when
setting a flag back to false.
One strange thing is that GCC 10.3.0 doesn't optimize GNodeFlags_IsNone
to an single bitmasking instruction, at least on x86_64. Instead it
generates a testb instruction for each of the flags, even loading bit 8
separately from the others. Clang 12.0.1 knows this optimization
though and generates the obvious sequence of movzwl, testl, jz.
No functional change.
|
|
The warnings in arch.c were about conversions from int to long.
The warnings in var.c were about conversions from long long to
ptrdiff_t.
No functional change.
|
|
|
|
No functional change.
|
|
This function is only ever used for forming strings of the form
"archive(member)".
No functional change.
|
|
No functional change.
|
|
This makes the code easier to read, especially in var.c. It also makes
debugging sessions easier since some debuggers don't show enum
bit-fields symbolically as soon as more than one bit is set.
The code outside var.c is basically unchanged, except that instead of
passing the individual flags, there are 4 predefined evaluation modes.
These suffice for all practical use cases. Only in the implementation
deep inside var.c, the value of the flags keepDollar and keepUndef
differs.
There is no way of passing the struct to EnumFlags_ToString, which means
the ToString function has to be spelled out explicitly. This allows for
fine-tuning the representation in the debug log, to reduce the amount of
uppercae letters.
No functional change.
|
|
This change provides for a more natural reading order in the code.
Placing the scope first makes it immediately clear in which context the
remaining parameters are interpreted.
No functional change.
|
|
This continues the previous commit, in which VAR_GLOBAL, VAR_INTERNAL
and VAR_CMDLINE were renamed.
Renaming the variable 'ctxt' was trivial since that word is used nowhere
else. In the comments though, each occurrence of the word 'context' had
to be checked individually since the word 'context' was not only used
for referring to a variable scope. It is also used to distinguish
different situations where characters are escaped in a certain way
('parsing context') and in a few other expressions.
|
|
No functional change. Furthermore, this only affects builds that
explicitly disable LIBRARIES in config.h.
|
|
The main subject of this function is the search path. In this search
path the pattern is expanded.
|
|
|
|
|
|
|
|
This reduces the number of variable declarations at the call sites.
|
|
|
|
The function basename from POSIX has a few unfortunate properties, it is
allowed to return a pointer to static memory. This is too unreliable,
therefore this trivial own implementation.
|
|
|
|
|
|
|
|
The variable buf used to be a Buffer, now it is a simple string pointer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
This typo may have been influenced by all the '$' in the code.
|
|
Mention VARE_WANTRES before VARE_UNDEFERR since the latter depends on
the former.
In ApplyModifier_Assign, VARE_KEEP_DOLLAR doesn't have to be removed
from eflags since ParseModifierPart does this already.
In EvalUndefined, testing for VARE_WANTRES is redundant if VARE_UNDEFERR
is already set.
|
|
This makes it easier to prove that Dir_MTime always returns gn->mtime,
without looking at the implementation of Arch_UpdateMTime.
|
|
This makes it easier to prove that Dir_MTime always returns gn->mtime,
without looking at the implementation of Arch_UpdateMemberMTime.
|
|
It doesn't matter which of the make modules is in charge of determining
whether a node is out-of-date. Therefore, remove the module name from
the function name.
|
|
|
|
|
|
|
|
|
|
|
|
The hash table is just an implementation detail, not worth to be
mentioned in comments.
|
|
This bug was added in arch.c 1.6, "Do extended-name archives".
|
|
Whether an archive entry is hashed or not is completely irrelevant. The
interesting thing is whether it ends up in a cache.
|