More precisely, aac4fe380d16a957627af2d6e5110ee35ad7e7e7 which is the
current tip of release/13.x.
Immediately following commits are tracking the same LLVM version.
- Take into account that iteration order is undefined by checking against a map instead of relying on numerically sorted iteration order
- Check both path and basename for each entry instead of just path
Allows for iterating over the kvs when constructing with a list literal instead of having to create a separate array to pass into ComptimeStringMap in order to maintain access to the values.
For example when making a set, before in order to loop over the kvs you'd have to do something like:
const MyKV = struct { @"0": []const u8 };
const kvs: []const MyKV = &[_]MyKV{ .{ @"0" = "foo"}, .{ @"0" = "bar" } };
const map = ComptimeStringMap(void, kvs);
for (kvs) |kv| {}
whereas now it's possible to do:
const map = ComptimeStringMap(void, .{ .{"foo"}, .{"bar"} });
for (map.kvs) |kv| {}
* AstGen: use coerced_ty ResultLoc on array types and rely on Sema
doing type coercion, to reduce the size of the ZIR for these
instructions.
* Sema: implement `@ptrCast`.
* Sema: implement coercion from `T` to `?T` with an intermediate
coercion rather than equality check.
The idea is to depend on this language feature as little as possible
with the hopes that it can be adjusted to be less of an anti-pattern.
This also helps self-hosted, which does not yet implement
`usingnamespace`, get closer to being able to build compiler-rt.
instead of globally storing unresolved and tentative defs,
store indices to actual symbols in the functions that are responsible
for symbol resolution.
This is now no longer limited to targeting macOS natively but also
tries to detect the sysroot when targeting different Apple platforms
from macOS; for instance targeting iPhone Simulator from macOS. In
this case, Zig will try detecting the SDK path by invoking
`xcrun --sdk iphonesimulator --show-sdk-path`, and if the command
fails because the SDK doesn't exist (case when having CLT installed only)
or not having either Xcode or CLT installed, we simply return null
signaling that the user has to provide the sysroot themselves.
For example, in order to run a binary on an iPhone Simulator,
you need to specify that explicitly as part of the target as
`aarch64-ios-simulator` rather than `aarch64-ios-gnu` or
`aarch64-ios` for short.
* ensure we correctly transfer `-iwithsysroot` and
`-iframeworkwithsysroot` flags with values from `build.zig` and that
they are correctly transferred forward to `zig cc`
* try to look for `libSystem.tbd` in the provided syslibroot - one
caveat that the user will have to specify library search paths too
Previously, I have incorrectly assumed that with two-level namespace
we only need to link in dylibs/frameworks that actually export symbols
which are undefined in the linked image. Turns out, regardless of
whether we link with two-level namespace (default on macOS) or a
flat namespace (more common on other platforms), we always need to
put the dylibs/frameworks as specified by the user from the linker
line into the final linked image.
Some parsers interpret these as octal, some don't, and the confusion can lead to vulnerabilities.
Return error.NonCanonical when parsing IPv4 addresses with 0 prefixes.
* Value: rename `error_union` to `eu_payload` and clarify the intended
usage in the doc comments. The way error unions is represented with
Value is fixed to not have ambiguous values.
* Fix codegen for error union constants in all the backends.
* Implement the AIR instructions having to do with error unions in the
LLVM backend.
* New AIR instructions: ptr_add, ptr_sub, ptr_elem_val, ptr_ptr_elem_val
- See the doc comments for details.
* Sema: implement runtime pointer arithmetic.
* Sema: implement elem_val for many-pointers.
* Sema: support coercion from `*[N:s]T` to `[*]T`.
* Type: isIndexable handles many-pointers.