| ... | @@ -4783,11 +4783,9 @@ fn validateStructInit( | ... | @@ -4783,11 +4783,9 @@ fn validateStructInit( |
| 4783 | | 4783 | |
| 4784 | const field_ptr_ref = sema.inst_map.get(field_ptr).?; | 4784 | const field_ptr_ref = sema.inst_map.get(field_ptr).?; |
| 4785 | | 4785 | |
| 4786 | //std.debug.print("validateStructInit (field_ptr_air_inst=%{d}):\n", .{ | 4786 | //std.debug.print("validateStructInit (field_ptr_ref=%{d}):\n", .{field_ptr_ref}); |
| 4787 | // field_ptr_air_inst, | | |
| 4788 | //}); | | |
| 4789 | //for (block.instructions.items) |item| { | 4787 | //for (block.instructions.items) |item| { |
| 4790 | // std.debug.print(" %{d} = {s}\n", .{item, @tagName(air_tags[item])}); | 4788 | // std.debug.print(" %{d} = {s}\n", .{item, @tagName(air_tags[@intFromEnum(item)])}); |
| 4791 | //} | 4789 | //} |
| 4792 | | 4790 | |
| 4793 | // We expect to see something like this in the current block AIR: | 4791 | // We expect to see something like this in the current block AIR: |
| ... | @@ -4804,8 +4802,9 @@ fn validateStructInit( | ... | @@ -4804,8 +4802,9 @@ fn validateStructInit( |
| 4804 | | 4802 | |
| 4805 | // Possible performance enhancement: save the `block_index` between iterations | 4803 | // Possible performance enhancement: save the `block_index` between iterations |
| 4806 | // of the for loop. | 4804 | // of the for loop. |
| 4807 | var block_index = block.instructions.items.len -| 1; | 4805 | var block_index = block.instructions.items.len; |
| 4808 | while (block_index > 0) : (block_index -= 1) { | 4806 | while (block_index > 0) { |
| | 4807 | block_index -= 1; |
| 4809 | const store_inst = block.instructions.items[block_index]; | 4808 | const store_inst = block.instructions.items[block_index]; |
| 4810 | if (store_inst.toRef() == field_ptr_ref) { | 4809 | if (store_inst.toRef() == field_ptr_ref) { |
| 4811 | struct_is_comptime = false; | 4810 | struct_is_comptime = false; |
| ... | @@ -5060,8 +5059,9 @@ fn zirValidatePtrArrayInit( | ... | @@ -5060,8 +5059,9 @@ fn zirValidatePtrArrayInit( |
| 5060 | | 5059 | |
| 5061 | // Possible performance enhancement: save the `block_index` between iterations | 5060 | // Possible performance enhancement: save the `block_index` between iterations |
| 5062 | // of the for loop. | 5061 | // of the for loop. |
| 5063 | var block_index = block.instructions.items.len -| 1; | 5062 | var block_index = block.instructions.items.len; |
| 5064 | while (block_index > 0) : (block_index -= 1) { | 5063 | while (block_index > 0) { |
| | 5064 | block_index -= 1; |
| 5065 | const store_inst = block.instructions.items[block_index]; | 5065 | const store_inst = block.instructions.items[block_index]; |
| 5066 | if (store_inst.toRef() == elem_ptr_ref) { | 5066 | if (store_inst.toRef() == elem_ptr_ref) { |
| 5067 | array_is_comptime = false; | 5067 | array_is_comptime = false; |