aboutsummaryrefslogtreecommitdiff
path: root/src/Type.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2025-05-24 22:25:17 +0100
committermlugg <mlugg@mlugg.co.uk>2025-05-25 04:43:43 +0100
commitaeed5f9ebd02b376411f3ee82dd3222f9c3b6e85 (patch)
tree94dbee0a2039f286612c069b965f0875783121ba /src/Type.zig
parent35ba8d95a1afd0bebba3c32cf68990f5129fabfe (diff)
downloadzig-aeed5f9ebd02b376411f3ee82dd3222f9c3b6e85.tar.gz
zig-aeed5f9ebd02b376411f3ee82dd3222f9c3b6e85.zip
compiler: introduce incremental debug server
In a compiler built with debug extensions, pass `--debug-incremental` to spawn the "incremental debug server". This is a TCP server exposing a REPL which allows querying a bunch of compiler state, some of which is stored only when that flag is passed. Eventually, this will probably move into `std.zig.Server`/`std.zig.Client`, but this is easier to work with right now. The easiest way to interact with the server is `telnet`.
Diffstat (limited to 'src/Type.zig')
-rw-r--r--src/Type.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Type.zig b/src/Type.zig
index ba64fb633a..b2a4b228d9 100644
--- a/src/Type.zig
+++ b/src/Type.zig
@@ -3797,6 +3797,11 @@ fn resolveStructInner(
return error.AnalysisFail;
}
+ if (zcu.comp.debugIncremental()) {
+ const info = try zcu.incremental_debug_state.getUnitInfo(gpa, owner);
+ info.last_update_gen = zcu.generation;
+ }
+
var analysis_arena = std.heap.ArenaAllocator.init(gpa);
defer analysis_arena.deinit();
@@ -3851,6 +3856,11 @@ fn resolveUnionInner(
return error.AnalysisFail;
}
+ if (zcu.comp.debugIncremental()) {
+ const info = try zcu.incremental_debug_state.getUnitInfo(gpa, owner);
+ info.last_update_gen = zcu.generation;
+ }
+
var analysis_arena = std.heap.ArenaAllocator.init(gpa);
defer analysis_arena.deinit();