diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-03-18 12:31:22 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-03-19 11:20:38 +0200 |
| commit | a8520fbd0f73c57d133c28c44d97e1173c6fe381 (patch) | |
| tree | 6b5480c45c1bf1317fe7a3d82a1da046835cac38 /src/AstGen.zig | |
| parent | ad5770eba40e0cc425c7a1eab4d37c6f9788d670 (diff) | |
| download | zig-a8520fbd0f73c57d133c28c44d97e1173c6fe381.tar.gz zig-a8520fbd0f73c57d133c28c44d97e1173c6fe381.zip | |
stage2: add dbg_block_{begin,end} instruction
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index 742f13214c..ff11cb451c 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -2052,6 +2052,12 @@ fn blockExprStmts(gz: *GenZir, parent_scope: *Scope, statements: []const Ast.Nod const tree = astgen.tree; const node_tags = tree.nodes.items(.tag); + _ = try gz.add(.{ .tag = .extended, .data = .{ .extended = .{ + .opcode = .dbg_block_begin, + .small = undefined, + .operand = undefined + } } }); + var block_arena = std.heap.ArenaAllocator.init(gz.astgen.gpa); defer block_arena.deinit(); const block_arena_allocator = block_arena.allocator(); @@ -2105,6 +2111,12 @@ fn blockExprStmts(gz: *GenZir, parent_scope: *Scope, statements: []const Ast.Nod } } + _ = try gz.add(.{ .tag = .extended, .data = .{ .extended = .{ + .opcode = .dbg_block_end, + .small = undefined, + .operand = undefined + } } }); + try genDefers(gz, parent_scope, scope, .normal_only); try checkUsed(gz, parent_scope, scope); } |
