| ... | @@ -71,8 +71,8 @@ preallocated_new_func: ?*Module.Fn = null, | ... | @@ -71,8 +71,8 @@ preallocated_new_func: ?*Module.Fn = null, |
| 71 | /// TODO: after upgrading to use InternPool change the key here to be an | 71 | /// TODO: after upgrading to use InternPool change the key here to be an |
| 72 | /// InternPool value index. | 72 | /// InternPool value index. |
| 73 | types_to_resolve: std.ArrayListUnmanaged(Air.Inst.Ref) = .{}, | 73 | types_to_resolve: std.ArrayListUnmanaged(Air.Inst.Ref) = .{}, |
| 74 | /// These are lazily created runtime blocks from inline_block instructions. | 74 | /// These are lazily created runtime blocks from block_inline instructions. |
| 75 | /// They are created when an inline_break passes through a runtime condition, because | 75 | /// They are created when an break_inline passes through a runtime condition, because |
| 76 | /// Sema must convert comptime control flow to runtime control flow, which means | 76 | /// Sema must convert comptime control flow to runtime control flow, which means |
| 77 | /// breaking from a block. | 77 | /// breaking from a block. |
| 78 | post_hoc_blocks: std.AutoHashMapUnmanaged(Air.Inst.Index, *LabeledBlock) = .{}, | 78 | post_hoc_blocks: std.AutoHashMapUnmanaged(Air.Inst.Index, *LabeledBlock) = .{}, |
| ... | @@ -147,7 +147,7 @@ pub const Block = struct { | ... | @@ -147,7 +147,7 @@ pub const Block = struct { |
| 147 | /// for the one that will be the same for all Block instances. | 147 | /// for the one that will be the same for all Block instances. |
| 148 | src_decl: Decl.Index, | 148 | src_decl: Decl.Index, |
| 149 | /// Non zero if a non-inline loop or a runtime conditional have been encountered. | 149 | /// Non zero if a non-inline loop or a runtime conditional have been encountered. |
| 150 | /// Stores to to comptime variables are only allowed when var.runtime_index <= runtime_index. | 150 | /// Stores to comptime variables are only allowed when var.runtime_index <= runtime_index. |
| 151 | runtime_index: Value.RuntimeIndex = .zero, | 151 | runtime_index: Value.RuntimeIndex = .zero, |
| 152 | inline_block: Zir.Inst.Index = 0, | 152 | inline_block: Zir.Inst.Index = 0, |
| 153 | | 153 | |
| ... | @@ -1391,9 +1391,8 @@ fn analyzeBodyInner( | ... | @@ -1391,9 +1391,8 @@ fn analyzeBodyInner( |
| 1391 | // If this block contains a function prototype, we need to reset the | 1391 | // If this block contains a function prototype, we need to reset the |
| 1392 | // current list of parameters and restore it later. | 1392 | // current list of parameters and restore it later. |
| 1393 | // Note: this probably needs to be resolved in a more general manner. | 1393 | // Note: this probably needs to be resolved in a more general manner. |
| 1394 | if (tags[inline_body[inline_body.len - 1]] == .repeat_inline) { | 1394 | child_block.inline_block = |
| 1395 | child_block.inline_block = inline_body[0]; | 1395 | if (tags[inline_body[inline_body.len - 1]] == .repeat_inline) inline_body[0] else inst; |
| 1396 | } else child_block.inline_block = block.inline_block; | | |
| 1397 | | 1396 | |
| 1398 | var label: Block.Label = .{ | 1397 | var label: Block.Label = .{ |
| 1399 | .zir_block = inst, | 1398 | .zir_block = inst, |