Jonathan Marler
0c7397b49f
fix copy/paste error in AllocWithOptionaPayload
2020-05-06 23:08:08 -06:00
Timon Kruiper
b336dda076
Standard library: Fix a regression in loop.waitUntilFdWritableOrReadable
...
This broke async io on linux.
Regressed in 8ebcca6734e07aea29098ca4c63c0216b3099d0e
2020-05-06 13:14:06 -04:00
data-man
3c4abacba6
Optimization of vectors hashing
2020-05-06 17:08:49 +05:00
Vexu
0e30edd8d0
std: handle ConnectionTimedOut in switch
...
regression from #5266
closes #5270
2020-05-06 12:52:26 +03:00
Andrew Kelley
6f3d76f61e
simplify test-evented-io build setting
2020-05-05 15:18:04 -04:00
Haze Booth
a39cb034ea
Add setUseTestEventedIO for test steps in build.zig
2020-05-05 15:16:54 -04:00
Andrew Kelley
b13a02ed1a
avoid unnecessary fcntl syscalls when setting socket flags
2020-05-05 12:50:50 -04:00
Andrew Kelley
0a2104689b
fix incorrect flags being set in os.setSockFlags
...
fixes networking stuff on darwin
2020-05-05 12:45:39 -04:00
Andrew Kelley
e6955688ac
Merge pull request #5272 from tadeokondrak/noasync-to-nosuspend
...
Noasync to nosuspend
2020-05-05 11:21:02 -04:00
Tadeo Kondrak
fdfdac4939
update comments for nosuspend
2020-05-05 05:55:27 -06:00
Tadeo Kondrak
af00afed98
zig fmt
2020-05-05 05:55:25 -06:00
Tadeo Kondrak
8d5636ebe4
Rename noasync to nosuspend in self-hosted, add rewriter
2020-05-05 05:17:33 -06:00
Haze Booth
4cb4097b08
Update ErrorUnion thread spawn result to return null instead of 0
2020-05-05 04:15:43 -04:00
Vexu
f127dee474
Merge pull request #5267 from Vexu/const-call
...
Fix missing compile error on call assigned to const
2020-05-04 21:45:15 +03:00
Jonathan Marler
75b699b2c6
os.zig: add ETIMEDOUT error case to read function
...
According to documentation ETIMEDOUT (110) is a valid error code for the read function. I just had my long-running (been running for about 7 weeks) network program crash because it did not handle the ETIMEDOUT error code from "read".
2020-05-04 13:48:34 -04:00
Vexu
85fd484f07
std: fix blake3 assignment to constant
2020-05-04 14:45:36 +03:00
Cato
9b788b765c
Pass filtered_sock_type to system.socket. Cover PermissionDenied error
2020-05-03 15:35:36 -04:00
Andrew Kelley
8a8beefa36
solve the problem with Darwin shims in std.os instead
...
* implement SOCK_NONBLOCK and SOCK_CLOEXEC Darwin shims in std.os
* revert changes to std.net
* remove os.accept and rename os.accept4 to os.accept
2020-05-02 17:36:28 -04:00
Cato
07bee9da42
Fixed Darwin-incompatible socket flags and unavailable system calls
2020-05-02 16:37:39 -04:00
Andrew Kelley
03a7124543
Merge pull request #5249 from ziglang/FireFox317-windows-evented-io
...
fix behavior test with --test-evented-io on windows
2020-05-02 16:29:58 -04:00
Andrew Kelley
b7914d901c
add test coverage for top level fields
...
closes #2022
2020-05-02 14:53:20 -04:00
Andrew Kelley
7998e2b0f4
Merge remote-tracking branch 'origin/master' into FireFox317-windows-evented-io
2020-05-02 14:16:59 -04:00
Chris Heyes
8ebcca6734
Get evented io code paths to build on macOS ( #5233 )
...
* Get evented io code paths to build on macOS
* Use mode_t instead of usize where appropriate
2020-05-02 14:14:46 -04:00
Andrew Kelley
5656f5090d
fs.File: improve handling async I/O on Windows
...
Before it was possible for .intended_io_mode = .blocking,
.capable_io_mode = .evented, and then the implementation would put a
request on the fs thread, which is the wrong behavior. Now it always
calls the appropriate WriteFile/ReadFile function, passing the intended
io mode directly as a parameter.
This makes the behavior tests pass on Windows with --test-evented-io.
2020-05-02 14:09:17 -04:00
Andrew Kelley
9dac8a5be9
update windows impl of child process to new File API
2020-05-02 04:31:26 -04:00
nycex
77376a54bf
correct usages of std.fs.dir.DeleteFileError ( #5058 )
...
* correct usages of std.fs.dir.DeleteFileError
* test std.fs.createFileAbsolute() and std.fs.deleteFileAbsolute()
2020-05-02 04:19:07 -04:00
Andrew Kelley
428065da30
Merge pull request #5243 from niacat/kern-arand
...
Avoid reading from /dev/urandom on NetBSD
2020-05-02 04:16:24 -04:00
Andrew Kelley
6546c74825
child process: no need to remove O_CLOEXEC before execve
2020-05-02 03:38:05 -04:00
Andrew Kelley
beebcbb677
Merge remote-tracking branch 'origin/master' into FireFox317-windows-evented-io
2020-05-02 01:53:24 -04:00
Andrew Kelley
43f7856bac
fix regressions in windows std lib tests
2020-05-02 01:25:22 -04:00
Andrew Kelley
2272a07ca0
std.event.Loop: promote the fs thread to be available for all OS's
2020-05-02 00:41:19 -04:00
Andrew Kelley
45bce27b8f
cleanup and fixes. behavior tests passing with evented I/O
2020-05-01 23:17:28 -04:00
Andrew Kelley
988031c07c
Merge branch 'windows-evented-io' of https://github.com/FireFox317/zig into FireFox317-windows-evented-io
2020-05-01 19:02:16 -04:00
Andrew Kelley
3386bb896d
Merge pull request #5192 from ziglang/stage2-tests
...
add ZIR compare output test case to test suite
2020-05-01 17:35:52 -04:00
Andrew Kelley
94b0d0e802
std.progress: handle error from FillConsoleOutputAttribute
...
I observed this returning an error. Fall back to not doing
terminal stuff if an error occurs here.
See #5244
2020-05-01 15:14:44 -04:00
Cato Auestad
5418efa1e5
Added socket bits for Darwin
2020-05-01 14:28:33 -04:00
Andrew Kelley
ec6ef86219
fix off-by-one error in sizeInBaseUpperBound
2020-05-01 13:33:46 -04:00
nia
14a954f350
Add arc4random_buf() in NetBSD libc, use it to implement getrandom()
2020-05-01 17:22:27 +01:00
Andrew Kelley
4044a77621
update std.meta.IntType => std.meta.Int
2020-05-01 06:49:30 -04:00
Andrew Kelley
8766821157
rework std.math.big.Int
...
Now there are 3 types:
* std.math.big.int.Const
- the memory is immutable, only stores limbs and is_positive
- all methods operating on constant data go here
* std.math.big.int.Mutable
- the memory is mutable, stores capacity in addition to limbs and
is_positive
- methods here have some Mutable parameters and some Const
parameters. These methods expect callers to pre-calculate the
amount of resources required, and asserts that the resources are
available.
* std.math.big.int.Managed
- the memory is mutable and additionally stores an allocator.
- methods here perform the resource calculations for the programmer.
- this is the high level abstraction from before
Each of these 3 types can be converted to the other ones.
You can see the use case for this in the self-hosted compiler, where we
only store limbs, and construct the big ints as needed.
This gets rid of the hack where the allocator was optional and the
notion of "fixed" versions of the struct. Such things are now modeled
with the `big.int.Const` type.
2020-05-01 06:47:56 -04:00
Andrew Kelley
f89dbe6c4e
link: introduce the concept of output mode and link mode
2020-05-01 06:47:20 -04:00
Andrew Kelley
28729efe29
ZIR: implement return instruction
2020-05-01 06:47:20 -04:00
Andrew Kelley
6b0f7de247
ZIR: add cmp and condbr instructions
2020-05-01 06:47:20 -04:00
Andrew Kelley
2bae942800
add ZIR compare output test case to test suite
2020-05-01 06:47:20 -04:00
Jakub Konka
b23a87953a
Fast-forward std.os.bits.wasi to match preview1 snapshot ABI
...
`wasi_snapshot_preview1` introduced a couple of ABI changes. This
commit fast-forwards the types and consts defined in `std.os.bits.wasi`
to match those changes.
2020-04-30 13:28:50 -04:00
Vexu
7192ca14b7
Merge pull request #5216 from alexnask/windows_ansi_codes
...
Progress will now use ANSI escape codes on windows for terminals that support them
2020-04-30 18:35:55 +03:00
Vexu
e72f45475d
Merge pull request #4683 from LakeByTheWoods/parser_test
...
Add visible newlines to parser_test output when there's a failure.
2020-04-30 12:04:23 +03:00
Vexu
611bd8e9f4
Merge pull request #5213 from tadeokondrak/evented-readv-fix
...
Fix std.event.Loop.readv
2020-04-30 11:00:27 +03:00
Vexu
87c9696121
move printWithVisibleNewlines to testing.expectEqualStrings
2020-04-30 10:34:18 +03:00
Vexu
2d06e731ec
rename diffIndex to indexOfDiff
2020-04-30 10:33:50 +03:00