File tree Expand file tree Collapse file tree
kmir/src/kmir/kdist/mir-semantics Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -581,16 +581,22 @@ Therefore a heuristics is used here:
581581 // or the closure ref type pointee is missing from the type table
582582 andBool isRefType(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))
583583 andBool isTy(pointeeTy(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal))))
584- andBool lookupTy({pointeeTy(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))}:>Ty) ==K typeInfoVoidType
584+ andBool (
585+ lookupTy({pointeeTy(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))}:>Ty) ==K typeInfoVoidType
586+ orBool isFunType(lookupTy({pointeeTy(lookupTy(tyOfLocal({LOCALS[CLOSURE]}:>TypedLocal)))}:>Ty))
587+ )
585588 [priority(45), preserves-definedness]
586589
587590 syntax Bool ::= isTupleType ( TypeInfo ) [function, total]
588591 | isRefType ( TypeInfo ) [function, total]
592+ | isFunType ( TypeInfo ) [function, total]
589593 // -------------------------------------------------------
590594 rule isTupleType(typeInfoTupleType(_, _)) => true
591595 rule isTupleType( _ ) => false [owise]
592596 rule isRefType(typeInfoRefType(_)) => true
593597 rule isRefType( _ ) => false [owise]
598+ rule isFunType(typeInfoFunType(_)) => true
599+ rule isFunType( _ ) => false [owise]
594600
595601 syntax KItem ::= #setTupleArgs ( Int , Value )
596602 | #setTupleArgs ( Int , List )
You can’t perform that action at this time.
0 commit comments