stage2+stage1: remove type parameter from bit builtins

Closes #12529
Closes #12511
Closes #6835
This commit is contained in:
Veikka Tuominen
2022-08-21 17:24:04 +03:00
parent 6c020cdb76
commit 62ff8871ed
55 changed files with 264 additions and 268 deletions

View File

@@ -299,11 +299,11 @@ fn renderBitEnum(
for (enumerants) |enumerant, i| {
if (enumerant.value != .bitflag) return error.InvalidRegistry;
const value = try parseHexInt(enumerant.value.bitflag);
if (@popCount(u32, value) == 0) {
if (@popCount(value) == 0) {
continue; // Skip 'none' items
}
std.debug.assert(@popCount(u32, value) == 1);
std.debug.assert(@popCount(value) == 1);
var bitpos = std.math.log2_int(u32, value);
if (flags_by_bitpos[bitpos]) |*existing| {