chore: remove IRType.{isStruct,isUnion} (#9219)

These are used by the checker for `.ctor`, but I don't think that that
unboxed types will reuse `.ctor`, whose implementation details are
intimately connected to our runtime representation of objects.
This commit is contained in:
Cameron Zwarich 2025-07-06 06:24:24 -07:00 committed by GitHub
parent bd7e6c3c61
commit d0e097cd1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 9 deletions

View file

@ -100,14 +100,6 @@ def isIrrelevant : IRType → Bool
| irrelevant => true
| _ => false
def isStruct : IRType → Bool
| struct _ _ => true
| _ => false
def isUnion : IRType → Bool
| union _ _ => true
| _ => false
end IRType
/-- Arguments to applications, constructors, etc.

View file

@ -133,7 +133,7 @@ def checkExpr (ty : IRType) (e : Expr) : M Unit := do
throw s!"constructor '{c.name}' has too many fields"
if c.ssize + c.usize * usizeSize > maxCtorScalarsSize then
throw s!"constructor '{c.name}' has too many scalar fields"
if !ty.isStruct && !ty.isUnion && c.isRef then
if c.isRef then
checkObjType ty
checkArgs ys
| .reset _ x =>