Andrew Kelley
077994abb6
Merge pull request #17318 from gh-fork-dump/linux-5.6-cachestat
...
Update Linux syscalls for 5.5 and add a wrapper for `cachestat`
2023-09-28 16:27:28 -07:00
Christofer Nolander
c4ad6be002
Allow empty enum to be used in EnumSet/EnumMap
...
Moves the check for empty fields before any access to those fields.
2023-09-28 21:48:39 +00:00
Karl Seguin
599641357c
std.mem: use for loop instead of while in indexOf* to reduce bound checking
2023-09-28 15:40:08 +00:00
Jakub Konka
1063035be6
Merge pull request #17304 from ziglang/elf-grow-vm-2
...
elf: grow segments in virtual memory if they exceed allocated capacity
2023-09-28 14:29:35 +02:00
Jonathan Marler
e0ef61d46d
simplify ContainerDeclarations grammar rule
...
Noticed this grammar rule could be simplified using a repeating sequence
rather than recursion.
2023-09-28 14:18:54 +03:00
Emil Lerch
fcca3cd1a3
std.http: introduce options to http client to allow for raw uris
...
Addresses #17015 by introducing a new startWithOptions. The only option is currently is a flag
to use the provided URI as is, without modification when passed to the server. Normally, this
is not needed nor desired. However, some REST APIs may have requirements that cannot be satisfied
with the default handling.
2023-09-28 14:16:39 +03:00
Jonathan Marler
18f1db134c
docs: remove unnecessary nesting in grammar
...
noticed this extra level of nesting in the Decl grammar that looks
unnecssary.
2023-09-28 13:58:14 +03:00
Ryan Liptak
a362d3963c
resinator: Update to latest, fix for big endian arch
2023-09-28 02:25:52 -07:00
Stephen Gregoratto
bc0bf4e97a
Linux: Add cachestat wrapper.
...
Can be tested using this program I whipped up:
https://gist.github.com/The-King-of-Toasters/aee448f5975c50f735fd1946794574f7
2023-09-28 18:58:05 +10:00
Stephen Gregoratto
5f456b2b97
Update Linux syscalls for kernel 5.5
...
The latest addition is `cachestat`, which provides more detailed
information for paged files.
2023-09-28 18:58:05 +10:00
Stephen Gregoratto
11fcbe5a46
gen_linux_syscalls: use default max output bytes
...
Apparently, 20KiB is not enough anymore.
2023-09-28 18:58:05 +10:00
Jakub Konka
df285949f7
elf: do not assume segments laid out in increasing order in VM space
2023-09-28 08:47:58 +02:00
Andrew Kelley
937138cb90
Merge pull request #17248 from antlilja/abs
...
Replace @fabs builtin with new @abs builtin
2023-09-27 17:25:19 -07:00
Veikka Tuominen
ab3ac1e670
Value: fix assertion failure when mutating extern union
...
Closes #17292
2023-09-27 11:47:24 -07:00
Andrew Kelley
9763573ebb
update zig1.wasm
...
Needed because the compiler used the now removed `@fabs` builtin and
instead depends on the new `@abs` builtin.
2023-09-27 11:30:02 -07:00
antlilja
8191199951
fmt: add rewrite from @fabs to @abs
2023-09-27 11:24:45 -07:00
antlilja
c62bf068e5
Change @fabs to @abs in langref
2023-09-27 11:24:39 -07:00
antlilja
fcdb7d9e47
Add behavior tests for @abs builtin
2023-09-27 11:24:36 -07:00
antlilja
15cc008bf8
Replace @fabs with @abs in behavior tests
2023-09-27 11:24:33 -07:00
antlilja
bcf4a13913
Remove @fabs, fabs and absCast/Int from std lib
...
Replaces occurences of @fabs absCast and absInt with new @abs builtin.
Also removes the std.math.fabs alias from math.zig.
2023-09-27 11:24:28 -07:00
Andrew Kelley
1c02e58fc0
Revert "compiler: don't use @abs builtin yet"
...
This reverts commit 21780899eb17a0cb795ff40e5fae6556c38ea13e.
After this commit, a version of the compiler which supports the new
`@abs` builtin is required.
2023-09-27 11:23:28 -07:00
Andrew Kelley
21780899eb
compiler: don't use @abs builtin yet
...
This commit can be used to rebuild zig1.wasm
2023-09-27 11:21:59 -07:00
antlilja
6a29646a55
Rename @fabs to @abs and accept integers
...
Replaces the @fabs builtin with a new @abs builtins which accepts
floats, signed integers and vectors of said types.
2023-09-27 11:15:53 -07:00
Jakub Konka
8f90dbba55
elf: fix typo in selecting larger addrspace for load segments
2023-09-27 20:05:46 +02:00
Jakub Konka
8b7255c22a
elf: hint allocateSegment where to put the segment at
2023-09-27 19:41:59 +02:00
Jakub Konka
111349f83c
elf: do not update globals not defined by the object
2023-09-27 19:22:57 +02:00
Jakub Konka
85132965f4
elf: use new error reporting API
2023-09-27 16:40:51 +02:00
Jakub Konka
09863fc970
elf: emit fatal linker error if we run out of VM space with self-hosted backends
2023-09-27 15:07:05 +02:00
Andrew Kelley
1606717b5f
C backend: flatten out some of the long-lived state
...
When the compiler's state lives through multiple Compilation.update()
calls, the C backend stores the rendered C source code for each
decl code body and forward declarations.
With this commit, the state is still stored, but it is managed in one
big array list in link/C.zig rather than many array lists, one for each
decl. This means simpler serialization and deserialization.
2023-09-27 04:09:22 -07:00
kcbanner
70563aeac3
windows: fix not finding system libs when compiling for *-windows-msvc
...
When compiling for *-windows-msvc, find the native libc_installation and
add the lib dirs to lib_dirs, so that system libs can be found.
Previously, `version` and `ole32` were detected via the mingw.libExists logic,
even on .msvc, which was a false positive. This detection logic for mingw doesn't
find uuid.lib, which was the failure that triggered this bugfix.
Only build the issue_5825 test if the native target is x86_64-windows-msvc,
since it requires the .msvc abi.
2023-09-27 04:07:12 -07:00
Jakub Konka
e178580d86
elf: pre-allocate large VM capacity per segment
2023-09-27 10:00:20 +02:00
Jakub Konka
1200a5a240
elf: allow expanding segments in virtual memory
2023-09-27 09:59:59 +02:00
Ryan Liptak
de4d1ea250
Add myself as a code owner of /src/resinator/
2023-09-26 23:08:34 -07:00
Jakub Konka
7a43f45908
Merge pull request #17284 from ziglang/elf-tests
...
elf: link against musl libc, add ELF test harness, dynamically allocate misc SHF_ALLOC sections
2023-09-27 07:39:58 +02:00
Kai Jellinghaus
d1e39b6914
Add new fields to io_sqring_offsets & io_cqring_offsets
...
`user_addr`s were introduced in `03d89a2` ([github link](03d89a2de2 ) which was shipped in v6.5
`flags` was introduced even earlier
2023-09-26 18:16:36 -07:00
Jay Petacat
37398ed2a5
std: Reactivate skipped tests w.r.t. llvm/llvm-project#55522
2023-09-27 01:37:25 +03:00
LinuxUserGD
ceaae42e90
Add '--compress-debug-sections=zstd'
2023-09-26 14:18:01 -07:00
Chris Burgess
1c726bcb32
std.http: add identity to content encodings ( #16493 )
...
Some servers will respond with the identity encoding, meaning no
encoding, especially when responding to range-get requests. Adding the
identity encoding stops the header parser from failing when it
encounters this.
2023-09-26 17:16:40 -04:00
Andrew Kelley
5d907171e2
Merge pull request #17152 from mikdusan/macos-sdk
...
macos SDK updates and enhancements
2023-09-26 13:16:07 -07:00
Phil Richards
15ce965252
define _WIN32_WINNT for windows compilations based on target minver ( #17224 )
2023-09-26 15:25:08 -04:00
Jakub Konka
e30f396b73
elf: properly close the output file when linking
2023-09-26 21:07:47 +02:00
Jakub Konka
7617486f1d
elf: skip running exe on foreign hosts
2023-09-26 21:07:47 +02:00
Jakub Konka
b01b972999
elf: test linking against empty C object
2023-09-26 21:07:47 +02:00
Jakub Konka
eb497c50e3
elf: dynamically allocate remaining alloc sections (and segments)
2023-09-26 21:07:47 +02:00
Jakub Konka
5e617e4b0c
elf: put libc on the linker line if requested
2023-09-26 21:07:47 +02:00
Jakub Konka
e7c6dfde3d
elf: do not try to create LlvmObject if module is null
2023-09-26 21:07:47 +02:00
Jakub Konka
8abfb3559a
elf: test statically linking libc
2023-09-26 21:07:47 +02:00
Jakub Konka
aac04b4a5a
elf: port some of zld's test harness
2023-09-26 21:07:47 +02:00
Michael Dusan
0c8bf405eb
kubkon review changes: 4
...
- fix `darwin_sdk_layout.?` with null checks
2023-09-26 07:51:32 -04:00
Veikka Tuominen
f4c884617f
Merge pull request #17215 from kcbanner/read_from_memory_union
...
sema: add support for unions in readFromMemory and writeToMemory
2023-09-26 11:16:03 +03:00