mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Restore CanType-based micro-optimizations.
This reverts commit 5036806e5a.
However, it preserves a pair of changes to the SIL optimizer
relating to walking through optional types.
This commit is contained in:
@@ -2349,7 +2349,7 @@ public:
|
||||
resultInstTy = cast<MetatypeType>(resultInstTy).getInstanceType();
|
||||
}
|
||||
|
||||
require(operandInstTy->isExistentialType(),
|
||||
require(operandInstTy.isExistentialType(),
|
||||
"ill-formed existential metatype in open_existential_metatype "
|
||||
"operand");
|
||||
auto archetype = getOpenedArchetypeOf(resultInstTy);
|
||||
@@ -2596,9 +2596,9 @@ public:
|
||||
}
|
||||
|
||||
if (isExact) {
|
||||
require(fromCanTy->getClassOrBoundGenericClass(),
|
||||
require(fromCanTy.getClassOrBoundGenericClass(),
|
||||
"downcast operand must be a class type");
|
||||
require(toCanTy->getClassOrBoundGenericClass(),
|
||||
require(toCanTy.getClassOrBoundGenericClass(),
|
||||
"downcast must convert to a class type");
|
||||
require(SILType::getPrimitiveObjectType(fromCanTy).
|
||||
isBindableToSuperclassOf(SILType::getPrimitiveObjectType(toCanTy)),
|
||||
|
||||
Reference in New Issue
Block a user