Vincent Rischmann
eddf491bf4
io: fix PeekStream compilation
2020-04-01 12:26:49 +02:00
Vincent Rischmann
318abaad02
io: test all files under std/io
2020-04-01 12:24:09 +02:00
Michaël Larouche
a5af78c376
Fix porting of zlib alder32 with large input
2020-03-31 20:08:42 -04:00
Andrew Kelley
d34a3c66b3
Merge pull request #4543 from daurnimator/cleanup-json
...
std.json improvements
2020-03-31 12:07:25 -04:00
Andrew Kelley
28b7306a31
Merge pull request #4880 from daurnimator/use-spanZ
...
Take advantage of mem.spanZ accepting null
2020-03-31 11:57:31 -04:00
Andrew Kelley
d9d8c42426
remove unnecessary inline
...
works around a bug triggered by previous commit
2020-03-31 11:18:11 -04:00
daurnimator
3cf302a71d
Tidy up some mem.spanZ use-sites now that null is accepted
2020-04-01 01:50:34 +11:00
Andrew Kelley
0e372ccff5
clean up the duplicate export logic for __clear_cache
2020-03-31 10:48:48 -04:00
daurnimator
b1eb831aba
std: fix mem.span* when an optional pointer is passed
2020-04-01 01:44:55 +11:00
LemonBoy
e9c49f423d
compiler-rt: More clear_cache implementations
2020-03-31 10:36:12 -04:00
Tetralux
d57b5205c6
Fix std.fifo.LinearFifo
...
- Fix undeclared variable in 'writeItem'
- Clarify docs of `read` regarding bytes vs. items
- Normalize 'writeable' to 'writable' (the more common parlance)
2020-03-31 10:18:58 -04:00
daurnimator
63409cf422
std: linux syscall numbers are now an extensible enum
2020-03-31 10:16:20 -04:00
Andrew Kelley
839d85e440
fixes to 32-bit handling, to support 32-bit arm
2020-03-31 10:10:31 -04:00
daurnimator
7a3d700fd9
std: introduce json.WriteStream.stringify
2020-04-01 00:13:00 +11:00
daurnimator
42cabe4366
std: use json.StringifyOptions.Whitespace from json.WriteStream
2020-04-01 00:12:59 +11:00
daurnimator
a32d88f12c
std: add support to std.json.stringify for null literals
2020-04-01 00:12:59 +11:00
daurnimator
62fbb6b874
std: allow picking between serialising []u8 as string or array
2020-04-01 00:12:59 +11:00
daurnimator
edf487b126
std: add options to std.json.stringfy to control escaping
2020-04-01 00:12:59 +11:00
daurnimator
17f5d04bed
std: use json.stringify logic in some json.WriteStream code paths
2020-04-01 00:12:59 +11:00
daurnimator
5a053247e2
std: use stringify from Value.dump; remove other dump helpers
2020-04-01 00:12:59 +11:00
daurnimator
e88543a504
std: add jsonStringify trait to json Value objects
2020-04-01 00:07:31 +11:00
daurnimator
48e7c6cca6
std: add whitespace control to json.stringify
2020-03-31 23:57:00 +11:00
daurnimator
3a0875d9e8
std: have json tests take options parameter
2020-03-31 23:19:24 +11:00
Andrew Kelley
83ff94b1cc
compiler-rt: don't export __clear_cache when no impl available
2020-03-30 23:15:07 -04:00
Timon Kruiper
f6f03cd90f
compiler-rt: implement clear_cache for arm32-linux
2020-03-31 00:29:41 +02:00
Andrew Kelley
9e7ae06249
std lib API deprecations for the upcoming 0.6.0 release
...
See #3811
2020-03-30 14:23:22 -04:00
Sebastian
ef419dd72d
mem.zeroes .Array improvements
...
Before (when given an array with many elements):
```
zig\std\mem.zig:345:13: error: evaluation exceeded 1000
backwards branches
for (array) |*element| {
^
```
related to https://github.com/ziglang/zig/issues/4847#issuecomment-605721461
2020-03-30 11:16:25 -04:00
daurnimator
3be720a729
std: mem span functions can take an optional pointer
2020-03-30 11:04:58 -04:00
daurnimator
8cad453495
std: fix compile error since WinsockError was changed
2020-03-30 11:02:06 -04:00
LemonBoy
1ef6f068f5
compiler-rt: Implement all the shift builtins
...
* Unify all the code paths with a generic function
* Add some EABI aliases
Closes #4853
2020-03-30 10:58:47 -04:00
daurnimator
9bc8a1e1d0
std: add some missing errnos on linux
2020-03-30 10:55:18 -04:00
daurnimator
356ef3840f
std: update for linux 5.6 release
2020-03-30 10:55:18 -04:00
Michael Raymond
de9933761c
std.zig.render: fix newlines before DocComments
2020-03-29 22:41:39 -04:00
Andrew Kelley
b717df786b
Merge pull request #4845 from xackus/fix-parseFloat
...
fix overflow in parseFloat and cleanup
2020-03-29 22:40:32 -04:00
xackus
6809222d32
cleanup parse_float.zig
2020-03-29 20:52:25 +02:00
Andrew Kelley
c70471fae6
enable now-passing test cases
...
These can now be enabled thanks to bug fixes that landed in
LLVM 10.
2020-03-29 10:34:12 -04:00
xackus
d1202b1f66
fix overflow in parseFloat
2020-03-29 11:50:41 +02:00
Sebastian
2b0d66736a
tcpConnectToHost - fixed compilation error
...
before:
```
std\net.zig:403:23: error: type '@TypeOf(std.net.getAddressList).ReturnType.ErrorSet!*std.net.AddressList' does not support field access
const addrs = list.addrs.toSliceConst();
^
```
2020-03-28 21:34:50 -04:00
Luna
2028b4ce91
Fix typo in Serializer declaration
2020-03-28 12:01:29 -04:00
LemonBoy
d788b0cd8b
std: Minor changes to TLS handling
...
* Always allocate an info block per-thread so that libc can store
important stuff there.
* Respect ABI-mandated alignment in more places.
* Nicer code, use slices/pointers instead of raw addresses whenever
possible.
2020-03-28 11:20:38 -04:00
LemonBoy
0512be227c
compiler-rt: Fix __floatunditf
...
This builtin converts a u64 into a f128, not a u128 into a f128.
Fixes some weird-ass crashes that happened only on AArch64 systems.
2020-03-27 20:10:59 +01:00
Jonathan S
cf4cbea88e
Factor out arbitrary constant 12 to AtomicFile.RANDOM_BYTES
2020-03-26 15:07:40 -05:00
Jonathan S
a779a96d38
In AtomicFile, work relative to the destination's parent directory. This is more robust against concurrent filesystem reorganization and avoids path length issues.
2020-03-25 23:22:36 -05:00
Andrew Kelley
f7f563ea53
Revert "Merge pull request #4807 from LemonBoy/tls-touchups"
...
This reverts commit ee6fda2297bf75432b8d7115ec4c60c213535bbe, reversing
changes made to f313ab18aecea1ade0b6a90d671352a641ad351a.
This caused a test failure:
```
behavior.misc.test "behavior-arm-linux-none-Debug-bare-multi thread local variable"...test failure
/home/vsts/work/1/s/lib/std/testing.zig:191:14: 0x4608f in std.testing.expect (test)
if (!ok) @panic("test failure");
^
/home/vsts/work/1/s/test/stage1/behavior/misc.zig:616:11: 0x53e93 in behavior.misc.test "behavior-arm-linux-none-Debug-bare-multi thread local variable" (test)
expect(S.t == 1235);
^
```
2020-03-25 21:12:24 -04:00
Andrew Kelley
fae6cf0961
improved handling of native system directories
...
* `-isystem` instead of `-I` for system include directories
fixes a problem with native system directories interfering with zig's
bundled libc.
* separate Stage2Target.is_native into Stage2Target.is_native_os and
Stage2Target.is_native_cpu.
2020-03-25 20:34:15 -04:00
Michael Dusan
dd66fbb96a
Merge pull request #4811 from mikdusan/fix4634
...
self-hosted: use fs.selfExePathAlloc
2020-03-25 19:49:52 -04:00
Benjamin Feng
9dbfee49d7
Carry-over stream error to JSON.stringify
2020-03-25 18:54:04 -04:00
Andrew Kelley
ee6fda2297
Merge pull request #4807 from LemonBoy/tls-touchups
...
std: Minor changes to TLS handling
2020-03-25 18:53:04 -04:00
Michael Dusan
d554070de1
self-hosted: use fs.selfExePathAlloc
...
- add fs.selfExePathAlloc
- use fs.selfExePathAlloc instead of fs.selfExeDirPathAlloc
- remove redundant code from fs.selfExeDirPath
closes #4634
2020-03-25 18:40:28 -04:00
Andrew Kelley
3869e80331
Merge pull request #4793 from LemonBoy/netbsd-forever
...
Netbsd forever
2020-03-25 10:19:49 -04:00