forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For unsafeReferenceCast rely on type checks in the runtime.
<slight revision of yesterday's reverted commit> The debugAsserts were nicely self-documenting, but generate an obscene amount of useless SIL code that is inlined everywhere and sticks around when we compile the stdlib. The old asserts would need to be fixed to support Optionals but that makes the situation much worse. Why is it ok to remove the asserts? _unsafeReferenceCast remains an internal API. If the src/dest types are not loadable reference types, the cast will not be promoted to a value bitcast. The remanining cases will be dynamically checked by swift_dynamicCast. Swift SVN r32828
- Loading branch information
Showing
2 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters