InternPool: add a slice encoding

This uses the data field to reference its pointer field type, which
allows for efficient and infallible access of a slice type's pointer
type.
This commit is contained in:
Andrew Kelley
2023-05-05 19:13:43 -07:00
parent 08e9763951
commit 31aee50c1a
15 changed files with 119 additions and 64 deletions

View File

@@ -6553,7 +6553,7 @@ pub fn populateTestFunctions(
}
const decl = mod.declPtr(decl_index);
var buf: Type.SlicePtrFieldTypeBuffer = undefined;
const tmp_test_fn_ty = decl.ty.slicePtrFieldType(&buf).childType(mod);
const tmp_test_fn_ty = decl.ty.slicePtrFieldType(&buf, mod).childType(mod);
const array_decl_index = d: {
// Add mod.test_functions to an array decl then make the test_functions