| author | |
| committer | |
| log | fee5aad699232d4feeece72f345d09d67faf1494 |
| tree | 71f9c4a28b7ec44d954665b3c55f73995aed7c10 |
| parent | f203334878d854c17c00c0447c748d9ea5e491e5 |
3 files changed, 5 insertions(+), 6 deletions(-)
src/Compilation.zig+1-1| ... | ... | @@ -1639,7 +1639,7 @@ pub fn update(self: *Compilation) !void { |
| 1639 | 1639 | // Make sure std.zig is inside the import_table. We unconditionally need |
| 1640 | 1640 | // it for start.zig. |
| 1641 | 1641 | const std_pkg = module.root_pkg.table.get("std").?; |
| 1642 | _ = try module.importPkg(module.root_pkg, std_pkg); | |
| 1642 | _ = try module.importPkg(std_pkg); | |
| 1643 | 1643 | |
| 1644 | 1644 | // Put a work item in for every known source file to detect if |
| 1645 | 1645 | // 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 { |
| 2831 | 2831 | } |
| 2832 | 2832 | |
| 2833 | 2833 | pub 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; | |
| 2835 | 2835 | return mod.semaFile(file); |
| 2836 | 2836 | } |
| 2837 | 2837 | |
| ... | ... | @@ -3130,8 +3130,7 @@ pub const ImportFileResult = struct { |
| 3130 | 3130 | is_new: bool, |
| 3131 | 3131 | }; |
| 3132 | 3132 | |
| 3133 | pub fn importPkg(mod: *Module, cur_pkg: *Package, pkg: *Package) !ImportFileResult { | |
| 3134 | _ = cur_pkg; | |
| 3133 | pub fn importPkg(mod: *Module, pkg: *Package) !ImportFileResult { | |
| 3135 | 3134 | const gpa = mod.gpa; |
| 3136 | 3135 | |
| 3137 | 3136 | // The resolved path is used as the key in the import table, to detect if |
| ... | ... | @@ -3184,7 +3183,7 @@ pub fn importFile( |
| 3184 | 3183 | import_string: []const u8, |
| 3185 | 3184 | ) !ImportFileResult { |
| 3186 | 3185 | if (cur_file.pkg.table.get(import_string)) |pkg| { |
| 3187 | return mod.importPkg(cur_file.pkg, pkg); | |
| 3186 | return mod.importPkg(pkg); | |
| 3188 | 3187 | } |
| 3189 | 3188 | const gpa = mod.gpa; |
| 3190 | 3189 |
src/Sema.zig+1-1| ... | ... | @@ -7556,7 +7556,7 @@ fn getBuiltinType( |
| 7556 | 7556 | ) InnerError!Type { |
| 7557 | 7557 | const mod = sema.mod; |
| 7558 | 7558 | 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; | |
| 7560 | 7560 | const opt_builtin_inst = try sema.analyzeNamespaceLookup( |
| 7561 | 7561 | block, |
| 7562 | 7562 | src, |