mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When casting a class instance to a final class, we can directly compare the isa-pointer with address of the metadata. This avoids a call to `swift_dynamicCastClass`. It also avoids a call to the metadata accessor of the class (which calls `swift_getInitializedObjCClass`). For comparing the metadata pointers it's not required that the metadata is fully initialized.