aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-01-15fix bad archive name calculationAndrew Kelley
2025-01-15wasm linker: fix table imports in objectsAndrew Kelley
they need to reference a local index until the object parsing is complete and also need to check reftype matching
2025-01-15can't use source location until return from this functionAndrew Kelley
2025-01-15wasm linker: fix global imports in objectsAndrew Kelley
they need to reference a local index until the object parsing is complete and also need to check mutability and type matching
2025-01-15resolve merge conflictsAndrew Kelley
with 497592c9b45a94fb7b6028bf45b80f183e395a9b
2025-01-15fix missing missing entry symbol error when no zcuAndrew Kelley
2025-01-15wasm linker: fix crashes when parsing compiler_rtAndrew Kelley
2025-01-15wasm linker: fix relocation parsingAndrew Kelley
2025-01-15Compilation: account for C objects and resources in prelinkAndrew Kelley
2025-01-15wasm linker: fix active data segment offset valueAndrew Kelley
2025-01-15wasm linker: fix missing function type entry for importAndrew Kelley
2025-01-15use fixed writer in more placesAndrew Kelley
2025-01-15fix stack pointer initialized to wrong vaddrAndrew Kelley
2025-01-15wasm linker: implement indirect function callsAndrew Kelley
2025-01-15wasm linker: implement stack pointer globalAndrew Kelley
2025-01-15implement the prelink phase in the frontendAndrew Kelley
this strategy uses a "postponed" queue to handle codegen tasks that spawn too early. there's probably a better way.
2025-01-15wasm linker: fix data section in flushAndrew Kelley
2025-01-15implement error table and error names data segmentsAndrew Kelley
2025-01-15wasm linker: zcu data fixups are already appliedAndrew Kelley
2025-01-15wasm linker: initialize the data segments table in flushAndrew Kelley
it cannot be done earlier since ids are not stable yet
2025-01-15wasm linker: also call lowerZcuData in updateFuncAndrew Kelley
codegen can generate zcu data dependencies that need to be populated
2025-01-15wasm linker: avoid recursion in lowerZcuDataAndrew Kelley
instead of recursion, callers of the function are responsible for checking the respective tables that might have new entries in them and then calling lowerZcuData again.
2025-01-15wasm linker: implement data fixupsAndrew Kelley
one hash table lookup per fixup
2025-01-15wasm linker: fix eliding empty data segmentsAndrew Kelley
2025-01-15wasm codegen: fix call_indirectAndrew Kelley
2025-01-15wasm linker: allow undefined imports when lib name is providedAndrew Kelley
and expose object_host_name as an option for setting the lib name for object files, since the wasm linking standards don't specify a way to do it.
2025-01-15wasm linker: handle extern functions in updateNavAndrew Kelley
2025-01-15wasm linker: fix data segments memory flowAndrew Kelley
Recognize three distinct phases: * before prelink ("object phase") * after prelink, before flush ("zcu phase") * during flush ("flush phase") With this setup, we create data structures during the object phase, then mutate them during the zcu phase, and then further mutate them during the flush phase. In order to make the flush phase repeatable, the data structures are copied just before starting the flush phase. Further Zcu updates occur against the non-copied data structures. What's not implemented is frontend garbage collection, in which case some more changes will be needed in this linker logic to achieve a valid state with data invariants intact.
2025-01-15wasm linker: fix calling imported functionsAndrew Kelley
and more disciplined type safety for output function indexes
2025-01-15wasm codegen: fix extra index not relativeAndrew Kelley
2025-01-15wasm linker: add __zig_error_name_table data when neededAndrew Kelley
2025-01-15add safety for calling functions that get virtual addrsAndrew Kelley
2025-01-15wasm codegen: fix wrong union field for localsAndrew Kelley
2025-01-15fix calculation of nav alignmentAndrew Kelley
2025-01-15complete wasm.Emit implementationAndrew Kelley
2025-01-15wasm linker: implement missing logicAndrew Kelley
fix some compilation errors for reworked Emit now that it's actually referenced introduce DataSegment.Id for sorting data both from object files and from the Zcu. introduce optimization: data segment sorting includes a descending sort on reference count so that references to data can be smaller integers leading to better LEB encodings. this optimization is skipped for object files. implement uav address access function which is based on only 1 hash table lookup to find out the offset after sorting.
2025-01-15wasm linker: implement type index methodAndrew Kelley
2025-01-15fix replaceVecSectionHeaderAndrew Kelley
2025-01-15wasm linker: implement name subsectionAndrew Kelley
unlike the previous implementation, we can simply iterate an array.
2025-01-15wasm linker fixesAndrew Kelley
* function resolution now links to zcu_funcs, not navs_exe/navs_obj * updateFunc now adds things to output functions * updateNav now handles function aliases correctly * only report start symbol missing when it is unresolved
2025-01-15wasm codegen: remove dependency on PerThread where possibleAndrew Kelley
2025-01-15wasm codegen: fix lowering of 32/64 float rt callsAndrew Kelley
2025-01-15remove bad deinitAndrew Kelley
2025-01-15add dev env for wasmAndrew Kelley
with this I get 5s compilations
2025-01-15fix compilation when enabling llvmAndrew Kelley
2025-01-15wasm linker: finish the flush functionAndrew Kelley
This branch is passing type checking now.
2025-01-15wasm linker: flush export sectionAndrew Kelley
2025-01-15wasm linker: flush implemented up to the export sectionAndrew Kelley
2025-01-15wasm linker: implement name, module name, and type for function importsAndrew Kelley
2025-01-15frontend: add const to more Zcu pointersAndrew Kelley