| ... | @@ -2078,14 +2078,19 @@ fn walkInstruction( | ... | @@ -2078,14 +2078,19 @@ fn walkInstruction( |
| 2078 | | 2078 | |
| 2079 | const args_len = extra.data.flags.args_len; | 2079 | const args_len = extra.data.flags.args_len; |
| 2080 | var args = try self.arena.alloc(DocData.Expr, args_len); | 2080 | var args = try self.arena.alloc(DocData.Expr, args_len); |
| 2081 | const arg_refs = file.zir.refSlice(extra.end, args_len); | 2081 | const body = file.zir.extra[extra.end..]; |
| 2082 | for (arg_refs) |ref, idx| { | 2082 | |
| | 2083 | var i: usize = 0; |
| | 2084 | while (i < args_len) : (i += 1) { |
| | 2085 | const arg_end = file.zir.extra[extra.end + i]; |
| | 2086 | const break_index = body[arg_end - 1]; |
| | 2087 | const ref = data[break_index].@"break".operand; |
| 2083 | // TODO: consider toggling need_type to true if we ever want | 2088 | // TODO: consider toggling need_type to true if we ever want |
| 2084 | // to show discrepancies between the types of provided | 2089 | // to show discrepancies between the types of provided |
| 2085 | // arguments and the types declared in the function | 2090 | // arguments and the types declared in the function |
| 2086 | // signature for its parameters. | 2091 | // signature for its parameters. |
| 2087 | const wr = try self.walkRef(file, parent_scope, ref, false); | 2092 | const wr = try self.walkRef(file, parent_scope, ref, false); |
| 2088 | args[idx] = wr.expr; | 2093 | args[i] = wr.expr; |
| 2089 | } | 2094 | } |
| 2090 | | 2095 | |
| 2091 | const cte_slot_index = self.comptime_exprs.items.len; | 2096 | const cte_slot_index = self.comptime_exprs.items.len; |