28019 Commits

Author SHA1 Message Date
Jakub Konka
f9eb14ddcf macho: parse input object files specifically for incl in archive 2024-02-07 19:27:26 +01:00
Jakub Konka
82144a9073 macho: fix invalid ZigObject size calculation 2024-02-07 19:27:26 +01:00
Jakub Konka
35ac066f1d macho: fix writing SYMDEF symtab size 2024-02-07 19:27:26 +01:00
Jakub Konka
efa1c6124d macho: emit an archive 2024-02-07 19:27:26 +01:00
Jakub Konka
897a554109 macho: populate output archive symtab 2024-02-07 19:27:26 +01:00
Jakub Konka
80cafad9d3 macho: read-in committed ZigObject to memory from file 2024-02-07 19:27:26 +01:00
Jakub Konka
7f01b61679 macho: move static lib emitting logic to relocatable.zig 2024-02-07 19:27:25 +01:00
Jakub Konka
bdbb1dbe15 macho: refactor markExports, markImportsExports and claimUnresolved 2024-02-07 19:27:25 +01:00
Jakub Konka
352e27c55c macho: move static lib flushing logic into Archive 2024-02-07 19:27:25 +01:00
Ian Kerins
ee36131e6a doc: fix typo in getEnvMap 2024-02-07 12:41:40 +02:00
Jacob Young
b3aed4e2c8 link: report function failures in FuncAnalysis
This unblocks backend errors after #18814.
2024-02-07 07:12:32 +00:00
Jacob Young
9211938e6e Elf: fix memory leaks 2024-02-07 00:17:23 -05:00
Jacob Young
38c2a25735 Builder: fix memory leaks 2024-02-06 22:31:13 -05:00
Manlio Perillo
3da6043e2c compiler: remove unnecessary pub declarations in main.zig
Some declarations, like zig subcommands and usage strings, are
unnecessary marked as public, even thought they are only referenced by
main.zig.
2024-02-06 16:09:55 -08:00
Pyry Kovanen
476ba04753
x86: remove final vestiges of mir_to_air (#18836) 2024-02-06 14:13:31 -05:00
David Rubin
24fb6d1f30
Make @intFromEnum an error for empty enums 2024-02-06 21:04:09 +02:00
Jakub Konka
52066bf8e4 x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
Jakub Konka
db6addf31a macho: store open file descriptors in a global array 2024-02-06 17:38:50 +01:00
iwVerve
7bd8b35a3d langref: fix missing word typo 2024-02-06 17:22:59 +02:00
David Rubin
3069669bc1 add the clflush mnem 2024-02-06 07:08:16 -05:00
Matthew Lugg
0c80725068
Merge pull request #18814 from mlugg/incremental-dependencies
Begin re-implementing incremental compilation
2024-02-06 11:33:07 +00:00
Andrew Kelley
648b492ef1
Merge pull request #18831 from ziglang/flatten-value
flatten value.zig into Value.zig (refactor only)
2024-02-05 23:32:22 -08:00
Andrew Kelley
5cf138e512 delete bad behavior test
As pointed out in the issue this behavior test branches on an undefined
value. That's not valid Zig code.

Also behavior tests should not depend on the standard library in this
manner. They need to minimally isolate the specific language thing that
is being tested.

Closes #12681
2024-02-05 23:47:05 -07:00
Andrew Kelley
dd54804d86 compiler: make Value's self reference non pub
Done in this separate commit to make rebasing on this branch work
better.
2024-02-05 18:14:19 -07:00
Andrew Kelley
78f15bc714 compiler: rename value.zig to Value.zig
This commit only does the file rename to be friendlier to version
control conflicts.
2024-02-05 18:13:07 -07:00
Andrew Kelley
2de5e31721 compiler: flatten Value struct
This commit is almost entirely whitespace.
2024-02-05 18:07:56 -07:00
Andrew Kelley
39ec3d3116
Merge pull request #18822 from alichraghi/shader
spirv: basic shader support
2024-02-05 13:30:52 -08:00
Samuel Fiedler
0266017b59 Make EfiPhysicalAddress in std/os/uefi/tables.zig public 2024-02-05 15:31:33 +00:00
Ali Chraghi
be32ae0534 std: add gpu namespace 2024-02-05 11:55:14 +03:30
Ali Chraghi
739108c9f0 spirv: support enum integer values in Assembler 2024-02-05 11:55:14 +03:30
Ali Chraghi
b41aad0193 spirv: emit vectors whenever we can 2024-02-05 11:55:14 +03:30
Ali Chraghi
afa7793351 spirv: basic shader support 2024-02-05 11:55:14 +03:30
Robin Voetter
7634a115c5
Merge pull request #18580 from Snektron/spirv-more-vectors
spirv: more vector operations
2024-02-05 09:24:49 +01:00
Jacob Young
aebf20cc9a compiler_rt: avoid referencing symbol on versions where it doesn't exist
This change causes `__isPlatformVersionAtLeast` to no longer exist in
compiler_rt when targetting a min os version earlier than 10.15, which
is earlier than the default os version and so only affects builds that
explicitly target an older version than Zig officially supports.
2024-02-05 03:17:57 -05:00
Jacob Young
941d3a2bb1 x86_64: fix miscompilations on baseline 2024-02-05 02:16:56 -05:00
Jacob Young
eaa6218f09 x86_64: fix errors compiling the compiler
This fixes issues targetting both `x86_64-linux` and `x86_64-macos` with
the self-hosted backend.
2024-02-04 22:58:38 -05:00
Jakub Konka
f5dbcd1cb4 macho: add <cpu_arch>-macosx to target strings as a fallback target
Turns out that around 10.13/10.14 macOS release version, Apple changed the target tags in
tbd files from `macosx` to `macos`. In order to be compliant and therefore actually support
linking on older platforms against `libSystem.tbd`, we add `<cpu_arch>-macosx` to target strings.
2024-02-05 00:09:26 +01:00
mlugg
0784d38984
compiler: lock incremental dependency tracking behind --debug-incremental
This logic (currently) has a non-trivial cost (particularly in terms of
peak RSS) for tracking dependencies. Until incremental compilation is in
use in the wild, it doesn't make sense for users to pay that cost.
2024-02-04 19:17:20 +00:00
mlugg
0d8207c292
Zcu: refactor Decl.analysis field
* Functions failing codegen now set this failure on the function
  analysis state. Decl analysis `codegen_failure` is reserved for
  failures generating constant values.

* `liveness_failure` is consolidated into `codegen_failure`, as we do
  not need to distinguish these, and Liveness.Verify is just a debugging
  feature anyway.

* `sema_failure_retryable` and `codegen_failure_retryable` are removed.
  Instead, retryable failures are recorded in the new
  `Zcu.retryable_failures` list. On an incremental update, this list is
  flushed, and all elements are marked as outdated so that we re-attempt
  analysis and code generation.

Also remove the `generation` fields from `Zcu` and `Decl` as these are
not needed by our new strategy for incremental updates.
2024-02-04 18:38:40 +00:00
mlugg
269c1ae649
Zcu: incremental compilation improvements
* Mark root Decls for re-analysis separately
* Check for re-analysis of root Decls
* Remove `outdated` entry when analyzing fn body
* Remove legacy `outdated` field from Decl analysis state
2024-02-04 18:38:40 +00:00
mlugg
a0004cebc2
Zcu: more dependency tracking logic
* Invalidate `decl_val` dependencies
* Recursively mark and un-mark all dependencies correctly
* Queue analysis of outdated dependers in `Compilation.performAllTheWork`

Introduces logic to invalidate `decl_val` dependencies after
`Zcu.semaDecl` completes. Also, recursively un-mark dependencies as PO
where needed.

With this, all dependency invalidation logic is in place. The next step
is analyzing outdated dependencies and triggering appropriate
re-analysis.
2024-02-04 18:38:39 +00:00
mlugg
1e91ee1e05
Zir: store extra source hashes required for incremental
Also add corresponding invaidation logic to Zcu. Therefore, the only
invalidation logic which is not yet in place is `decl_val` dependencies.
2024-02-04 18:38:39 +00:00
mlugg
7f4bd247c7
compiler: re-introduce dependencies for incremental compilation
Sema now tracks dependencies appropriately. Early logic in Zcu for
resolving outdated decls/functions is in place. The setup used does not
support `usingnamespace`; compilations using this construct are not yet
supported by this incremental compilation model.
2024-02-04 18:38:39 +00:00
Robin Voetter
2511106150
spirv: air vector_store_element 2024-02-04 19:09:34 +01:00
Robin Voetter
9fbba0e01a
spirv: update tests 2024-02-04 19:09:33 +01:00
Robin Voetter
1d548aa2aa
spirv: air splat 2024-02-04 19:09:33 +01:00
Robin Voetter
76d5696434
spirv: air abs 2024-02-04 19:09:32 +01:00
Robin Voetter
631d1b63a8
spirv: fix shuffle properly 2024-02-04 19:09:32 +01:00
Robin Voetter
9641d2ebdb
spirv: vectorize max, min 2024-02-04 19:09:31 +01:00
Robin Voetter
9f0227a326
spirv: vectorize int_cast, trunc 2024-02-04 19:09:31 +01:00