mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Generalizes the ConcreteExistentialInfo abstraction so it can be used both by the ExistentialSpecializer and SILCombine, allowing redundant code in ExistentialSpecializer.cpp to be deleted. Splits OpenedArchetypeInfo from ConcreteExistentialInfo. Adds a ConcreteOpenedArchetypeInfo convenience wrapper around them both, for use wherever we were originally using ConcreteExistentialInfo. Splits getAddressOfStackInit into getStackInitInst, This is cleaner and allows both the ExistentialSpecializer and SILCombine to handle more interesting cases in the future, like unconditional_checked_cast. Creates utilities, initializeSubstitutionMap, and initializeConcreteTypeDef to simplify an generalize ConcreteExistentialInfo. While rewriting ExistentialSpecializer to use the new abstraction, I fixed a latent bug in which is was using a SIL argument index as a function type parameter index (this would have broken up if/when we decide to enable calls with indirect results).
5.5 KiB
5.5 KiB