Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/make



Module Name:    src
Committed By:   rillig
Date:           Tue Aug 25 16:27:24 UTC 2020

Modified Files:
        src/usr.bin/make: enum.h make.c var.c

Log Message:
make(1): distinguish enum flags and values in debugging mode

When printing an enum value in debugging mode, distinguish between
bitsets containing flags and ordinary enums that just contain different
values.

Make the macros in enum.h more uniform.  Provide a simple scheme for
defining the run-time type information of enums whose number of values
is a number with more than 2 bits set in the binary representation.
This case was not obvious before, and it was pure luck that the current
interesting enum types only had 3, 10 or 32 different values.

The type with the 32 different values actually only has 31 significant
bits since the enum constant OP_OPMASK is only used when querying the
enum, not for defining or describing the possible values.  For this
reason, it was unavoidable to refactor the rtti macros, to support even
this case.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/enum.h
cvs rdiff -u -r1.122 -r1.123 src/usr.bin/make/make.c
cvs rdiff -u -r1.470 -r1.471 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index