-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify assertion machinery in the standard library.
This change includes a number of simplifications that allow us to eliminate the type checker hack that specifically tries AssertString. Doing so provides a 25% speedup in the test/stdlib/ArrayNew.swift test (which is type-checker bound). The specific simplifications here: - User-level assert/precondition/preconditionalFailure/assertionFailer/fatalError always take an autoclosure producing a String, eliminating the need for the StaticString/AssertString dance. - Standard-library internal _precondition/_sanityCheck/etc. always take a StaticString. When we want to improve the diagnostics in the standard library, we can provide a separate overload or differently-named function. - Remove AssertString, AssertStringType, StaticStringType, which are no longer used or needed - Remove the AssertString hack from the compiler - Remove the "BooleanType" overloads of these functions, because their usefuless left when we stopped making optional types conform to BooleanType (sorry, should have been a separate patch). Swift SVN r22139
- Loading branch information
1 parent
531f311
commit 7764f64
Showing
10 changed files
with
44 additions
and
285 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
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
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
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
Oops, something went wrong.