zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 4cbc03dce31b63818da1fb47f959b70708683443 (tree)
parent df92898ec3f805112150ee4b40e0d02b763524bb
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Wed, 20 May 2026 20:08:28 -0700

Maker: we don't actually need to scan the modules

Diffstat:
Mlib/compiler/Maker.zig | 6------
Mlib/compiler/Maker/ScannedConfig.zig | 14--------------
2 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/lib/compiler/Maker.zig b/lib/compiler/Maker.zig @@ -427,7 +427,6 @@ pub fn main(init: process.Init.Minimal) !void { }; const c = &configuration; var top_level_steps: std.StringArrayHashMapUnmanaged(Configuration.Step.Index) = .empty; - var modules: std.AutoArrayHashMapUnmanaged(Configuration.Module.Index, void) = .empty; for (configuration.steps, 0..) |*conf_step, step_index_usize| { if (conf_step.owner != .root) continue; const step_index: Configuration.Step.Index = @enumFromInt(step_index_usize); @@ -437,10 +436,6 @@ pub fn main(init: process.Init.Minimal) !void { const name = step_index.ptr(c).name.slice(c); try top_level_steps.put(arena, name, step_index); }, - .compile => { - const root_module = step_index.ptr(c).extended.get(configuration.extra).compile.root_module; - try modules.put(arena, root_module, {}); - }, else => {}, } } @@ -450,7 +445,6 @@ pub fn main(init: process.Init.Minimal) !void { break :sc .{ .configuration = configuration, .top_level_steps = top_level_steps, - .modules = modules, }; }; diff --git a/lib/compiler/Maker/ScannedConfig.zig b/lib/compiler/Maker/ScannedConfig.zig @@ -9,7 +9,6 @@ const Graph = @import("Graph.zig"); configuration: Configuration, top_level_steps: std.StringArrayHashMapUnmanaged(Configuration.Step.Index), -modules: std.AutoArrayHashMapUnmanaged(Configuration.Module.Index, void), pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void { std.log.err("TODO also print paths", .{}); @@ -45,19 +44,6 @@ pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void { try tf.end(); } - { - var sf = try s.beginStructField("modules", .{}); - - for (sc.modules.keys()) |module_index| { - var int_buf: [50]u8 = undefined; - const int_str = std.fmt.bufPrint(&int_buf, "{d}", .{module_index}) catch unreachable; - var step_field = try sf.beginStructField(int_str, .{}); - try printStruct(sc, &step_field, Configuration.Module, module_index.get(c)); - try step_field.end(); - } - try sf.end(); - } - try s.end(); }