Veikka Tuominen
220020599c
Merge pull request #13670 from mlugg/fix/astgen-ambiguous-package
...
AstGen: detect and error on files included in multiple packages
2023-01-23 14:25:42 +02:00
Andrew Kelley
d395127552
Merge pull request #14389 from ziglang/ci-macos-debug
...
CI: additionally test x86_64-macos with a debug build of the zig compiler
2023-01-23 02:08:18 -05:00
Jan Philipp Hafer
55e879d2ed
std.os.windows: add possible error NETNAME_DELETED of ReadFile
...
Closes #13631
2023-01-23 02:07:12 -05:00
Andrew Kelley
8484df5bd2
zig cc: add -Wno-overriding-t-option to clang on darwin
...
This avoids a warning that sometimes occurs when providing both a
-target argument that contains a version as well as the
-mmacosx-version-min argument. Zig provides the correct value in both
places, so it doesn't matter which one gets overridden.
2023-01-22 12:27:18 -07:00
mlugg
5f9186d0ce
AstGen: detect and error on files included in multiple packages
...
Previously, if a source file was referenced from multiple packages, it
just became owned by the first one AstGen happened to reach; this was a
problem, because it could lead to inconsistent behaviour in the compiler
based on a race condition. This could be fixed by just analyzing such
files multiple times - however, it was pointed out by Andrew that it
might make more sense to enforce files being part of at most a single
package. Having a file in multiple packages would not only impact
compile times (due to Sema having to run multiple times on potentially a
lot of code) but is also a confusing anti-pattern which more often than
not is a mistake on the part of the user.
Resolves : #13662
2023-01-22 19:00:03 +00:00
mlugg
6d71d79dc2
Package: store package name directly
...
By @Vexu's suggestion, since fetching the name from the parent package
is error-prone and complex, and optimising Package for size isn't really
a priority.
2023-01-22 19:00:03 +00:00
joachimschmidt557
c0284e242f
stage2 ARM: add basic debug info for locals
...
Also disables one behavior test which was failing
2023-01-22 12:00:04 +01:00
Andrew Kelley
a51c76541d
Merge pull request #14403 from Vexu/fixes
...
Misc fixes
2023-01-22 00:36:50 -05:00
Jakub Konka
562d52e23d
Merge pull request #14397 from ziglang/macho-unwind-info
...
zld: handle parsing and synthesising unwind info in the MachO linker
2023-01-22 00:44:44 +01:00
Veikka Tuominen
aa626deadd
llvm: implement explicit Win64 and SysV calling conventions
2023-01-22 01:04:20 +02:00
Veikka Tuominen
a28fbf3132
Sema: fix error message for bad pointer arithmetic
...
Closes #14388
2023-01-22 01:04:20 +02:00
Veikka Tuominen
1f475de852
Sema: fix unwrapping null when reporting error on member access
...
Closes #14399
2023-01-22 01:04:20 +02:00
Veikka Tuominen
5259d11e3b
Sema: resolve fields before checking tuple len
...
Closes #14400
2023-01-22 00:12:37 +02:00
Veikka Tuominen
5f5ab49168
Value: implement compareAllWithZero for bytes and str_lit
...
Closes #10692
2023-01-22 00:12:37 +02:00
Veikka Tuominen
a492a607d5
type: correct condition for eliding pointer alignment canonicalization
...
Closes #14373
2023-01-22 00:12:37 +02:00
Veikka Tuominen
d284c00fda
Sema: handle lazy values in more places
...
* resolve lazy values in anon structs being passed to anytype params
* use `resolveMaybeUndefValIntable` where appropriate
Closes #14356
2023-01-22 00:12:36 +02:00
Stephen Gregoratto
7f635ae7bd
FreeBSD: add mcontext_t for aarch64
...
What isn't disabled for test-std mostly passes, except for the copysign
and signbit tests for f16. Seemingly related to #14366 .
2023-01-21 23:20:50 +02:00
Jakub Konka
6fd1d7b372
zld: fix 32bit build
2023-01-21 17:17:34 +01:00
Jakub Konka
983e373409
macho: fix sorting symbols by seniority
2023-01-21 16:53:46 +01:00
Jakub Konka
02db9933a4
macho: properly relocate target symbol address in __eh_frame
2023-01-21 14:11:56 +01:00
Jakub Konka
3dff040ca5
macho: synthesise unwind records in absence of compact unwind section
...
Unlike Apple ld, we will not do any DWARF CFI parsing and simply
output DWARF type unwind records.
2023-01-21 13:37:48 +01:00
Jakub Konka
835a60a34f
zld: parse, synthesise and emit unwind records
2023-01-20 18:43:16 +01:00
Jakub Konka
9f0cb763a4
macho: disable some log messages
2023-01-20 13:10:20 +01:00
Jakub Konka
9d2711a3d9
macho: use ArrayHashMap for tracking of dyld runtime metadata
2023-01-20 12:10:16 +01:00
Jakub Konka
e17c551a2e
macho: revert ordering tweak of lazy bind pointers and add logging
2023-01-20 11:00:08 +01:00
Jakub Konka
dcdbfba770
macho: require an exclusive lock to the Cache.Manifest
2023-01-20 10:59:48 +01:00
Veikka Tuominen
fe6dcdba14
Merge pull request #14357 from kcbanner/llvm_byval_struct
...
llvm: implement Stdcall calling convention
2023-01-20 04:38:49 +02:00
Jakub Konka
989b0e620b
Merge pull request #14369 from ziglang/macho-dyld-ops
...
macho+zld: add improved dyld opcodes emitters
2023-01-19 19:49:51 +01:00
Veikka Tuominen
2b7678bc42
llvm: implement Stdcall return types
2023-01-19 16:13:52 +02:00
Jakub Konka
bcd16b2708
macho: fix ordering issue with lazy bind pointers
2023-01-19 14:06:47 +01:00
Jakub Konka
b2febd1ce7
macho: fix 32bit build
2023-01-19 09:53:18 +01:00
kcbanner
5949851074
llvm: pass non-scalars as byref in .Stdcall
...
- add c_abi tests for .Stdcall
- enable (x86|x86_64)-windows-gnu in the c_abi tests
2023-01-19 00:37:56 -05:00
Jakub Konka
61e38d0c34
macho+zld: add improved dyld opcodes emitters
2023-01-19 00:05:45 +01:00
Loris Cro
35f5d43768
autodoc: add support for top-level doc comments
2023-01-18 19:45:32 +01:00
Michael Dusan
c9f7b32fbd
netbsd: add mcontext_t for aarch64
...
- test `lib/std/std.zig` passes
- stack traces work
2023-01-18 02:50:11 -05:00
Veikka Tuominen
fc066992d9
Sema: do not create slices with undefined pointers
...
The undef pointer ended up being zero on wasm32.
2023-01-17 20:28:43 +02:00
Veikka Tuominen
3b2c421102
Sema: fix bad boolean logic for cast to null panic
...
Closes #14349
2023-01-17 20:28:43 +02:00
Veikka Tuominen
e04547642a
Sema: promote smaller float types passed to variadic functions
...
Closes #6854
2023-01-17 20:28:43 +02:00
Veikka Tuominen
14f03fbd16
AstGen: reset source cursor before generating pointer attributes
...
These attributes can appear in any order but AstGen expects the source
cursor to be incremented in a monotonically increasing order.
Closes #14332
2023-01-17 20:28:43 +02:00
Veikka Tuominen
24646b8b5d
windows x86_64 C ABI: pass byref structs as byref_mut
2023-01-17 20:28:43 +02:00
Veikka Tuominen
8b35f09f4a
Sema: resolve lazy values in switch prong items
...
Closes #14330
2023-01-17 20:28:43 +02:00
Veikka Tuominen
6b037bad59
Sema: ignore dependency loops in typeinfo decls
...
This matches stage1 behavior.
Closes #14322
2023-01-17 20:28:43 +02:00
Veikka Tuominen
6e067dc050
llvm: do not offset packed struct field pointers if they have a host size
...
Closes #14261
2023-01-17 20:28:42 +02:00
Andrew Kelley
d56a65a8c4
std.http.Client: default to lazy root cert scanning
...
After this change, the system will be inspected for root certificates
only upon the first https request that actually occurs. This makes the
compiler no longer do SSL certificate scanning when running `zig build`
if no network requests are made.
2023-01-17 01:44:56 -05:00
Andrew Kelley
e646becd04
Merge pull request #14336 from Vexu/field-reorder
...
Sema: automatically optimize order of struct fields
2023-01-16 21:19:48 -05:00
fn ⌃ ⌥
e45b471ad3
Find system-installed root SSL certificates on macOS ( #14325 )
2023-01-16 22:34:04 +00:00
Veikka Tuominen
342bae02d8
Sema: automatically optimize order of struct fields
...
This is a simple starting version of the optimization described in #168
where the fields are just sorted by order of descending alignment.
2023-01-16 19:46:41 +02:00
Loris Cro
b42bd759a7
autodoc: missing fmt on Autodoc.zig
2023-01-16 18:04:31 +01:00
Krzysztof Wolicki
ae69dfe6e7
autodoc: Better handling of variable decls ( #14301 )
2023-01-16 17:28:07 +01:00
Techatrix
32544ed56c
swap align and callconv in function typeName
2023-01-16 14:04:03 +02:00