Return the number of instructions in body after prepending the ref instructions in ref_table.
As well as all instructions in body, we also prepend refs of any instruction in extra_refs.
For instance, if an index has been reserved with a special meaning to a child block, it must be
passed to extra_refs to ensure refs of that index are added correctly.
fn countBodyLenAfterFixupsExtraRefs(astgen: *AstGen, body: []const Zir.Inst.Index, extra_refs: []const Zir.Inst.Index) u32
fn countBodyLenAfterFixupsExtraRefs(astgen: *AstGen, body: []const Zir.Inst.Index, extra_refs: []const Zir.Inst.Index) u32 {
var count = body.len;
for (body) |body_inst| {
var check_inst = body_inst;
while (astgen.ref_table.get(check_inst)) |ref_inst| {
count += 1;
check_inst = ref_inst;
}
}
for (extra_refs) |extra_inst| {
var check_inst = extra_inst;
while (astgen.ref_table.get(check_inst)) |ref_inst| {
count += 1;
check_inst = ref_inst;
}
}
return @intCast(count);
}