Andrew Kelley
95ac94b7ac
std.debug: fix segfault/panic race condition
...
closes #7859
closes #12207
2023-04-09 14:09:52 -04:00
Andrew Kelley
2ee328995a
Merge pull request #15123 from truemedian/http-server
...
std.http: add http server
2023-04-09 10:44:52 -04:00
Andrew Kelley
c22a30ac99
zig cc: handle the -r flag
...
This makes -r treated the same as -c which is to output an object file.
Zig's ELF linker code already handles multiple object files into an
object file with the -r flag to LLD.
closes #11683
2023-04-08 15:48:27 -04:00
Andrew Kelley
aa45854ec3
zig.h: fix typo for zig_trap definition
2023-04-08 09:54:32 -07:00
David CARLIER
2e2d37917d
std: add FreeBSD's procctl api.
2023-04-08 18:31:01 +03:00
Luuk de Gram
58bab660b5
Merge pull request #15202 from SuperAuguste/misc-wasm
...
Implement `@shuffle`, fix vector element accesses for WASM backend
2023-04-08 17:13:58 +02:00
Nameless
7f9a4625fd
std.http: reenable protocol read tests, add missing branch in findHeaders end
2023-04-08 09:59:37 -05:00
Nameless
ef6d58ed3b
std.http: add documentation
2023-04-08 09:59:36 -05:00
Nameless
8250a92544
update package manager to use req.do(), fix chunked trailer reading
2023-04-08 09:59:36 -05:00
Nameless
52c78f4974
fix bugs, waitForCompleteHead -> do, move redirecting to do instead of read
...
fix for 32bit arches
curate error sets for api facing functions, expose raw errors in client.last_error
fix bugged dependency loop, disable protocol tests (needs mocking)
add separate mutex for bundle rescan
2023-04-08 09:59:36 -05:00
Nameless
aecbfa3a1e
add buffering to connection instead of the http protocol, to allow passing through upgrades
2023-04-08 09:59:36 -05:00
Nameless
08bdaf3bd6
std.http: add http server
...
* extract http protocol into protocol.zig, as it is shared between client and server
* coalesce Request and Response back into Client.zig, they don't contain
any large chunks of code anymore
* http.Server is implemented as basic as possible, a simple example below:
```zig
fn handler(res: *Server.Response) !void {
while (true) {
defer res.reset();
try res.waitForCompleteHead();
res.headers.transfer_encoding = .{ .content_length = 14 };
res.headers.connection = res.request.headers.connection;
try res.sendResponseHead();
_ = try res.write("Hello, World!\n");
if (res.connection.closing) break;
}
}
pub fn main() !void {
var server = Server.init(std.heap.page_allocator, .{ .reuse_address = true });
defer server.deinit();
try server.listen(try net.Address.parseIp("127.0.0.1", 8080));
while (true) {
const res = try server.accept(.{ .dynamic = 8192 });
const thread = try std.Thread.spawn(.{}, handler, .{res});
thread.detach();
}
}
```
2023-04-08 09:59:35 -05:00
Nameless
fde05b10b3
tls.Client: don't read if we don't need more data
2023-04-08 03:37:05 -04:00
Auguste Rame
09fda08618
Fix 32-bit compile errors
2023-04-07 23:04:24 -04:00
Auguste Rame
7225a15abe
Enable new tests
2023-04-07 20:55:04 -04:00
Auguste Rame
8ba3ab948a
Handle compile time case for vector element access using lane access
2023-04-07 20:52:04 -04:00
Auguste Rame
1e310d3350
Finish shuffle, fix arrayElemVal for vectors
2023-04-07 20:35:15 -04:00
Andrew Kelley
55a8b7e1fa
Merge pull request #15097 from zachcheu/add-wrap-flag
...
add linker -wrap flag
2023-04-07 19:58:55 -04:00
Auguste Rame
d5511b35a9
Make airShuffle work for unrolled
2023-04-07 19:07:48 -04:00
Luuk de Gram
4ebf483e0d
Merge pull request #14668 from Techatrix/wasm-floatops
...
wasm: implement float operations with compiler-rt
2023-04-07 18:22:41 +02:00
Andrew Kelley
48f98494fd
Merge pull request #15195 from mlugg/fix/liveness-loop-defer-deaths
...
Liveness: defer deaths of externally-scoped instructions in loop bodies
2023-04-07 11:12:44 -04:00
Andrew Kelley
b086b7da9e
zig cc: complete the -wrap flag implementation
...
* use a set instead of a list
* use of this flag currently requires LLD
* add documentation
* make it only a zig cc compatibility flag for now because I personally
think this is an anti-feature.
2023-04-07 07:54:47 -07:00
Zach Cheung
1fdea551b2
add linker -wrap flag
2023-04-07 09:09:38 -04:00
mateusz
0866396308
std.json: allow returning custom errors from custom stringify
2023-04-07 15:01:09 +03:00
Auguste Rame
dac62424f9
Make self-hosted wasm @returnAddress return 0
2023-04-07 14:59:22 +03:00
Jacob Young
a7f674d6c1
cbe: assert there are no unfreed locals
...
Also fix the many revealed bugs.
2023-04-07 01:29:20 +01:00
mlugg
1059b57898
Liveness: defer deaths of externally-scoped instructions in loop bodies
2023-04-07 01:29:20 +01:00
Andrew Kelley
13aa7871b2
Merge pull request #15101 from motiejus/glibc_compat
...
glibc: add backwards compatibility for some symbols
2023-04-06 17:15:58 -04:00
Andrew Kelley
9f957184a1
Merge remote-tracking branch 'origin/master' into llvm16
2023-04-06 13:58:54 -07:00
Andrew Kelley
271f24f047
CI: disable reproducibility check on x86_64-macos
2023-04-06 13:58:25 -07:00
Andrew Kelley
eccf39c995
CI: update aarch64-macos tarball
2023-04-06 08:40:36 -07:00
Andrew Kelley
ef5afbfcf4
zig.h: f16 fix for compiler_rt
...
See #15092
2023-04-06 08:40:02 -07:00
Andrew Kelley
467a1498e4
CI: update x86_64-macos tarballs to llvm 16.0.1
2023-04-06 01:29:19 -07:00
Andrew Kelley
eb19f73af5
update zig1.wasm
2023-04-05 23:27:50 -07:00
Andrew Kelley
fc9ab4144c
update libcxx to LLVM 16.0.1
2023-04-05 23:22:29 -07:00
alion02
8853005672
Fix crash on some Windows machines
2023-04-06 07:26:07 +02:00
Andrew Kelley
f289277599
Merge remote-tracking branch 'origin/master' into llvm16
2023-04-05 22:05:31 -07:00
Jacob Young
5870ffeb82
compiler_rt: change the abi of f16 on mac to depend on the other type
2023-04-05 22:05:10 -07:00
Jacob Young
243848167b
compiler_rt: attempt to fix f16 abi on mac with llvm 16
2023-04-05 22:05:06 -07:00
jim price
3487514626
std.os: add mincore syscall
...
The mincore syscall is available on some UNIX like operating systems
and allows a user to determine if a page is resident in memory.
2023-04-06 00:57:23 -04:00
David CARLIER
3e467c778a
std: add os_log/signpost api (sort of linux's perf event equivalent)
...
subset.
2023-04-06 07:31:06 +03:00
Nikita Ronja
d92b5fcfb0
Add NetBSD termios constants to std.c.netbsd
2023-04-06 03:46:44 +03:00
Veikka Tuominen
66520c8342
Sema: validate array element types
...
Fixes the compiler crash part of #15175
2023-04-05 14:45:56 +03:00
Veikka Tuominen
82a6acca93
Sema: implement inline switch capture at comptime
...
Closes #15157
2023-04-05 14:45:56 +03:00
David CARLIER
080136e4ad
std: add madvise flags to freebsd
2023-04-05 13:54:01 +03:00
David CARLIER
f86f531e9c
std: add a subset of the apple's QOS api
2023-04-05 09:01:35 +02:00
Jacob Young
ad5fb4879b
std: fix memory bugs
...
This fixes logged errors during CI based on the new GPA checks.
2023-04-05 08:23:07 +02:00
Jakub Konka
a503724801
macho: reapply relocation dirtying logic from coff linker
2023-04-05 05:57:09 +02:00
Jakub Konka
f372995e1e
macho: refactor adding GOT and stub entries
...
Don't special-case resolving of `dyld_stub_binder`.
2023-04-05 05:57:09 +02:00
Jakub Konka
5ea6e78943
Merge pull request #15162 from jacobly0/x86_64-start
...
x86_64: get enough things working to enable full `start.zig` logic
2023-04-05 03:02:42 +02:00