big: More ZII refactoring.

This commit is contained in:
Jeroen van Rijn
2021-08-11 20:59:50 +02:00
parent 2e372b33a3
commit d9efa6c8b5
5 changed files with 87 additions and 43 deletions
+3 -2
View File
@@ -198,9 +198,10 @@ itoa_raw :: proc(a: ^Int, radix: i8, buffer: []u8, size := int(-1), zero_termina
buffer[available] = 0;
}
shift, count: int;
// mask := _WORD(radix - 1);
shift := int(log_n(DIGIT(radix), 2));
count := int(count_bits(a));
shift, err = log_n(DIGIT(radix), 2);
count, err = count_bits(a);
// digit: _WORD;
for offset := 0; offset < count; offset += 4 {