Jacob Young
a3529c2dea
tools: implement more lldb pretty printers
2023-02-27 05:37:03 -05:00
Andrew Kelley
f6c9346773
std.Build.CompileStep.installConfigHeader: add missing step dependency
2023-02-25 23:22:17 -05:00
Andrew Kelley
26196be344
rename std.Build.InstallRawStep to ObjCopyStep
...
And make it not do any installation, only objcopying. We already have
install steps for doing installation.
This commit also makes ObjCopyStep properly integrate with caching.
2023-02-24 23:48:03 -05:00
Frank Denis
c7f479c3cb
crypto/benchmark.zig: fix pointer capture of non pointer type ( #14722 )
2023-02-24 19:45:24 +00:00
Gaëtan S
5f70c36fa8
fix RegQueryValueExW api
2023-02-24 13:22:12 -05:00
Andrew Kelley
d3c9bfada6
std.Build.WriteFileStep: integrate with cache system
...
And additionally support writing files to source files. This means a
custom build step in zig's own build.zig is no longer needed for copying
zig.h because it is handled by WriteFileStep.
2023-02-23 01:08:23 -05:00
Andrew Kelley
c9e02d3e69
Merge pull request #14691 from jacobly0/ctype
2023-02-22 11:06:13 -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
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
Jacob Young
828ac637b2
MultiArrayList: delete pessimizing vector usage
...
By factoring out the comptime parts of this computation, vectors are no
longer useful in this function.
2023-02-21 00:27:12 -05:00
Jacob Young
1a1598daf0
hash map: remove extra argument
2023-02-21 00:27:12 -05:00
dweiller
c6ef83efe5
std.compress.zstandard: clean up streaming API
2023-02-21 14:53:02 +11:00
mlugg
09a84c8384
Update std.Build to new module CLI, update zig1 and CMakeLists
...
Resolves : #14667
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
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
dweiller
a74f800dd7
std.compress.zstandard: update for multi-for-loop change
2023-02-20 16:58:48 +11: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
dweiller
2134769436
std.compress.zstandard: validate skippable frame size
2023-02-20 09:09:06 +11:00
dweiller
98bbd959b0
std.compress.zstandard: improve block size validation
2023-02-20 09:09:06 +11:00
dweiller
ece52e0771
std.compress.zstandard: verify content size and fix crash
2023-02-20 09:09:06 +11:00
dweiller
a9c8376305
std.compress.zstandard: make ZstandardStream decode multiple frames
2023-02-20 09:09:06 +11:00
dweiller
06ab5a2cd2
std.compress.zstandard: add multi-frame decoding functions
2023-02-20 09:09:06 +11:00
dweiller
a625df4636
std.compress.zstandard: fix fse decoding crash
2023-02-20 09:09:06 +11:00
dweiller
1c509f483a
std.compress.zstandard: fix crashes
2023-02-20 09:09:06 +11:00
dweiller
596a97fb55
std.compress.zstandard: fix crashes
2023-02-20 09:09:06 +11:00
dweiller
a651704876
std.compress.zstandard: free allocated result on error
2023-02-20 09:09:06 +11:00
dweiller
3f1c4306ca
std.compress.zstandard: fix capitalisation of Zstandard
2023-02-20 09:09:06 +11:00
dweiller
ddeabc9aa7
std.compress.zstandard: add decodeFrameAlloc()
2023-02-20 09:09:06 +11:00
dweiller
89f9c5cb37
std.compress.zstandard: improve doc comments
2023-02-20 09:09:06 +11:00