zig/lib/std
Frank Denis a03f9548d3 std/math/big/int: normalize after a right shift
After a right shift, top limbs may be all zero. However, without
normalization, the number of limbs is not going to change.

In order to check if a big number is zero, we used to assume that the
number of limbs is 1. Which may not be the case after right shifts,
even if the actual value is zero.

- Normalize after a right shift
- Add a test for that issue
- Check all the limbs in `eqlZero()`. It may not be necessary if
callers always remember to normalize before calling the function.
But checking all the limbs is very cheap and makes the function less
bug-prone.
2021-02-01 12:10:01 -08:00
..
atomic organize std lib concurrency primitives and add RwLock 2021-01-14 20:41:37 -07:00
build std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
c Replace @TagType uses, mostly with std.meta.Tag 2021-01-30 22:26:44 +02:00
compress Year++ 2020-12-31 15:45:24 -08:00
crypto crypto: add legacy keccak hash functions 2021-01-15 12:36:38 -08:00
event organize std lib concurrency primitives and add RwLock 2021-01-14 20:41:37 -07:00
fmt Year++ 2020-12-31 15:45:24 -08:00
fs update error return doc 2021-01-18 11:04:33 -08:00
hash Replace @TagType uses, mostly with std.meta.Tag 2021-01-30 22:26:44 +02:00
heap std.Thread.Mutex: restore the "Held" API 2021-01-14 21:28:22 -07:00
io std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
json Reduce use of deprecated IO types 2021-01-07 23:48:58 -08:00
math std/math/big/int: normalize after a right shift 2021-02-01 12:10:01 -08:00
mem Year++ 2020-12-31 15:45:24 -08:00
meta Replace @TagType uses, mostly with std.meta.Tag 2021-01-30 22:26:44 +02:00
net Apparently unix sockets are supported on Windows 2021-01-11 21:43:15 +01:00
os Merge pull request #7846 from LemonBoy/filtertest 2021-01-25 10:39:11 -08:00
rand std: disable a couple tests on windows 2021-01-02 12:21:19 -07:00
special std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
target Year++ 2020-12-31 15:45:24 -08:00
testing Year++ 2020-12-31 15:45:24 -08:00
Thread fix namespace of kernel32 function calls 2021-01-14 21:42:49 -07:00
time Year++ 2020-12-31 15:45:24 -08:00
unicode Reduce use of deprecated IO types 2021-01-07 23:48:58 -08:00
valgrind Year++ 2020-12-31 15:45:24 -08:00
zig Replace @TagType uses, mostly with std.meta.Tag 2021-01-30 22:26:44 +02:00
array_hash_map.zig std.ArrayHashMap: add "AssertDiscard" function variants 2021-01-16 22:49:20 -07:00
array_list.zig Remove deprecated stream aliases 2021-01-08 16:54:56 -05:00
ascii.zig Year++ 2020-12-31 15:45:24 -08:00
atomic.zig Year++ 2020-12-31 15:45:24 -08:00
base64.zig Year++ 2020-12-31 15:45:24 -08:00
buf_map.zig Year++ 2020-12-31 15:45:24 -08:00
buf_set.zig Year++ 2020-12-31 15:45:24 -08:00
build.zig FromWriteFileStep for all LibExeObjStep types 2021-01-30 17:50:41 +02:00
builtin.zig Replace @TagType uses, mostly with std.meta.Tag 2021-01-30 22:26:44 +02:00
c.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
child_process.zig Reduce use of deprecated IO types 2021-01-07 23:48:58 -08:00
coff.zig Reduce use of deprecated IO types 2021-01-07 23:48:58 -08:00
compress.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
comptime_string_map.zig Year++ 2020-12-31 15:45:24 -08:00
crypto.zig ci: skip crypto tests on windows 2021-01-04 15:57:54 -07:00
cstr.zig Year++ 2020-12-31 15:45:24 -08:00
debug.zig Bring back stack trace printing on ARM Darwin 2021-01-21 23:20:42 +01:00
dwarf.zig Reduce use of deprecated IO types 2021-01-07 23:48:58 -08:00
dwarf_bits.zig Year++ 2020-12-31 15:45:24 -08:00
dynamic_library.zig Year++ 2020-12-31 15:45:24 -08:00
elf.zig Year++ 2020-12-31 15:45:24 -08:00
event.zig Year++ 2020-12-31 15:45:24 -08:00
fifo.zig Remove deprecated stream aliases 2021-01-08 16:54:56 -05:00
fmt.zig Improve error messages in std.fmt (#7898) 2021-01-30 13:12:44 +02:00
fs.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
hash.zig Year++ 2020-12-31 15:45:24 -08:00
hash_map.zig Add compileError message for StringHashMap in AutoHashMap 2021-01-07 23:51:53 -08:00
heap.zig Year++ 2020-12-31 15:45:24 -08:00
io.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
json.zig Replace @TagType uses, mostly with std.meta.Tag 2021-01-30 22:26:44 +02:00
leb128.zig Year++ 2020-12-31 15:45:24 -08:00
linked_list.zig Fix off-by-one error in SinglyLinkedList.len() and add associated tests 2021-01-04 14:03:21 -08:00
log.zig Year++ 2020-12-31 15:45:24 -08:00
macho.zig macho: add arm64 relocation type enum 2021-01-26 08:11:31 +01:00
math.zig Merge pull request #7846 from LemonBoy/filtertest 2021-01-25 10:39:11 -08:00
mem.zig Fix interger overflow when calling joinZ with empty slices 2021-01-27 12:01:18 +02:00
meta.zig Replace @TagType uses, mostly with std.meta.Tag 2021-01-30 22:26:44 +02:00
net.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
once.zig organize std lib concurrency primitives and add RwLock 2021-01-14 20:41:37 -07:00
os.zig Add MAX_RW_COUNT limit to std.os.pread() 2021-01-25 10:41:38 -08:00
packed_int_array.zig Add workaround in PackedIntArray .initAllTo for #7635 2021-01-02 01:10:47 +11:00
pdb.zig Remove deprecated stream aliases 2021-01-08 16:54:56 -05:00
priority_queue.zig Year++ 2020-12-31 15:45:24 -08:00
process.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
Progress.zig std.Progress: call refreshWithHeldLock as appropriate 2021-01-24 12:22:17 -07:00
rand.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
SemanticVersion.zig Move fmt.testFmt to testing.expectFmt 2021-01-12 18:13:29 -08:00
sort.zig Fix example code in comments for asc and desc 2021-01-06 15:53:53 -08:00
start.zig std: Use {s} instead of {} when printing strings 2021-01-02 17:12:57 -07:00
start_windows_tls.zig Year++ 2020-12-31 15:45:24 -08:00
std.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
target.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
testing.zig Replace @TagType uses, mostly with std.meta.Tag 2021-01-30 22:26:44 +02:00
Thread.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
time.zig Year++ 2020-12-31 15:45:24 -08:00
unicode.zig Year++ 2020-12-31 15:45:24 -08:00
valgrind.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00
zig.zig std: Update test "" to test where it makes sense 2021-01-22 15:46:58 +01:00