aboutsummaryrefslogtreecommitdiff
path: root/src/link
AgeCommit message (Collapse)Author
2024-07-18macho: move relocs re-resolution logic to ZigObjectJakub Konka
2024-07-18macho: re-enable relocatable modeJakub Konka
2024-07-18macho: fix symbol visibility merging logicJakub Konka
2024-07-18macho: we do not yet support interposable symbolsJakub Konka
2024-07-18macho: bring back parts of r modeJakub Konka
2024-07-18macho: link hello world in zig compiled with llvmJakub Konka
2024-07-18macho: bring back parts of arJakub Konka
2024-07-18macho: fix compile errorsJakub Konka
2024-07-18macho: update ZigObject to use new ownership modelJakub Konka
2024-07-18macho: migrate UnwindInfoJakub Konka
2024-07-18macho: migrate eh_frame moduleJakub Konka
2024-07-18macho: migrate Relocation structJakub Konka
2024-07-18macho: migrate MachO.File abstractionJakub Konka
2024-07-18macho: migrate synthetic sectionsJakub Konka
2024-07-18macho: migrate the MachO driverJakub Konka
2024-07-18macho: migrate some of MachO driverJakub Konka
2024-07-18macho: migrate Atom and SymbolJakub Konka
2024-07-18macho: migrate InternalObject and DylibJakub Konka
2024-07-18macho: migrate Object to self-ownership of atoms and symbolsJakub Konka
2024-07-18macho: remove obsolete field from InternalObjectJakub Konka
2024-07-18macho: handle ZigObject when calculating dyld relocsJakub Konka
2024-07-18macho: revamp how we compute dyld relocsJakub Konka
2024-07-18macho: move unwind info records ownership to ObjectsJakub Konka
2024-07-14riscv: `@atomicRmw`David Rubin
Now we generate debug undefined constants when the user asks for them to dedup across the function decl. This takes 2 instructions instead of 7 in the RISC-V backend. TODO, we need to dedupe across function decl boundaries.
2024-07-13InternPool: add and use a mutate mutex for each listJacob Young
This allows the mutate mutex to only be locked during actual grows, which are rare. For the lists that didn't previously have a mutex, this change has little effect since grows are rare and there is zero contention on a mutex that is only ever locked by one thread. This change allows `extra` to be mutated without racing with a grow.
2024-07-10InternPool: make `global_error_set` thread-safeJacob Young
2024-07-10Zcu: cache fully qualified name on DeclJacob Young
This avoids needing to mutate the intern pool from backends.
2024-07-07Zcu: pass `PerThread` to intern pool string functionsJacob Young
2024-07-07Zcu: introduce `PerThread` and pass to all the functionsJacob Young
2024-07-04Zcu: extract permanent state from FileAndrew Kelley
Primarily, this commit removes 2 fields from File, relying on the data being stored in the `files` field, with the key as the path digest, and the value as the struct decl corresponding to the File. This table is serialized into the compiler state that survives between incremental updates. Meanwhile, the File struct remains ephemeral data that can be reconstructed the first time it is needed by the compiler process, as well as operated on by independent worker threads. A key outcome of this commit is that there is now a stable index that can be used to refer to a File. This will be needed when serializing error messages to survive incremental compilation updates.
2024-07-04Merge pull request #20494 from mlugg/the-great-decl-splitAndrew Kelley
refactors ad infinitum
2024-07-04Compilation: rename tsan_static_lib to tsan_libJakub Konka
2024-07-04cbe: don't mark exported values/Decls as externmlugg
2024-07-04cbe: fix for export changesJacob Young
2024-07-04compiler: type.zig -> Type.zigmlugg
2024-07-04Zcu: store `LazySrcLoc` in error messagesmlugg
This change modifies `Zcu.ErrorMsg` to store a `Zcu.LazySrcLoc` rather than a `Zcu.SrcLoc`. Everything else is dominoes. The reason for this change is incremental compilation. If a failed `AnalUnit` is up-to-date on an update, we want to re-use the old error messages. However, the file containing the error location may have been modified, and `SrcLoc` cannot survive such a modification. `LazySrcLoc` is designed to be correct across incremental updates. Therefore, we defer source location resolution until `Compilation` gathers the compile errors into the `ErrorBundle`.
2024-07-04Zcu: key compile errors on `AnalUnit` where appropriatemlugg
This change seeks to more appropriately model the way semantic analysis works by drawing a more clear line between errors emitted by analyzing a `Decl` (in future a `Cau`) and errors emitted by analyzing a runtime function. This does change a few compile errors surrounding compile logs by adding more "also here" notes. The new notes are more technically correct, but perhaps not so helpful. They're not doing enough harm for me to put extensive thought into this for now.
2024-07-04Zcu: rework exportsmlugg
This commit reworks our representation of exported Decls and values in Zcu to be memory-optimized and trivially serialized. All exports are now stored in the `all_exports` array on `Zcu`. An `AnalUnit` which performs an export (either through an `export` annotation or by containing an analyzed `@export`) gains an entry into `single_exports` if it performs only one export, or `multi_exports` if it performs multiple. We no longer store a persistent mapping from a `Decl`/value to all exports of that entity; this state is not necessary for the majority of the pipeline. Instead, we construct it in `Zcu.processExports`, just before flush. This does not affect the algorithmic complexity of `processExports`, since this function already iterates all exports in the `Zcu`. The elimination of `decl_exports` and `value_exports` led to a few non-trivial backend changes. The LLVM backend has been wrangled into a more reasonable state in general regarding exports and externs. The C backend is currently disabled in this commit, because its support for `export` was quite broken, and that was exposed by this work -- I'm hoping @jacobly0 will be able to pick this up!
2024-07-04macho: do not save rpaths globally in the driverJakub Konka
2024-07-04macho: link dynamic TSAN libJakub Konka
2024-06-27Merge pull request #20428 from ziglang/macho-tsanJakub Konka
macho: support TSAN
2024-06-26macho: set allow_shlib_undefined to true when TSAN was requestedJakub Konka
2024-06-26macho: print libtsan ref when dumping argvJakub Konka
2024-06-26macho: link in TSAN if requestedJakub Konka
2024-06-26Zir: make `src_line` absolute for `declaration` instructionsmlugg
We need special logic for updating line numbers anyway, so it's fine to just use absolute numbers here. This eliminates a field from `Decl`.
2024-06-23Rename *[UI]LEB128 functions to *[UI]leb128Michael Bradshaw
2024-06-22rename src/Module.zig to src/Zcu.zigAndrew Kelley
This patch is a pure rename plus only changing the file path in `@import` sites, so it is expected to not create version control conflicts, even when rebasing.
2024-06-20Merge pull request #20299 from mlugg/the-great-decl-splitMatthew Lugg
The Great Decl Split (preliminary work): refactor source locations and eliminate `Sema.Block.src_decl`.
2024-06-19Merge pull request #20070 from Rexicon226/riscvJakub Konka
more RISC-V backend progress
2024-06-18link.Wasm: correctly fetch source location when decl is a typemlugg
The comment explains the situation here. This is a bit of a hack, and should be reworked when `Decl` is properly split up.