authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-06-21 13:27:52-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-06-21 17:03:04-07:00
logfee5aad699232d4feeece72f345d09d67faf1494
tree71f9c4a28b7ec44d954665b3c55f73995aed7c10
parentf203334878d854c17c00c0447c748d9ea5e491e5

stage2: remove unused parameter from importPkg


3 files changed, 5 insertions(+), 6 deletions(-)

src/Compilation.zig+1-1
......@@ -1639,7 +1639,7 @@ pub fn update(self: *Compilation) !void {
16391639 // Make sure std.zig is inside the import_table. We unconditionally need
16401640 // it for start.zig.
16411641 const std_pkg = module.root_pkg.table.get("std").?;
1642 _ = try module.importPkg(module.root_pkg, std_pkg);
1642 _ = try module.importPkg(std_pkg);
16431643
16441644 // Put a work item in for every known source file to detect if
16451645 // it changed, and, if so, re-compute ZIR and then queue the job
src/Module.zig+3-4
......@@ -2831,7 +2831,7 @@ pub fn ensureDeclAnalyzed(mod: *Module, decl: *Decl) InnerError!void {
28312831}
28322832
28332833pub fn semaPkg(mod: *Module, pkg: *Package) !void {
2834 const file = (try mod.importPkg(mod.root_pkg, pkg)).file;
2834 const file = (try mod.importPkg(pkg)).file;
28352835 return mod.semaFile(file);
28362836}
28372837
......@@ -3130,8 +3130,7 @@ pub const ImportFileResult = struct {
31303130 is_new: bool,
31313131};
31323132
3133pub fn importPkg(mod: *Module, cur_pkg: *Package, pkg: *Package) !ImportFileResult {
3134 _ = cur_pkg;
3133pub fn importPkg(mod: *Module, pkg: *Package) !ImportFileResult {
31353134 const gpa = mod.gpa;
31363135
31373136 // The resolved path is used as the key in the import table, to detect if
......@@ -3184,7 +3183,7 @@ pub fn importFile(
31843183 import_string: []const u8,
31853184) !ImportFileResult {
31863185 if (cur_file.pkg.table.get(import_string)) |pkg| {
3187 return mod.importPkg(cur_file.pkg, pkg);
3186 return mod.importPkg(pkg);
31883187 }
31893188 const gpa = mod.gpa;
31903189
src/Sema.zig+1-1
......@@ -7556,7 +7556,7 @@ fn getBuiltinType(
75567556) InnerError!Type {
75577557 const mod = sema.mod;
75587558 const std_pkg = mod.root_pkg.table.get("std").?;
7559 const std_file = (mod.importPkg(mod.root_pkg, std_pkg) catch unreachable).file;
7559 const std_file = (mod.importPkg(std_pkg) catch unreachable).file;
75607560 const opt_builtin_inst = try sema.analyzeNamespaceLookup(
75617561 block,
75627562 src,