mlugg
402b958e19
std.pdb: fix incorrect field alignment in ptrCast
2023-06-30 23:23:03 -04:00
mlugg
730f2e0407
Sema: copy pointer alignment to struct field pointers
2023-06-30 23:23:03 -04:00
mlugg
5b594139d9
Sema: copy pointer alignment to union field pointers
...
This implements the semantics as discussed in today's compiler meeting,
where the alignment of pointers to fields of default-layout unions
cannot exceed the field's alignment.
Resolves : #15878
2023-06-30 23:23:01 -04:00
Ryan Liptak
2eae013378
fs.path: Fix Windows path component comparison being ASCII-only
...
We can use eqlIgnoreCaseUtf8 to get Unicode-aware Windows-compliant case insensitive path component comparison
2023-06-30 15:29:43 -07:00
Ryan Liptak
cfcf9cd9b7
Add os.windows.nls.upcaseW, a cross-platform implementation of RtlUpcaseUnicodeChar
...
This allows doing Windows-style case insensitive comparisons from any target, but means that it will need to include its own copy of the uppercase data table (5,088 bytes) to do so.
When targeting Windows, the ntdll functions are used instead to avoid including a redundant copy of the uppercase data in the resulting binary.
2023-06-30 15:29:43 -07:00
Evan Haas
0a6cd257b9
translate-c: Use @constCast and @volatileCast to remove CV-qualifiers
...
Instead of converting a pointer to an int and then back to a pointer.
2023-06-29 23:36:56 +03:00
Michael Dusan
614bc6755e
openbsd: add root certificate scanning
...
patch by @bilaliscarioth, thank you!
closes #16168
2023-06-29 10:29:28 -07:00
Jacob Young
43c98dc115
Revert "Merge pull request #15995 from mlugg/fix/union-field-ptr-align"
...
This reverts commit 40cf3f7ae5fbfb84b7af6b27e6296ee858b209ef, reversing
changes made to d98147414d084bc41b00ba9c0be8c7b82ad4e76c.
2023-06-29 00:23:19 -04:00
Jacob Young
1a2468abfc
Revert "Sema: preserve extern struct field alignment"
...
This reverts commit 4620972d086ebb3b7686a79914876488c6dfd171.
2023-06-29 00:23:19 -04:00
Evan Haas
77dcd903a0
langref: Add c_char to the list of primitive types
2023-06-28 17:35:22 -07:00
Lauri Tirkkonen
82520a214c
std.crypto.hash.sha2: require avx2 on x86_64
...
according to
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=vpalignr&ig_expand=283,283,284,283,283&techs=AVX_ALL
the vpalignr instruction requires AVX2 support
2023-06-28 17:33:02 -07:00
Krzysztof Wolicki
0c1bfe271e
autodoc: Correct a comment about types from std.builtin
2023-06-28 19:03:24 +02:00
Krzysztof Wolicki
2984a75804
autodoc: Try to handle all InternPool.Index types good enough
2023-06-28 19:03:24 +02:00
Ian Johnson
4dacaa1e12
Autodoc: add preference for / search
...
Closes #16081
2023-06-28 18:16:16 +02:00
Bertie Wheen
7166407d8f
langref: correct ordering of @xFromY builtins
2023-06-28 17:38:41 +03:00
Alex Kladov
4620972d08
Sema: preserve extern struct field alignment
...
In
extern struct { x: u32, y: u16 }
we actually know that y's alignment is `@alignOf(u32)`, and not just
`@alignOf(u16)`.
closes : #16134
2023-06-28 16:36:32 +02:00
zooster
28f515acd7
behavior: test slicing array of zero-sized values
...
Closes #15343
2023-06-28 14:00:18 +03:00
Motiejus Jakštys
910ad92e0e
ld: support -version-script
...
gettext uses this version and, surely enough, it is supported by lld
2023-06-28 09:32:10 +02:00
r00ster91
adf0718316
behavior: boolean vector with 2 or more elements
...
Closes #12169
2023-06-27 19:57:23 -04:00
r00ster91
d01641f6be
test cases: fix typo in filename
2023-06-27 19:57:23 -04:00
r00ster91
2cc9c99ebf
behavior: if-@as-if chain
...
Closes #8952
2023-06-27 19:57:23 -04:00
r00ster91
c647799e5e
test cases: expected optional type in for loop
...
Closes #10674
2023-06-27 19:57:23 -04:00
r00ster91
5e9fe84d24
test cases: array inside of anonymous struct
...
Closes #7525
2023-06-27 19:57:23 -04:00
r00ster91
10218dd096
test cases: never-inline call of inline function with comptime parameter
...
Closes #5995
2023-06-27 19:57:23 -04:00
r00ster91
18fe951e24
test cases: returning undefined [:0]const u8
...
Closes #5947
2023-06-27 19:57:23 -04:00
r00ster91
78da0e40a8
test cases: taking pointer of global tagged union
...
Closes #11619
2023-06-27 19:57:23 -04:00
r00ster91
413a86f7eb
behavior: correct alignment for elements and slices of aligned array
...
Closes #11751
2023-06-27 19:57:23 -04:00
r00ster91
c040c0f45a
test cases: @intCast on vector
...
Closes #11770
2023-06-27 19:57:19 -04:00
r00ster91
2463f4df77
addrspace: small cleanups
2023-06-27 19:50:17 -04:00
r00ster91
8385b2c379
Sema.analyzeBodyInner: fix some spaces
2023-06-27 19:50:17 -04:00
r00ster91
40e002ae2b
std.builtin.StackTrace: don't print extra newline after stack trace
2023-06-27 19:49:54 -04:00
r00ster91
7213234f0c
test cases: taking address of extern var as constant
...
Closes #5344
2023-06-27 19:08:27 -04:00
r00ster91
d10456eb8d
test cases: maximum sized integer literal
...
Closes #12116
2023-06-27 19:08:27 -04:00
r00ster91
11c32c756f
fix u65529 and above overflowing in more places
...
See also #15537
2023-06-27 19:08:24 -04:00
Krzysztof Wolicki
5804f3f757
autodoc: walkResultTypeRef returns Zig's undefined instead of 0th type
2023-06-27 19:07:39 +02:00
Krzysztof Wolicki
7f648c297e
autodoc: Added u0, i0 to correctly indexed types
2023-06-27 19:07:39 +02:00
Luuk de Gram
622c5f3200
Merge pull request #16207 from Luukdegram/wasi-threads
...
WASI: Implement experimental threading support
2023-06-27 18:28:26 +02:00
mlugg
ff37ccd298
Air: store interned values in Air.Inst.Ref
...
Previously, interned values were represented as AIR instructions using
the `interned` tag. Now, the AIR ref directly encodes the InternPool
index. The encoding works as follows:
* If the ref matches one of the static values, it corresponds to the same InternPool index.
* Otherwise, if the MSB is 0, the ref corresponds to an InternPool index.
* Otherwise, if the MSB is 1, the ref corresponds to an AIR instruction index (after removing the MSB).
Note that since most static InternPool indices are low values (the
exceptions being `.none` and `.var_args_param_type`), the first rule is
almost a nop.
2023-06-27 01:21:32 -07:00
yujiri8
dae516dbdf
improve documentation of std.sort.*Context functions ( #16145 )
2023-06-27 00:51:06 -07:00
Jacob Young
d881d841ed
Sema: use tmp_hack_arena as a temporary solution for lifetime issues
...
All of this code is expected to get rewritten anyway.
Closes #16216
2023-06-27 00:46:31 -07:00
Andrew Kelley
d9e867172e
Merge pull request #16233 from jacobly0/tls
...
crypto.tls.Client: fix occasional crash in `readvAdvanced`
2023-06-27 00:45:49 -07:00
Jacob Young
9343c31c38
Sema: fix @min/@max type resolution with all runtime args
...
Closes #16229
2023-06-26 18:46:25 -07:00
Jacob Young
8239d3b358
crypto: recoup storage in tls.Client.partially_read_buffer
2023-06-26 21:05:08 -04:00
Jacob Young
eb8881a538
crypto: cleanup unneeded uses of @as in tls.Client
2023-06-26 21:05:08 -04:00
Ali Chraghi
6bd5479306
std.sort.block: add safety check for lessThan return value
2023-06-26 17:50:10 -07:00
mlugg
88284c124a
AstGen: fix result locations for elements of typed array init
...
Resolves : #16226
2023-06-26 16:20:33 -07:00
Ian Johnson
bbda053f9e
Build: make InstallDirStep use a FileSource
...
Closes #16187
2023-06-26 15:59:53 -07:00
Luuk de Gram
87b8a0567b
default to single-threaded for WebAssembly
...
When targeting WebAssembly, we default to building a single-threaded build
as threads are still experimental. The user however can enable a multi-
threaded build by specifying '-fno-single-threaded'. It's a compile-error
to enable this flag, but not also enable shared-memory.
2023-06-26 20:00:58 +02:00
Luuk de Gram
e06ab1b010
std: implement detach for WASI-threads
...
When a thread is detached from the main thread, we automatically
cleanup any allocated memory. For this we first reset the stack-pointer
to the original stack-pointer of the main-thread so we can safely clear
the memory which also contains the thread's stack.
2023-06-26 20:00:58 +02:00
Luuk de Gram
622b7c4746
free allocated memory upon call join
...
When `join` detects a thread has completed, it will free the allocated
memory of the thread. For this we must first copy the allocator. This is
required as the allocated memory holds a reference to the original
allocator. If we free the memory, we would end up with UB as the
allocator would free itself.
2023-06-26 20:00:57 +02:00