mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ABI] Pass requirement base descriptor to swift_getAssociatedTypeWitness().
Have clients pass the requirement base descriptor to swift_getAssociatedTypeWitness(), so that the witness index is just one subtraction away, avoiding several dependent loads (witness table -> conformance descriptor -> protocol descriptor -> requirement offset) in the hot path.
This commit is contained in:
@@ -2550,8 +2550,10 @@ MetadataResponse _getBridgedObjectiveCType(
|
||||
assert(assocTypeRequirement->Flags.getKind() ==
|
||||
ProtocolRequirementFlags::Kind::AssociatedTypeAccessFunction);
|
||||
auto mutableWTable = (WitnessTable *)wtable;
|
||||
return swift_getAssociatedTypeWitness(request, mutableWTable, conformingType,
|
||||
assocTypeRequirement);
|
||||
return swift_getAssociatedTypeWitness(
|
||||
request, mutableWTable, conformingType,
|
||||
protocol->getRequirementBaseDescriptor(),
|
||||
assocTypeRequirement);
|
||||
}
|
||||
|
||||
} // unnamed namespace
|
||||
|
||||
Reference in New Issue
Block a user