diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2024-08-06 11:22:37 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-08-16 15:22:55 -0400 |
| commit | ef11bc9899002620d67cfce9c79b6c0dc0f5ea61 (patch) | |
| tree | 7b05fe17340c06e4c40c45ebe249361c0c281c72 /src/Compilation.zig | |
| parent | 90989be0e31a91335f8d1c1eafb84c3b34792a8c (diff) | |
| download | zig-ef11bc9899002620d67cfce9c79b6c0dc0f5ea61.tar.gz zig-ef11bc9899002620d67cfce9c79b6c0dc0f5ea61.zip | |
Dwarf: rework self-hosted debug info from scratch
This is in preparation for incremental and actually being able to debug
executables built by the x86_64 backend.
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 8fcba25baf..1c469a95c7 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -363,6 +363,7 @@ const Job = union(enum) { /// It must be deinited when the job is processed. air: Air, }, + codegen_type: InternPool.Index, /// The `Cau` must be semantically analyzed (and possibly export itself). /// This may be its first time being analyzed, or it may be outdated. analyze_cau: InternPool.Cau.Index, @@ -423,6 +424,7 @@ const CodegenJob = union(enum) { /// It must be deinited when the job is processed. air: Air, }, + type: InternPool.Index, }; pub const CObject = struct { @@ -3712,6 +3714,7 @@ fn processOneJob(tid: usize, comp: *Compilation, job: Job, prog_node: std.Progre .air = func.air, } }); }, + .codegen_type => |ty| try comp.queueCodegenJob(tid, .{ .type = ty }), .analyze_func => |func| { const named_frame = tracy.namedFrame("analyze_func"); defer named_frame.end(); @@ -4001,6 +4004,13 @@ fn processOneCodegenJob(tid: usize, comp: *Compilation, codegen_job: CodegenJob) // This call takes ownership of `func.air`. try pt.linkerUpdateFunc(func.func, func.air); }, + .type => |ty| { + const named_frame = tracy.namedFrame("codegen_type"); + defer named_frame.end(); + + const pt: Zcu.PerThread = .{ .zcu = comp.module.?, .tid = @enumFromInt(tid) }; + try pt.linkerUpdateContainerType(ty); + }, } } |
