From 0c71d2fdc1cfa251b1c45a93724240a052c77a92 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 28 Apr 2021 22:43:26 -0700 Subject: stage2: implement semantic analysis for functions and global vars * AstGen: add missing `break_inline` for comptime blocks. * Module: call getTree() in byteOffset(). This generates the AST when using cached ZIR and compile errors need to be reported. * Scope.File: distinguish between successful ZIR generation and AIR generation (when Decls in scope have been scanned). - `semaFile` correctly avoids doing work twice. * Implement first pass at `lookupInNamespace`. It has various TODOs left, such as `usingnamespace`, and setting up Decl dependencies. --- src/codegen.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen.zig') diff --git a/src/codegen.zig b/src/codegen.zig index ad401066ef..2ee57a998d 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -2313,7 +2313,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { } fn genDbgStmt(self: *Self, inst: *ir.Inst.DbgStmt) !MCValue { - // TODO when reworking tzir memory layout, rework source locations here as + // TODO when reworking AIR memory layout, rework source locations here as // well to be more efficient, as well as support inlined function calls correctly. // For now we convert LazySrcLoc to absolute byte offset, to match what the // existing codegen code expects. -- cgit v1.2.3