authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-08-08 22:28:48+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-08-09 19:26:40+03:00
log0778490283a8129755e411877453a173759ab4f4
treebd519b111a24dbf280c6e7af57453f7b7daee868
parent19af4b5cadaad24fd886578da5b5840dd3499d2d

AutoDoc: update to Zir call inst changes


1 files changed, 8 insertions(+), 3 deletions(-)

src/Autodoc.zig+8-3
...@@ -2078,14 +2078,19 @@ fn walkInstruction(...@@ -2078,14 +2078,19 @@ fn walkInstruction(
20782078
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 want2088 // TODO: consider toggling need_type to true if we ever want
2084 // to show discrepancies between the types of provided2089 // to show discrepancies between the types of provided
2085 // arguments and the types declared in the function2090 // 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 }
20902095
2091 const cte_slot_index = self.comptime_exprs.items.len;2096 const cte_slot_index = self.comptime_exprs.items.len;