Push the conformance accessor hack down into getTypeByMangledName.

This commit is contained in:
Joe Groff
2019-03-06 15:15:35 -08:00
parent ffc9fd5e38
commit 05dfec0cda
18 changed files with 125 additions and 53 deletions

View File

@@ -645,8 +645,9 @@ bool swift::_checkGenericRequirements(
// Resolve the subject generic parameter.
const Metadata *subjectType =
swift_getTypeByMangledName(MetadataState::Abstract,
req.getParam(), substGenericParam,
substWitnessTable).getMetadata();
req.getParam(),
extraArguments.data(),
substGenericParam, substWitnessTable).getMetadata();
if (!subjectType)
return true;
@@ -671,8 +672,9 @@ bool swift::_checkGenericRequirements(
// Demangle the second type under the given substitutions.
auto otherType =
swift_getTypeByMangledName(MetadataState::Abstract,
req.getMangledTypeName(), substGenericParam,
substWitnessTable).getMetadata();
req.getMangledTypeName(),
extraArguments.data(),
substGenericParam, substWitnessTable).getMetadata();
if (!otherType) return true;
assert(!req.getFlags().hasExtraArgument());
@@ -699,8 +701,9 @@ bool swift::_checkGenericRequirements(
// Demangle the base type under the given substitutions.
auto baseType =
swift_getTypeByMangledName(MetadataState::Abstract,
req.getMangledTypeName(), substGenericParam,
substWitnessTable).getMetadata();
req.getMangledTypeName(),
extraArguments.data(),
substGenericParam, substWitnessTable).getMetadata();
if (!baseType) return true;
// Check whether it's dynamically castable, which works as a superclass