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:
parent
bd7e6c3c61
commit
d0e097cd1d
2 changed files with 1 additions and 9 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 =>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue