mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This patch does the following: - Moves the logic for handling special-case of converting to/from AnyObject.Protocol (and existential.Protocol in general) into DynamicCasts, where all other cases are handled already. - Moves the peephole which was folding checked_cast_br into an unchecked cast and branch from sil-combine into sil-simplify-cfg, because it is a better place for it, since this peephole affects the CFG. The corresponding test is also moved from sil_combine.sil into simplify_cfg.sil. - Adds a few checked_cast_br peepholes to sil-combine. They try to simplify checked_cond_br instructions using existential metatypes by propagating a concrete type whenever it can be determined statically. - Adds a new test with a lot of test-cases that make sure we are really folding many type-checks at compile-time now. Swift SVN r25504
27 KiB
27 KiB