authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-20 20:08:28-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-25 18:54:36-07:00
log4cbc03dce31b63818da1fb47f959b70708683443
tree574bac749feeb3fc2ddb1a75f7f99b86390ec766
parentdf92898ec3f805112150ee4b40e0d02b763524bb

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


2 files changed, 0 insertions(+), 20 deletions(-)

lib/compiler/Maker.zig-6
...@@ -427,7 +427,6 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -427,7 +427,6 @@ pub fn main(init: process.Init.Minimal) !void {
427 };427 };
428 const c = &configuration;428 const c = &configuration;
429 var top_level_steps: std.StringArrayHashMapUnmanaged(Configuration.Step.Index) = .empty;429 var top_level_steps: std.StringArrayHashMapUnmanaged(Configuration.Step.Index) = .empty;
430 var modules: std.AutoArrayHashMapUnmanaged(Configuration.Module.Index, void) = .empty;
431 for (configuration.steps, 0..) |*conf_step, step_index_usize| {430 for (configuration.steps, 0..) |*conf_step, step_index_usize| {
432 if (conf_step.owner != .root) continue;431 if (conf_step.owner != .root) continue;
433 const step_index: Configuration.Step.Index = @enumFromInt(step_index_usize);432 const step_index: Configuration.Step.Index = @enumFromInt(step_index_usize);
...@@ -437,10 +436,6 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -437,10 +436,6 @@ pub fn main(init: process.Init.Minimal) !void {
437 const name = step_index.ptr(c).name.slice(c);436 const name = step_index.ptr(c).name.slice(c);
438 try top_level_steps.put(arena, name, step_index);437 try top_level_steps.put(arena, name, step_index);
439 },438 },
440 .compile => {
441 const root_module = step_index.ptr(c).extended.get(configuration.extra).compile.root_module;
442 try modules.put(arena, root_module, {});
443 },
444 else => {},439 else => {},
445 }440 }
446 }441 }
...@@ -450,7 +445,6 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -450,7 +445,6 @@ pub fn main(init: process.Init.Minimal) !void {
450 break :sc .{445 break :sc .{
451 .configuration = configuration,446 .configuration = configuration,
452 .top_level_steps = top_level_steps,447 .top_level_steps = top_level_steps,
453 .modules = modules,
454 };448 };
455 };449 };
456450
lib/compiler/Maker/ScannedConfig.zig-14
...@@ -9,7 +9,6 @@ const Graph = @import("Graph.zig");...@@ -9,7 +9,6 @@ const Graph = @import("Graph.zig");
99
10configuration: Configuration,10configuration: Configuration,
11top_level_steps: std.StringArrayHashMapUnmanaged(Configuration.Step.Index),11top_level_steps: std.StringArrayHashMapUnmanaged(Configuration.Step.Index),
12modules: std.AutoArrayHashMapUnmanaged(Configuration.Module.Index, void),
1312
14pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void {13pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void {
15 std.log.err("TODO also print paths", .{});14 std.log.err("TODO also print paths", .{});
...@@ -45,19 +44,6 @@ pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void {...@@ -45,19 +44,6 @@ pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void {
45 try tf.end();44 try tf.end();
46 }45 }
4746
48 {
49 var sf = try s.beginStructField("modules", .{});
50
51 for (sc.modules.keys()) |module_index| {
52 var int_buf: [50]u8 = undefined;
53 const int_str = std.fmt.bufPrint(&int_buf, "{d}", .{module_index}) catch unreachable;
54 var step_field = try sf.beginStructField(int_str, .{});
55 try printStruct(sc, &step_field, Configuration.Module, module_index.get(c));
56 try step_field.end();
57 }
58 try sf.end();
59 }
60
61 try s.end();47 try s.end();
62}48}
6349