Files
swift-mirror/lib/IRGen/GenCast.cpp
Slava Pestov 454495f974 IRGen: Subclass existential scalar downcasts
This handles the case where the left hand side of the cast is known
to be class-like, and the right hand side is known at compile time
to be a protocol composition type.

Note that this change results in a small optimization -- a checked
cast of a metatype known to be a class metatype to a class-constrained
existential metatype no longer has to emit an explicit check that
the source is class-constrained.

Fully dynamic casts are coming up next.
2017-04-25 02:42:14 -07:00

32 KiB