Commit graph

9923 commits

Author SHA1 Message Date
Ryan Liptak
ae6df9e967 start.zig: Replace kernel32 usage with ntdll
Co-authored-by: e4m2 <git@e4m2.com>
2023-11-03 19:25:46 +02:00
Luuk de Gram
c893f83715
cli: consolidate entry point flags 2023-11-03 12:48:53 +01:00
Luuk de Gram
938f9dea37
update linker tests
This updates all linker tests to include `no_entry` as well as changes
all tests to executable so they do not need to be updated later when
the in-house WebAssembly linker supports dynamic libraries.
2023-11-03 12:48:53 +01:00
Luuk de Gram
1cb7a01b25
wasm-linker: implement -fno-entry flag
This adds support for the `-fno-entry` and `-fentry` flags respectively, for
zig build-{exe/lib} and the build system. For `zig cc` we use the `--no-entry`
flag to be compatible with clang and existing tooling.

In `start.zig` we now make the main function optional when the target is
WebAssembly, as to allow for the build-exe command in combination with
`-fno-entry`.

When the execution model is set, and is set to 'reactor', we now verify
when an entry name is given it matches what is expected. When no entry
point is given, we set it to `_initialize` by default. This means the user
will also be met with an error when they use the reactor model, but did
not provide the correct function.
2023-11-03 12:48:52 +01:00
Andrew Kelley
94cee4fb27 mingw-w64: add shcore def files
these are copied from mingw-w64 v10.0.0
2023-11-02 12:20:09 -07:00
Ryan Liptak
42d4d07efa start: Make wWinMain nCmdShow setting match Windows better
It won't match perfectly; see https://github.com/ziglang/zig/issues/17808
2023-11-02 00:19:40 -04:00
Andrew Kelley
d892665694
Merge pull request #17819 from Luukdegram/wasm-bitcast-fix
wasm - fix bitcasting between arrays and scalar types
2023-11-01 20:20:11 -04:00
XXIV
c2cf47ab28
std.os.windows: remove unnecessary @ptrCast (#17816) 2023-11-01 18:45:51 -04:00
Luuk de Gram
db1825e931
wasm: re-enable regressed tests 2023-11-01 19:47:15 +01:00
Kai Jellinghaus
7ee7c90274 Fix regressing #17290 from #17734 2023-11-01 18:30:56 +02:00
Jordyfel
61861ef395 std.http: account for renames in docs 2023-11-01 14:46:00 +02:00
Kai Jellinghaus
084a7cf028
Use ArenaAllocator.reset in MemoryPool 2023-11-01 14:45:35 +02:00
Andrew Kelley
3fc6fc6812 std.builtin.Endian: make the tags lower case
Let's take this breaking change opportunity to fix the style of this
enum.
2023-10-31 21:37:35 -04:00
Jacob Young
149200aac5 mem: delete readIntSlice and writeIntSlice
After deleting all potentially incorrect usages, there were no more
remaining.
2023-10-31 21:37:35 -04:00
Jacob Young
d890e81761 mem: fix ub in writeInt
Use inline to vastly simplify the exposed API.  This allows a
comptime-known endian parameter to be propogated, making extra functions
for a specific endianness completely unnecessary.
2023-10-31 21:37:35 -04:00
XXIV
46062f1c13
std.fs: remove unnecessary @ptrCast (#17805) 2023-10-31 20:15:40 -04:00
Andrew Kelley
8457439a84
Merge pull request #17797 from squeek502/utf16-ascii-fast-path
std.unicode: Add ASCII fast path to UTF-16 <-> UTF-8 conversion functions
2023-10-31 13:32:01 -04:00
Ryan Liptak
13c8ec9db0 std.unicode: Add ASCII fast path to UTF-16 -> UTF-8 conversion functions 2023-10-31 02:23:35 -07:00
Ryan Liptak
03117c5290 std.unicode: Add ASCII fast path to UTF-8 -> UTF-16 conversion functions 2023-10-31 02:23:33 -07:00
XXIV
34aac2bae1
std/Thread: remove unnecessary @ptrCast (#17766) 2023-10-31 00:17:39 -04:00
Krzysztof Wolicki
1880c799ae
autodoc: Some support for field_call (#16853)
* autodoc: Some support for field_call

* autodoc: Change handling of field_call to respect tryResolveRefPath, add fieldVal to Expr

* autodoc: Fixed errors

* autodoc: sync with latest master changes

---------

Co-authored-by: Loris Cro <kappaloris@gmail.com>
2023-10-30 21:04:49 +00:00
Karl Seguin
f52a228a5d
Fix http.Headers.initList
Use correct return type (error union), cast field length for hashmap capacity.
2023-10-30 20:35:24 +00:00
Jacob Young
f6f2708d82 x86_64: fix compiler rt test failures 2023-10-29 07:20:36 -04:00
Kamil T
37295696ec std.os.windows additions and fixes 2023-10-29 11:01:54 +02:00
Andrew Kelley
e7ead9c5ea std: delete psapi, gdi32, and winmm
The only remaining Windows APIs now are the ones that the standard
library itself depends on for its cross-platform abstractions.

closes #4426
2023-10-29 00:58:00 -04:00
Jakub Konka
13c7aa5fef
Merge pull request #17727 from ziglang/elf-memory-deferred
x86_64+elf: do not pass hardcoded memory addresses in prep for build-obj
2023-10-28 19:41:07 +02:00
Andrew Kelley
d817a3c517 delete std.os.windows.user32
This is progress towards #4426
Closes #17417
2023-10-28 13:16:47 -04:00
Andrew Kelley
49b9e1e69b std.mem.minMax: make it return a tuple
this is a breaking change
2023-10-28 10:14:15 -07:00
XXIV
9ff9ea38ea
compiler_rt/emutls: remove unnecessary @ptrCast (#17755) 2023-10-28 02:27:58 -04:00
Jacob Young
a440cf6d44 x86_64: fix c abi test failures 2023-10-27 23:31:20 -04:00
Linus Groh
772636ed0d
std.json: Parse -0 as a float instead of an integer (#17729)
This is consistent with `JSON.parse("-0")` in JavaScript, RFC 8259
doesn't specifically mention what to do in this case.
If a negative zero is encoded the intention is likely to preserve the
sign.
2023-10-27 18:05:51 +00:00
frmdstryr
a4cffd80bd Update slice_sentinel comment
Slice end can be omitted
2023-10-27 18:45:59 +03:00
frmdstryr
8dccd77277 Update comment on while
The @"while" is still used if cont expr is missing.
2023-10-27 18:45:24 +03:00
Jacob Young
3b0dce8ebd
Merge pull request #17716 from jacobly0/x86_64
x86_64: pass more tests
2023-10-27 08:29:24 -04:00
Travis Staloch
8f48533691 GenericReader error set fixes
add error.EndOfStream to readEnum() and isBytes() so that users can
catch these errors.  this also prevents them from panicing with
'invalid error value' on EndOfStream.

test both methods.
2023-10-27 05:50:33 -04:00
Andrew Kelley
29b05897a5
Merge pull request #17734 from joadnacer/iouring-update
std.linux: Update io_uring structs and consts for kernel 6.3.8
2023-10-27 04:44:25 -04:00
Nameless
87735e4dae std.http.Client: add proxy scheme guessing, fix typo
This adds scheme guessing when loading proxies, such that
`HTTP_PROXY=127.0.0.1` and such are valid now and it behaves identically
to `HTTP_PROXY=http://127.0.0.1`. Additionally fixed a typo that was
causing loadDefaultProxies to never populate the https_proxy.
2023-10-27 03:42:33 -04:00
Jacob Young
b0cf620fe3 x86_64: fix cond_br 2023-10-27 03:33:49 -04:00
Jacob Young
42bca3e2ee x86_64: fix @memset 2023-10-27 01:40:27 -04:00
Jacob Young
434a7db986 x86_64: add missing spill 2023-10-27 01:40:27 -04:00
Jacob Young
6ad22cd964 x86_64: add missing spills 2023-10-26 22:35:38 -04:00
Jacob Young
98cd378208 x86_64: fix behavior of getValue
Old behavior renamed to `getValueIfFree`.
2023-10-26 21:45:58 -04:00
Jacob Young
5e83441096 x86_64: implement @divFloor and @mod for i128 2023-10-26 21:45:57 -04:00
joadnacer
28b848e3f0 std.io_uring: Improve splice implementation 2023-10-27 00:31:55 +01:00
joadnacer
0005e7e70b std.linux: Update io_uring structs and consts for kernel 6.3.8 2023-10-27 00:31:52 +01:00
Michael Dusan
da06269d70 std.target: bump some OS max versions
- freebsd, openbsd, macos, ios, watchos, tvos
2023-10-26 19:18:37 -04:00
Krzysztof Wolicki
a9e66ed730 Step.Options: @typeName gives a fully qualified name so the test needs to reflect that 2023-10-26 13:56:43 +03:00
Jakub Konka
cc394431ae
Merge pull request #17699 from ziglang/elf-better-alloc
elf: allocated PHDR table always immediately succeeding the EHDR
2023-10-25 23:25:56 +02:00
Jakub Konka
10ea7accf7
Merge pull request #17706 from ziglang/elf-error-tests
elf: test error generation
2023-10-25 23:20:12 +02:00
frmdstryr
5c5d1f93c4 Update comment on for_range in Ast
The rhs can be omitted eg `0..`
2023-10-25 14:09:34 -04:00