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:
John McCall
2016-06-01 11:37:34 -07:00
parent c55b3c6ad8
commit 6328f3fe0b
26 changed files with 207 additions and 246 deletions

View File

@@ -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