| ... | @@ -6413,6 +6413,8 @@ fn forExpr( | ... | @@ -6413,6 +6413,8 @@ fn forExpr( |
| 6413 | defer loop_scope.unstack(); | 6413 | defer loop_scope.unstack(); |
| 6414 | defer loop_scope.labeled_breaks.deinit(gpa); | 6414 | defer loop_scope.labeled_breaks.deinit(gpa); |
| 6415 | | 6415 | |
| | 6416 | const index = try loop_scope.addUnNode(.load, index_ptr, node); |
| | 6417 | |
| 6416 | var cond_scope = parent_gz.makeSubBlock(&loop_scope.base); | 6418 | var cond_scope = parent_gz.makeSubBlock(&loop_scope.base); |
| 6417 | defer cond_scope.unstack(); | 6419 | defer cond_scope.unstack(); |
| 6418 | | 6420 | |
| ... | @@ -6420,7 +6422,6 @@ fn forExpr( | ... | @@ -6420,7 +6422,6 @@ fn forExpr( |
| 6420 | if (!any_len_checks) { | 6422 | if (!any_len_checks) { |
| 6421 | return astgen.failNode(node, "TODO: handle infinite for loop", .{}); | 6423 | return astgen.failNode(node, "TODO: handle infinite for loop", .{}); |
| 6422 | } | 6424 | } |
| 6423 | const index = try cond_scope.addUnNode(.load, index_ptr, node); | | |
| 6424 | const cond = try cond_scope.addPlNode(.cmp_lt, node, Zir.Inst.Bin{ | 6425 | const cond = try cond_scope.addPlNode(.cmp_lt, node, Zir.Inst.Bin{ |
| 6425 | .lhs = index, | 6426 | .lhs = index, |
| 6426 | .rhs = len, | 6427 | .rhs = len, |
| ... | @@ -10695,7 +10696,6 @@ const Scope = struct { | ... | @@ -10695,7 +10696,6 @@ const Scope = struct { |
| 10695 | @"function parameter", | 10696 | @"function parameter", |
| 10696 | @"local constant", | 10697 | @"local constant", |
| 10697 | @"local variable", | 10698 | @"local variable", |
| 10698 | @"loop index capture", | | |
| 10699 | @"switch tag capture", | 10699 | @"switch tag capture", |
| 10700 | capture, | 10700 | capture, |
| 10701 | }; | 10701 | }; |