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.
[stdlib] Introduce _invariantCheck_5_1 for 5.1 and later assertions.
Inlinable and non-inlinable code can cause 5.1 code to intermix with 5.0 code on older OSes. Some (weak) invariants for 5.1 should only be checked when the OS's code is 5.1 or later, which is the purpose of _invariantCheck_5_1. Applied to String.Index._isScalarAligned, which is a new bit introduced in 5.1 from one of the reserved bits from 5.0. The bit is set when the index is proven to be scalar aligned, and we want to assert on this liberally in contexts where we expect it to be so. However, older OSes might not set this bit when doing scalar aligning, depending on exactly what got inlined where/when.
- Loading branch information
Showing
4 changed files
with
23 additions
and
7 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