mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Mangling] Introduce known manglings for many more standard library types.
Since the mangling scheme and set of standard library types is effectively fixed now, introduce known mangling substitutions for a number of new standard library types, filling out the S[A-Za-z] space. Reduces standard library binary size by ~195k.
This commit is contained in:
@@ -1974,10 +1974,10 @@ static bool tryDynamicCastBoxedSwiftValue(OpaqueValue *dest,
|
||||
extern "C" const StructDescriptor NOMINAL_TYPE_DESCR_SYM(Sa);
|
||||
|
||||
/// Nominal type descriptor for Swift.Dictionary.
|
||||
extern "C" const StructDescriptor STRUCT_TYPE_DESCR_SYM(s10Dictionary);
|
||||
extern "C" const StructDescriptor NOMINAL_TYPE_DESCR_SYM(SD);
|
||||
|
||||
/// Nominal type descriptor for Swift.Set.
|
||||
extern "C" const StructDescriptor STRUCT_TYPE_DESCR_SYM(s3Set);
|
||||
extern "C" const StructDescriptor NOMINAL_TYPE_DESCR_SYM(Sh);
|
||||
|
||||
// internal func _arrayDownCastIndirect<SourceValue, TargetValue>(
|
||||
// _ source: UnsafePointer<Array<SourceValue>>,
|
||||
@@ -2091,7 +2091,7 @@ static bool _dynamicCastStructToStruct(OpaqueValue *destination,
|
||||
}
|
||||
|
||||
// Dictionaries.
|
||||
} else if (descriptor == &STRUCT_TYPE_DESCR_SYM(s10Dictionary)) {
|
||||
} else if (descriptor == &NOMINAL_TYPE_DESCR_SYM(SD)) {
|
||||
if (flags & DynamicCastFlags::Unconditional) {
|
||||
_swift_dictionaryDownCastIndirect(source, destination,
|
||||
sourceArgs[0], sourceArgs[1],
|
||||
@@ -2107,7 +2107,7 @@ static bool _dynamicCastStructToStruct(OpaqueValue *destination,
|
||||
}
|
||||
|
||||
// Sets.
|
||||
} else if (descriptor == &STRUCT_TYPE_DESCR_SYM(s3Set)) {
|
||||
} else if (descriptor == &NOMINAL_TYPE_DESCR_SYM(Sh)) {
|
||||
if (flags & DynamicCastFlags::Unconditional) {
|
||||
_swift_setDownCastIndirect(source, destination,
|
||||
sourceArgs[0], targetArgs[0],
|
||||
|
||||
Reference in New Issue
Block a user