| ... | @@ -1306,11 +1306,11 @@ fn varDecl( | ... | @@ -1306,11 +1306,11 @@ fn varDecl( |
| 1306 | if (var_decl.ast.type_node != 0) { | 1306 | if (var_decl.ast.type_node != 0) { |
| 1307 | const type_inst = try typeExpr(mod, &init_scope.base, var_decl.ast.type_node); | 1307 | const type_inst = try typeExpr(mod, &init_scope.base, var_decl.ast.type_node); |
| 1308 | opt_type_inst = type_inst; | 1308 | opt_type_inst = type_inst; |
| 1309 | init_scope.rl_ptr = try init_scope.addUnNode(.alloc, type_inst, node); | 1309 | init_scope.rl_ptr = (try init_scope.addUnNode(.alloc, type_inst, node)) - init_scope.zir_code.ref_start_index; |
| 1310 | } else { | 1310 | } else { |
| 1311 | const alloc = try init_scope.addUnNode(.alloc_inferred, undefined, node); | 1311 | const alloc = try init_scope.addUnNode(.alloc_inferred, undefined, node); |
| 1312 | resolve_inferred_alloc = alloc; | 1312 | resolve_inferred_alloc = alloc; |
| 1313 | init_scope.rl_ptr = alloc; | 1313 | init_scope.rl_ptr = alloc - init_scope.zir_code.ref_start_index; |
| 1314 | } | 1314 | } |
| 1315 | const init_result_loc: ResultLoc = .{ .block_ptr = &init_scope }; | 1315 | const init_result_loc: ResultLoc = .{ .block_ptr = &init_scope }; |
| 1316 | const init_inst = try expr(mod, &init_scope.base, init_result_loc, var_decl.ast.init_node); | 1316 | const init_inst = try expr(mod, &init_scope.base, init_result_loc, var_decl.ast.init_node); |
| ... | @@ -3201,7 +3201,7 @@ fn asRlPtr( | ... | @@ -3201,7 +3201,7 @@ fn asRlPtr( |
| 3201 | }; | 3201 | }; |
| 3202 | defer as_scope.instructions.deinit(mod.gpa); | 3202 | defer as_scope.instructions.deinit(mod.gpa); |
| 3203 | | 3203 | |
| 3204 | as_scope.rl_ptr = try as_scope.addBin(.coerce_result_ptr, dest_type, result_ptr); | 3204 | as_scope.rl_ptr = (try as_scope.addBin(.coerce_result_ptr, dest_type, result_ptr)) - as_scope.zir_code.ref_start_index; |
| 3205 | const result = try expr(mod, &as_scope.base, .{ .block_ptr = &as_scope }, operand_node); | 3205 | const result = try expr(mod, &as_scope.base, .{ .block_ptr = &as_scope }, operand_node); |
| 3206 | const parent_zir = &parent_gz.instructions; | 3206 | const parent_zir = &parent_gz.instructions; |
| 3207 | if (as_scope.rvalue_rl_count == 1) { | 3207 | if (as_scope.rvalue_rl_count == 1) { |