Skip to content

Commit

Permalink
Moves zon lowering into own file
Browse files Browse the repository at this point in the history
  • Loading branch information
MasonRemaley committed Jun 26, 2024
1 parent f291253 commit ce32047
Show file tree
Hide file tree
Showing 3 changed files with 567 additions and 563 deletions.
4 changes: 3 additions & 1 deletion src/Sema.zig
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ const Compilation = @import("Compilation.zig");
const InternPool = @import("InternPool.zig");
const Alignment = InternPool.Alignment;
const ComptimeAllocIndex = InternPool.ComptimeAllocIndex;
const zon = @import("zon.zig");

pub const default_branch_quota = 1000;
pub const default_reference_trace_len = 2;
Expand Down Expand Up @@ -13931,7 +13932,8 @@ fn zirImport(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.
// retry this and not cache the file system error, which may be transient.
return sema.fail(block, operand_src, "unable to open '{s}': {s}", .{ result.file.sub_file_path, @errorName(err) });
};
return try mod.semaZon(result.file);
const interned = try zon.lower(mod, result.file);
return Air.internedToRef(interned);
},
}
}
Expand Down
Loading

0 comments on commit ce32047

Please sign in to comment.