aboutsummaryrefslogtreecommitdiff
path: root/src/link/MachO/Atom.zig
AgeCommit message (Collapse)Author
5 dayscompiler: replace thread pool with `std.Io`Matthew Lugg
Eliminate the `std.Thread.Pool` used in the compiler for concurrency and asynchrony, in favour of the new `std.Io.async` and `std.Io.concurrent` primitives. This removes the last usage of `std.Thread.Pool` in the Zig repository.
2025-09-26compiler: move self-hosted backends from src/arch to src/codegenAlex Rønne Petersen
2025-08-31std.fmt: delete deprecated APIsAndrew Kelley
std.fmt.Formatter -> std.fmt.Alt std.fmt.format -> std.Io.Writer.print
2025-08-2832-bit fixesAndrew Kelley
2025-08-28link.MachO: update to not use GenericWriterAndrew Kelley
2025-08-11aarch64: implement more assembler instructionsJacob Young
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-07-07compiler: update a bunch of format stringsAndrew Kelley
2025-07-07compiler: fix a bunch of format stringsAndrew Kelley
2025-07-07compiler: upgrade various std.io API usageAndrew Kelley
2025-07-07compiler: upgrade various std.io API usageAndrew Kelley
2025-07-07MachO: revert unfinished changesAndrew Kelley
2025-07-07MachO: update to new std.io APIsAndrew Kelley
2025-03-27std.meta.FieldType -> @FieldTypeАндрей Краевский
2025-02-22zig build fmtAndrew Kelley
2025-01-16x86_64: implement clz and notJacob Young
2025-01-15wasm linker: fix crashes when parsing compiler_rtAndrew Kelley
2025-01-15macho linker: conform to explicit error setsAndrew Kelley
Makes linker functions have small error sets, required to report diagnostics properly rather than having a massive error set that has a lot of codes. Other linker implementations are not ported yet. Also the branch is not passing semantic analysis yet.
2024-10-11link: consolidate diagnosticsAndrew Kelley
By organizing linker diagnostics into this struct, it becomes possible to share more code between linker backends, and more importantly it becomes possible to pass only the Diag struct to some functions, rather than passing the entire linker state object in. This makes data dependencies more obvious, making it easier to rearrange code and to multithread. Also fix MachO code abusing an atomic variable. Not only was it using the wrong atomic operation, it is unnecessary additional state since the state is already being protected by a mutex.
2024-10-09macho: report special symbols if undefinedJakub Konka
Special symbols include explictly force undefined symbols passed via -u flag, missing entry point symbol, missing 'dyld_stub_binder' symbol, or missing '_objc_msgsend' symbol.
2024-08-29compiler: avoid field/decl name conflictsmlugg
Most of the required renames here are net wins for readaibility, I'd say. The ones in `arch` are a little more verbose, but I think better. I didn't bother renaming the non-conflicting functions in `arch/arm/bits.zig` and `arch/aarch64/bits.zig`, since these backends are pretty bit-rotted anyway AIUI.
2024-08-28std: update `std.builtin.Type` fields to follow naming conventionsmlugg
The compiler actually doesn't need any functional changes for this: Sema does reification based on the tag indices of `std.builtin.Type` already! So, no zig1.wasm update is necessary. This change is necessary to disallow name clashes between fields and decls on a type, which is a prerequisite of #9938.
2024-08-17macho: update codegen and linker to distributed jump table approachJakub Konka
2024-08-11compiler: split Decl into Nav and Caumlugg
The type `Zcu.Decl` in the compiler is problematic: over time it has gained many responsibilities. Every source declaration, container type, generic instantiation, and `@extern` has a `Decl`. The functions of these `Decl`s are in some cases entirely disjoint. After careful analysis, I determined that the two main responsibilities of `Decl` are as follows: * A `Decl` acts as the "subject" of semantic analysis at comptime. A single unit of analysis is either a runtime function body, or a `Decl`. It registers incremental dependencies, tracks analysis errors, etc. * A `Decl` acts as a "global variable": a pointer to it is consistent, and it may be lowered to a specific symbol by the codegen backend. This commit eliminates `Decl` and introduces new types to model these responsibilities: `Cau` (Comptime Analysis Unit) and `Nav` (Named Addressable Value). Every source declaration, and every container type requiring resolution (so *not* including `opaque`), has a `Cau`. For a source declaration, this `Cau` performs the resolution of its value. (When #131 is implemented, it is unsolved whether type and value resolution will share a `Cau` or have two distinct `Cau`s.) For a type, this `Cau` is the context in which type resolution occurs. Every non-`comptime` source declaration, every generic instantiation, and every distinct `extern` has a `Nav`. These are sent to codegen/link: the backends by definition do not care about `Cau`s. This commit has some minor technically-breaking changes surrounding `usingnamespace`. I don't think they'll impact anyone, since the changes are fixes around semantics which were previously inconsistent (the behavior changed depending on hashmap iteration order!). Aside from that, this changeset has no significant user-facing changes. Instead, it is an internal refactor which makes it easier to correctly model the responsibilities of different objects, particularly regarding incremental compilation. The performance impact should be negligible, but I will take measurements before merging this work into `master`. Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com> Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2024-07-22macho: handle empty string in ZigObject.getStringJakub Konka
2024-07-22macho: cache string lenJakub Konka
2024-07-22macho: run more things in parallelJakub Konka
2024-07-22macho: redo input file parsing in prep for multithreadingJakub Konka
2024-07-20dev: add missing x86_64 backend checksJacob Young
2024-07-18macho: fix 32bit compilation issuesJakub Konka
2024-07-18macho: fix unresolved symbols error reportingJakub Konka
2024-07-18macho: pretty print relocation types in logs and errorsJakub Konka
2024-07-18macho: emit relocs for non-zig-sections in ZigObjectJakub Konka
2024-07-18macho: re-enable relocatable modeJakub Konka
2024-07-18macho: fix compile errorsJakub Konka
2024-07-18macho: update ZigObject to use new ownership modelJakub Konka
2024-07-18macho: migrate Atom and SymbolJakub Konka
2024-07-18macho: revamp how we compute dyld relocsJakub Konka
2024-07-18macho: move unwind info records ownership to ObjectsJakub Konka
2024-05-23link/macho: print error message when hitting unexpected remainder errorJakub Konka
2024-05-23link/macho: apply fixes to deduping logicJakub Konka
* test non-ObjC literal deduping logic
2024-05-23link/macho: dedup literals in objects and internal object fileJakub Konka
2024-04-22link/macho: introduce Atom extras for out-of-band dataJakub Konka
2024-04-20link/elf: implement string mergingJakub Konka
2024-03-08link: refactor common aarch64 helpersJakub Konka
2024-02-26macho: fix section to segment mappingJakub Konka
2024-02-21link: introduce common set of aarch64 abstractionsJakub Konka
2024-02-06macho: store open file descriptors in a global arrayJakub Konka
2024-02-03macho: refactor section/segment handle tracking logicJakub Konka
2024-02-03macho: migrate thunks to use new relative addressing mechanismJakub Konka