[Internals] Add missing internal checking predicates & docs for all

This commit is contained in:
Karoy Lorentey committed 2022-10-18 22:13:19 -07:00
1 parent 5b5651957b
commit f76630db8e
8 files changed
+72

No files matched your search

@@ -9,7 +9,19 @@
//
//===----------------------------------------------------------------------===//
import _CollectionsUtilities
extension BitArray {
/// True if consistency checking is enabled in the implementation of this
/// type, false otherwise.
///
/// Documented performance promises are null and void when this property
/// returns true -- for example, operations that are documented to take
/// O(1) time might take O(*n*) time, or worse.
public static var _isConsistencyCheckingEnabled: Bool {
_isCollectionsInternalCheckingEnabled
}
#if COLLECTIONS_INTERNAL_CHECKS
@inline(never)
@_effects(releasenone)
@@ -9,7 +9,19 @@
//
//===----------------------------------------------------------------------===//
import _CollectionsUtilities
extension BitSet {
/// True if consistency checking is enabled in the implementation of this
/// type, false otherwise.
///
/// Documented performance promises are null and void when this property
/// returns true -- for example, operations that are documented to take
/// O(1) time might take O(*n*) time, or worse.
public static var _isConsistencyCheckingEnabled: Bool {
_isCollectionsInternalCheckingEnabled
}
#if COLLECTIONS_INTERNAL_CHECKS
@inline(never)
@_effects(releasenone)
+6
View File
@@ -15,6 +15,12 @@ import _CollectionsUtilities
// testing.
extension Deque {
/// True if consistency checking is enabled in the implementation of this
/// type, false otherwise.
///
/// Documented performance promises are null and void when this property
/// returns true -- for example, operations that are documented to take
/// O(1) time might take O(*n*) time, or worse.
public static var _isConsistencyCheckingEnabled: Bool {
_isCollectionsInternalCheckingEnabled
}
+6
View File
@@ -12,6 +12,12 @@
import _CollectionsUtilities
extension Heap {
/// True if consistency checking is enabled in the implementation of this
/// type, false otherwise.
///
/// Documented performance promises are null and void when this property
/// returns true -- for example, operations that are documented to take
/// O(1) time might take O(*n*) time, or worse.
public static var _isConsistencyCheckingEnabled: Bool {
_isCollectionsInternalCheckingEnabled
}
@@ -9,7 +9,19 @@
//
//===----------------------------------------------------------------------===//
import _CollectionsUtilities
extension OrderedDictionary {
/// True if consistency checking is enabled in the implementation of this
/// type, false otherwise.
///
/// Documented performance promises are null and void when this property
/// returns true -- for example, operations that are documented to take
/// O(1) time might take O(*n*) time, or worse.
public static var _isConsistencyCheckingEnabled: Bool {
_isCollectionsInternalCheckingEnabled
}
#if COLLECTIONS_INTERNAL_CHECKS
@inline(never) @_effects(releasenone)
public func _checkInvariants() {
@@ -9,7 +9,19 @@
//
//===----------------------------------------------------------------------===//
import _CollectionsUtilities
extension OrderedSet {
/// True if consistency checking is enabled in the implementation of this
/// type, false otherwise.
///
/// Documented performance promises are null and void when this property
/// returns true -- for example, operations that are documented to take
/// O(1) time might take O(*n*) time, or worse.
public static var _isConsistencyCheckingEnabled: Bool {
_isCollectionsInternalCheckingEnabled
}
#if COLLECTIONS_INTERNAL_CHECKS
@inlinable
@inline(never) @_effects(releasenone)
@@ -12,6 +12,12 @@
import _CollectionsUtilities
extension PersistentDictionary {
/// True if consistency checking is enabled in the implementation of this
/// type, false otherwise.
///
/// Documented performance promises are null and void when this property
/// returns true -- for example, operations that are documented to take
/// O(1) time might take O(*n*) time, or worse.
public static var _isConsistencyCheckingEnabled: Bool {
_isCollectionsInternalCheckingEnabled
}
@@ -9,6 +9,12 @@
//
//===----------------------------------------------------------------------===//
/// True if consistency checking is enabled in the implementation of the
/// Swift Collections package, false otherwise.
///
/// Documented performance promises are null and void when this property
/// returns true -- for example, operations that are documented to take
/// O(1) time might take O(*n*) time, or worse.
@inlinable @inline(__always)
public var _isCollectionsInternalCheckingEnabled: Bool {
#if COLLECTIONS_INTERNAL_CHECKS