aboutsummaryrefslogtreecommitdiff
path: root/src/link/Dwarf.zig
AgeCommit message (Collapse)Author
2023-06-10compiler: move error union types and error set types to InternPoolAndrew Kelley
One change worth noting in this commit is that `module.global_error_set` is no longer kept strictly up-to-date. The previous code reserved integer error values when dealing with error set types, but this is no longer needed because the integer values are not needed for semantic analysis unless `@errorToInt` or `@intToError` are used and therefore may be assigned lazily.
2023-06-10compiler: eliminate legacy Type.Tag.pointerAndrew Kelley
Now pointer types are stored only in InternPool.
2023-06-10stage2: move function types to InternPoolAndrew Kelley
2023-06-10stage2: move anon tuples and anon structs to InternPoolAndrew Kelley
2023-06-10stage2: move enum types into the InternPoolAndrew Kelley
Unlike unions and structs, enums are actually *encoded* into the InternPool directly, rather than using the SegmentedList trick. This results in them being quite compact, and greatly improved the ergonomics of using enum types throughout the compiler. It did however require introducing a new concept to the InternPool which is an "incomplete" item - something that is added to gain a permanent Index, but which is then mutated in place. This was necessary because enum tag values and tag types may reference the namespaces created by the enum itself, which required constructing the namespace, decl, and calling analyzeDecl on the decl, which required the decl value, which required the enum type, which required an InternPool index to be assigned and for it to be meaningful. The API for updating enums in place turned out to be quite slick and efficient - the methods directly populate pre-allocated arrays and return the information necessary to output the same compilation errors as before.
2023-06-10stage2: move union types and values to InternPoolAndrew Kelley
2023-06-10stage2: move struct types and aggregate values to InternPoolAndrew Kelley
2023-06-10stage2: move opaque types to InternPoolAndrew Kelley
2023-06-10stage2: move integer values to InternPoolAndrew Kelley
2023-06-10InternPool: add a slice encodingAndrew Kelley
This uses the data field to reference its pointer field type, which allows for efficient and infallible access of a slice type's pointer type.
2023-06-10stage2: move many Type encodings to InternPoolAndrew Kelley
Notably, `vector`. Additionally, all alternate encodings of `pointer`, `optional`, and `array`.
2023-06-10Type.isSlice: make it InternPool awareAndrew Kelley
2023-06-10stage2: start the InternPool transitionAndrew Kelley
Instead of doing everything at once which is a hopelessly large task, this introduces a piecemeal transition that can be done in small increments at a time. This is a minimal changeset that keeps the compiler compiling. It only uses the InternPool for a small set of types. Behavior tests are not passing. Air.Inst.Ref and Zir.Inst.Ref are separated into different enums but compile-time verified to have the same fields in the same order. The large set of changes is mainly to deal with the fact that most Type and Value methods now require a Module to be passed in, so that the InternPool object can be accessed.
2023-05-26std.Target adjustmentsVeikka Tuominen
* move `ptrBitWidth` from Arch to Target since it needs to know about the abi * double isn't always 8 bits * AVR uses 1-byte alignment for everything in GCC
2023-05-15x86_64: reimplement `@floatToInt`Jacob Young
2023-05-15Dwarf: fix overflow write byte_sizeJacob Young
2023-05-08Dwarf: workaround crashJacob Young
2023-04-28compiler: use `@memcpy` instead of `std.mem.copy`Andrew Kelley
2023-04-28update codebase to use `@memset` and `@memcpy`Andrew Kelley
2023-04-13macho: fix incorrect DWARF subprogram generationJakub Konka
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2023-02-01link: make Wasm atoms fully owned by the linkerLuuk de Gram
2023-02-01link: decouple DI atoms from linker atoms, and manage them in Dwarf linkerJakub Konka
2023-02-01link: use strtab.StringTable in DwarfJakub Konka
2023-01-31link: make Elf atoms fully owned by the linkerJakub Konka
2023-01-31link: make MachO atoms fully owned by the linkerJakub Konka
2022-12-27update uses of overflow arithmetic builtinsVeikka Tuominen
2022-12-09dwarf: resolve all relative paths when generating include_dirs and ↵Jakub Konka
file_names lists
2022-12-09wasm: implement moving debug_line program when header too bigJakub Konka
2022-12-09dsym: hint linker when file range copy is not necessaryJakub Konka
2022-12-09elf: hint linker when file range copy is not necessaryJakub Konka
2022-12-09elf: add growAllocSection and growNonAllocSectionJakub Konka
Update `Dwarf.zig` to use `growNonAllocSection` for ELF and implement routine to make space for `.debug_line` header.
2022-12-09dsym: reuse growSection where possibleJakub Konka
2022-12-09dwarf: move any remaining section growth to dsymJakub Konka
2022-12-09dwarf: move growing debug_aranges section to dsymJakub Konka
2022-12-09dwarf: move growing debug_abbrev section to dsymJakub Konka
2022-12-09dwarf: move another sect growing routine to d_symJakub Konka
2022-12-09macho: add helper for getting ptr to DebugSymbolsJakub Konka
2022-12-09dwarf+d_sym: move logic for growing section to d_symJakub Konka
2022-12-09dwarf: move SrcFns if debug_line header exceeded its paddingJakub Konka
2022-12-09dwarf: refactor object file format and ptr width switches in writeDbgLineHeaderJakub Konka
2022-12-09dwarf: fix incorrect calc of dir indexJakub Konka
2022-12-09dwarf: refactor routine for precalculating size of dbg line headerJakub Konka
2022-12-09dwarf: generate list of include dirs and file names like LLVM backendJakub Konka
2022-12-09dwarf: fully resolve each path to each file sourceJakub Konka
2022-12-09dwarf: track source files via *const Module.File pointersJakub Konka
2022-12-09dwarf: specify all referenced zig source filesJakub Konka
2022-12-05dwarf: pull out debug line program internals into DeclState helpersJakub Konka
2022-12-05dwarf: reuse getDbgInfoAtom helper in all of Dwarf.zigJakub Konka
We need to access it outside of `DeclState` too so why not reuse the helper anyway.
2022-12-04dsym: recalculate DWARF segment size when finalizingJakub Konka