stage2: move function types to InternPool

This commit is contained in:
Andrew Kelley
2023-05-15 20:09:54 -07:00
parent 6a9a918fbe
commit 17882162b3
23 changed files with 822 additions and 792 deletions

View File

@@ -1081,7 +1081,7 @@ fn genDeclRef(
// TODO this feels clunky. Perhaps we should check for it in `genTypedValue`?
if (tv.ty.castPtrToFn(mod)) |fn_ty| {
if (fn_ty.fnInfo().is_generic) {
if (mod.typeToFunc(fn_ty).?.is_generic) {
return GenResult.mcv(.{ .immediate = fn_ty.abiAlignment(mod) });
}
} else if (tv.ty.zigTypeTag(mod) == .Pointer) {