Ken Kochis
436e99d13b
Close files in hashFileFallible
2023-02-22 06:07:47 -05:00
Andrew Kelley
b52be973df
Merge pull request #14394 from dweiller/zstandard
...
Zstandard decompressor
2023-02-21 13:59:14 -05:00
Alexis Brodeur
98dd041d53
Relax std.sort.binarySearch requirements
...
Forcing the key to be of the same type as the sorted items used during
the search is a valid use case.
There, however, exists some cases where the key and the items are of
heterogeneous types, like searching for a code point in ordered ranges
of code points:
```zig
const CodePoint = u21;
const CodePointRange = [2]CodePoint;
const valid_ranges = &[_]CodePointRange{
// an ordered array of ranges
};
fn orderCodePointAndRange(
context: void,
code_point: CodePoint,
range: CodePointRange
) std.math.Order {
_ = context;
if (code_point < range[0]) {
return .lt;
}
if (code_point > range[1]) {
return .gt;
}
return .eq;
}
fn isValidCodePoint(code_point: CodePoint) bool {
return std.sort.binarySearch(
CodePointRange,
code_point,
valid_ranges,
void,
orderCodePointAndRange
) != null;
}
```
It is so expected that `std.sort.binarySearch` should therefore support
both homogeneous and heterogeneous keys.
2023-02-21 12:28:43 -05:00
Komari Spaghetti
2737dce84f
Introduce ChildProcess.collectOutput ( #12295 )
...
All the code for this function already exists, but only
ChildProcess.exec was allowed to use the code.
2023-02-21 12:26:55 -05:00
Andrew Kelley
7f691b3fe2
Merge pull request #14664 from mlugg/feat/new-module-cli
...
New module CLI
2023-02-21 11:43:31 -05:00
Isaac Freund
05da5b32a8
Sema: implement @fieldParentPtr for unions
2023-02-21 15:57:13 +02:00
dweiller
765a6d3413
std.compress.zstd: renamed from std.compress.zstandard
2023-02-22 00:11:20 +11:00
dweiller
32cf1d7cbf
std.compress.zstandard: fix error sets for streaming API
2023-02-21 22:06:25 +11:00
dweiller
c6ef83efe5
std.compress.zstandard: clean up streaming API
2023-02-21 14:53:02 +11:00
mlugg
f94cbab3ac
Add test coverage for some module structures
2023-02-21 02:05:36 +00:00
mlugg
b8a96baab8
Improve multi-module error messages
...
- Fix assertion failure if AstGen failed on a multi-module file
- Cap number of per-error reference notes and total multi-module errors each at 5
- Always put "root of package" reference notes first
Resolves : #14499
2023-02-21 02:05:35 +00:00
mlugg
09a84c8384
Update std.Build to new module CLI, update zig1 and CMakeLists
...
Resolves : #14667
2023-02-21 01:59:37 +00:00
mlugg
705d2a3c2c
Implement new module CLI
2023-02-21 01:59:37 +00:00
dweiller
c7c35bf9e6
std.RingBuffer: add (non-concurrent) RingBuffer implementation
2023-02-21 12:58:34 +11:00
dweiller
1c518bd993
std.compress.zstandard: rename ZStandardStream -> DecompressStream
2023-02-21 12:58:27 +11:00
dweiller
12d9f73ce8
std.compress.zstandard: remove use of usingnamespace
2023-02-21 12:09:27 +11:00
dweiller
a34c2de7bc
std.hash: use std.math.rotl in Xxhash64 and Xxhash32
2023-02-21 12:09:27 +11:00
Jakub Konka
dc1f50e505
Merge pull request #14685 from ziglang/bitcast-fixes
...
Bitcast fixes for self-hosted native backends
2023-02-20 23:01:21 +01:00
Andrew Kelley
a933a59ced
Merge pull request #14682 from ziglang/stage1-coverage
...
add test coverage for fixed stage1 bugs
2023-02-20 14:23:37 -05:00
Frank Denis
6214f66dc1
trim(Left|Right): clarify that values_to_strip is a set
...
The parameter could be confused with a prefix or suffix, instead
of a set of values.
2023-02-20 13:55:45 -05:00
Frank Denis
5a7d80a5e7
Linker: -z<arg> should be equivalent to -z <arg> ( #14680 )
...
lld accepts both syntaxes, but we were rejecting (and, before
3f7e9ff597a3514bb1c4f1900027c40682ac9f13, ignoring) the former.
In particular, "cargo-zigbuild" was broken since Rust
unconditionally adds "-znoexecstack" (not "-z noexecstack")
on non-Windows platforms.
Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2023-02-20 16:15:21 +00:00
Loris Cro
99c11cc8cf
Merge pull request #14544 from der-teufel-programming/autodoc-quickfixes
...
autodoc: main.js cleanup and formatting
2023-02-20 16:37:41 +01:00
Loris Cro
dfd182cc7a
Merge pull request #14655 from McSinyx/md-ol
...
autodoc: fix markdown list rendering
2023-02-20 16:33:00 +01:00
Jakub Konka
0aee40bd13
riscv64+sparc64: alloc new mcv in bitcast if cannot reuse operand
2023-02-20 12:19:40 +01:00
Jakub Konka
528c43233f
arm: alloc new mcv in bitcast if cannot reuse operand
2023-02-20 12:13:14 +01:00
Jakub Konka
59a9373c71
aarch64: alloc new mcv in bitcast if cannot reuse operand
2023-02-20 10:52:34 +01:00
Jakub Konka
87d358024f
re-enable x86_64-linux self-hosted behaviour test suite
2023-02-20 10:52:34 +01:00
Jakub Konka
a7de8dc2dd
x86: alloc new mcv in bitcast if cannot reuse operand
...
Implement missing pointees when ptr is in register.
2023-02-20 10:52:26 +01:00
dweiller
a74f800dd7
std.compress.zstandard: update for multi-for-loop change
2023-02-20 16:58:48 +11:00
Andrew Kelley
ec4cd87ed7
add test coverage for fixed bug. closes #5518
2023-02-19 21:18:27 -07:00
Andrew Kelley
e778e47140
add test coverage for fixed bug. closes #5516
2023-02-19 21:18:27 -07:00
Andrew Kelley
680d79ebf9
add test coverage for fixed bug. closes #5508
2023-02-19 21:18:27 -07:00
Andrew Kelley
ffdce5f98c
add test coverage for fixed bug. closes #5497
2023-02-19 21:18:27 -07:00
Andrew Kelley
53104b9165
add test coverage for fixed bug. closes #5410
2023-02-19 21:18:27 -07:00
dweiller
2766b704c1
std.compress.zstandard: add DictionaryIdFlagUnsupported ZstandardStream.Error
2023-02-20 09:09:06 +11:00
dweiller
1a862175d5
std.compress.zstandard: fix zstandardStream content size validation
2023-02-20 09:09:06 +11:00
dweiller
12aa478db0
std.compress.zstandard: also check block size when sequence count is 0
2023-02-20 09:09:06 +11:00
dweiller
a53cf299a6
std.compress.zstandard: add error condition to ring buffer decoding
...
Previously `executeSequenceRingBuffer()` would not verify the offset
against the number of bytes already decoded, so it would happily copy
garbage bytes rather than return an error before the window was filled.
To fix this a new `written_count` is added to the decode state that
tracks the total number of bytes decoded.
2023-02-20 09:09:06 +11:00
dweiller
5a31fc2014
std.compress.zstandard: fix erroneous literal stream empty checks
2023-02-20 09:09:06 +11:00
dweiller
8fd41314bd
std.compress.zstandard: remove unneeded branch
2023-02-20 09:09:06 +11:00
dweiller
476d2fe1fa
std.compress.zstandard: fix zstandardStream finishing early
2023-02-20 09:09:06 +11:00
dweiller
373d8ef26e
std.compress.zstandard: check FSE bitstreams are fully consumed
2023-02-20 09:09:06 +11:00
dweiller
1530e73648
std.compress.zstandard: bytes read assert to error in decodeBlockReader
2023-02-20 09:09:06 +11:00
dweiller
ee5af3c74c
std.compress.zstandard: cleanup high-level api docs and error sets
2023-02-20 09:09:06 +11:00
dweiller
31cc4605ab
std.compress.zstandard: fix errors and crashes in ZstandardStream
2023-02-20 09:09:06 +11:00
dweiller
55e6e9409c
std.compress.zstandard: fix content size check
2023-02-20 09:09:06 +11:00
dweiller
6d48b055af
std.compress.zstandard: add decodeFrameHeader
...
Also do some other minor API cleanup
2023-02-20 09:09:06 +11:00
dweiller
3975a9d7ca
std.compress.zstandard: error when FSE bitstream is no fully consumed
2023-02-20 09:09:06 +11:00
dweiller
77ca1f7859
std.compress.zstandard: remove UnusedBitSet error
2023-02-20 09:09:06 +11:00
dweiller
d9a90e1818
std.compress.zstandard: fix decodeAlloc() and remove decodeFrameAlloc()
2023-02-20 09:09:06 +11:00