Commit Graph

10974 Commits

Author SHA1 Message Date
Der Teufel
e6cab917e1 autodoc: added support for tuple structs 2023-01-25 15:34:04 +01:00
Jakub Konka
e675af0698 elf+macho: append null to DWARF strtab to avoid overlapping sects
Otherwise, we were risking having strtab zero-sized and overlap
with another section.
2023-01-25 09:58:13 +01:00
Andrew Kelley
cb9d00e1af
Merge pull request #14402 from kcbanner/cbe_x86_fixes
CBE: x86 support and MSVC ABI fixes
2023-01-24 17:53:54 -05:00
Der Teufel
dd8e16b906 autodoc: Add tag handling to enums and unions. Add support for Struct, Enum, Union types in exprName.
Anonymous types now work via a hack to ast_nodes.
2023-01-24 19:07:25 +01:00
Loris Cro
af820bbb94 autodoc: init support for guides 2023-01-24 18:56:35 +01:00
kcbanner
8dd0107255 zig fmt fixup 2023-01-23 13:48:37 -05:00
kcbanner
77084093d8 cbe: handle building for -msvc using clang and -gnu using msvc 2023-01-23 13:48:37 -05:00
kcbanner
1aa2c32055 cbe: fixes for x86
- Emit calling convention
- Fix .Naked handling for msvc
- Add teb helper for x86
- Fix 128-bit shl implementation when rhs is >= 64
- Add 128-bit shl tests
2023-01-23 13:48:36 -05:00
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