| ... | @@ -11761,9 +11761,9 @@ const GenZir = struct { | ... | @@ -11761,9 +11761,9 @@ const GenZir = struct { |
| 11761 | ) !Zir.Inst.Index { | 11761 | ) !Zir.Inst.Index { |
| 11762 | const gpa = gz.astgen.gpa; | 11762 | const gpa = gz.astgen.gpa; |
| 11763 | const param_body = param_gz.instructionsSlice(); | 11763 | const param_body = param_gz.instructionsSlice(); |
| | 11764 | const body_len = gz.astgen.countBodyLenAfterFixups(param_body); |
| 11764 | try gz.astgen.instructions.ensureUnusedCapacity(gpa, 1); | 11765 | try gz.astgen.instructions.ensureUnusedCapacity(gpa, 1); |
| 11765 | try gz.astgen.extra.ensureUnusedCapacity(gpa, @typeInfo(Zir.Inst.Param).Struct.fields.len + | 11766 | try gz.astgen.extra.ensureUnusedCapacity(gpa, @typeInfo(Zir.Inst.Param).Struct.fields.len + body_len); |
| 11766 | param_body.len); | | |
| 11767 | | 11767 | |
| 11768 | const doc_comment_index = if (first_doc_comment) |first| | 11768 | const doc_comment_index = if (first_doc_comment) |first| |
| 11769 | try gz.astgen.docCommentAsStringFromFirst(abs_tok_index, first) | 11769 | try gz.astgen.docCommentAsStringFromFirst(abs_tok_index, first) |
| ... | @@ -11773,9 +11773,9 @@ const GenZir = struct { | ... | @@ -11773,9 +11773,9 @@ const GenZir = struct { |
| 11773 | const payload_index = gz.astgen.addExtraAssumeCapacity(Zir.Inst.Param{ | 11773 | const payload_index = gz.astgen.addExtraAssumeCapacity(Zir.Inst.Param{ |
| 11774 | .name = name, | 11774 | .name = name, |
| 11775 | .doc_comment = doc_comment_index, | 11775 | .doc_comment = doc_comment_index, |
| 11776 | .body_len = @intCast(u32, param_body.len), | 11776 | .body_len = @intCast(u32, body_len), |
| 11777 | }); | 11777 | }); |
| 11778 | gz.astgen.extra.appendSliceAssumeCapacity(param_body); | 11778 | gz.astgen.appendBodyWithFixups(param_body); |
| 11779 | param_gz.unstack(); | 11779 | param_gz.unstack(); |
| 11780 | | 11780 | |
| 11781 | const new_index = @intCast(Zir.Inst.Index, gz.astgen.instructions.len); | 11781 | const new_index = @intCast(Zir.Inst.Index, gz.astgen.instructions.len); |