From 40aad4f47e1ab02a1ff6109f4b6f06af00d1f503 Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Sat, 26 Dec 2020 02:17:36 +0200 Subject: stage2: break and continue out of loops --- src/Module.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Module.zig') diff --git a/src/Module.zig b/src/Module.zig index 20cb7bf195..3806c0dea8 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -796,6 +796,10 @@ pub const Scope = struct { /// The first N instructions in a function body ZIR are arg instructions. instructions: std.ArrayListUnmanaged(*zir.Inst) = .{}, label: ?Label = null, + break_block: ?*zir.Inst.Block = null, + continue_block: ?*zir.Inst.Block = null, + /// only valid if label != null or (continue_block and break_block) != null + break_result_loc: astgen.ResultLoc = undefined, pub const Label = struct { token: ast.TokenIndex, -- cgit v1.2.3