mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Explicitly represent "pseudo-generic" functions in SIL, which do
not have access to their type arguments at runtime. Use this to fix the emission of native thunks for imported ObjC-generic initializers, since they may need to perform bridging. For now, pseudo-genericity is all-or-nothing, but we may want to make it apply only to certain type arguments. Also, clean up some code that was using dead mangling nodes.
This commit is contained in:
@@ -53,7 +53,7 @@ const uint16_t VERSION_MAJOR = 0;
|
||||
/// in source control, you should also update the comment to briefly
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
const uint16_t VERSION_MINOR = 250; // Last change: Add Throws bit
|
||||
const uint16_t VERSION_MINOR = 251; // Last change: SILFunctionType::isPseudogeneric
|
||||
|
||||
using DeclID = PointerEmbeddedInt<unsigned, 31>;
|
||||
using DeclIDField = BCFixed<31>;
|
||||
@@ -702,6 +702,7 @@ namespace decls_block {
|
||||
ParameterConventionField, // callee convention
|
||||
SILFunctionTypeRepresentationField, // representation
|
||||
BCFixed<1>, // noreturn?
|
||||
BCFixed<1>, // pseudogeneric?
|
||||
BCFixed<1>, // error result?
|
||||
BCFixed<30>, // number of parameters
|
||||
BCFixed<30>, // number of results
|
||||
|
||||
Reference in New Issue
Block a user