| ... | ... | @@ -8222,6 +8222,7 @@ static IrInstSrc *ir_gen_while_expr(IrBuilderSrc *irb, Scope *scope, AstNode *no |
| 8222 | 8222 | ZigVar *payload_var = ir_create_var(irb, symbol_node, subexpr_scope, var_symbol, |
| 8223 | 8223 | true, false, false, is_comptime); |
| 8224 | 8224 | Scope *child_scope = payload_var->child_scope; |
| 8225 | ScopeExpr *spill_scope = create_expr_scope(irb->codegen, node, child_scope); |
| 8225 | 8226 | IrInstSrc *maybe_val_ptr = ir_gen_node_extra(irb, node->data.while_expr.condition, subexpr_scope, |
| 8226 | 8227 | LValPtr, nullptr); |
| 8227 | 8228 | if (maybe_val_ptr == irb->codegen->invalid_inst_src) |
| ... | ... | @@ -8244,7 +8245,7 @@ static IrInstSrc *ir_gen_while_expr(IrBuilderSrc *irb, Scope *scope, AstNode *no |
| 8244 | 8245 | is_comptime); |
| 8245 | 8246 | |
| 8246 | 8247 | ir_set_cursor_at_end_and_append_block(irb, body_block); |
| 8247 | | IrInstSrc *payload_ptr = ir_build_optional_unwrap_ptr(irb, child_scope, symbol_node, maybe_val_ptr, false, false); |
| 8248 | IrInstSrc *payload_ptr = ir_build_optional_unwrap_ptr(irb, &spill_scope->base, symbol_node, maybe_val_ptr, false, false); |
| 8248 | 8249 | IrInstSrc *var_ptr = node->data.while_expr.var_is_ptr ? |
| 8249 | 8250 | ir_build_ref_src(irb, child_scope, symbol_node, payload_ptr, true, false) : payload_ptr; |
| 8250 | 8251 | ir_build_var_decl_src(irb, child_scope, symbol_node, payload_var, nullptr, var_ptr); |
| ... | ... | @@ -8260,6 +8261,7 @@ static IrInstSrc *ir_gen_while_expr(IrBuilderSrc *irb, Scope *scope, AstNode *no |
| 8260 | 8261 | loop_scope->incoming_values = &incoming_values; |
| 8261 | 8262 | loop_scope->lval = lval; |
| 8262 | 8263 | loop_scope->peer_parent = peer_parent; |
| 8264 | loop_scope->spill_scope = spill_scope; |
| 8263 | 8265 | |
| 8264 | 8266 | // Note the body block of the loop is not the place that lval and result_loc are used - |
| 8265 | 8267 | // it's actually in break statements, handled similarly to return statements. |