Swift Stdlib API Matrix — iOS · macOS · MiniSwift

Per-API comparison of the Apple Swift standard library against MiniSwift's native (ir-to-c) implementation, across the practical core surface. Native backend: ✅ runtime + IR lowering · 🟡 partial / with caveat · ❌ name-resolves only.

548
Full — runtime + IR lowering
361
Partial — partial / with caveat
163
Not yet — name-resolves only
1072
Total APIs compared
1. Bool & integer types2. Floating-point types3. String / Substring / Character / Unicode4. Array / ArraySlice / ContiguousArray5. Dictionary6. Set / SetAlgebra / OptionSet7. Optional8. Ranges / Strideable / indexing9. Sequence / Collection algorithms10. Result / Error / error handling11. Core protocols & conformance synthesis12. Concurrency13. KeyPaths / reflection / debugging / print14. Unsafe / pointers / memory / SIMD / C interop15. Global functions & misc types

1. Bool & integer types

57·23·0
Bool.init()
init()
Defaults to false; bool literal lowering.
iOS allmacOS all
Bool.init(_:)
init(_ value: Bool)
Copy init.
iOS allmacOS all
Bool.init(booleanLiteral:)
init(booleanLiteral value: Bool)
ExpressibleByBooleanLiteral; true/false literals lowered directly.
iOS allmacOS all
Bool.init?(_:) (from String)
init?(_ description: String)
LosslessStringConvertible; Bool("true")/"false" works, returns nil otherwise (verified).
iOS allmacOS all
Bool.! (logical NOT)
prefix static func ! (a: Bool) -> Bool
Lowered to native negation.
iOS allmacOS all
Bool.&& (logical AND)
static func && (lhs: Bool, rhs: @autoclosure () throws -> Bool) rethrows -> Bool
Short-circuit lowering (verified).
iOS allmacOS all
Bool.|| (logical OR)
static func || (lhs: Bool, rhs: @autoclosure () throws -> Bool) rethrows -> Bool
Short-circuit lowering (verified).
iOS allmacOS all
Bool.== (Equatable)
static func == (lhs: Bool, rhs: Bool) -> Bool
Native compare.
iOS allmacOS all
Bool.toggle()
mutating func toggle()
Verified: flips in place.
iOS allmacOS all
Bool.description
var description: String { get }
CustomStringConvertible; prints true/false (verified).
iOS allmacOS all
Bool.hash(into:) / hashValue
func hash(into:) ; var hashValue: Int
Hashable; deterministic hashing path per coverage.md.
iOS allmacOS all
Bool.random(using:)
static func random<T>(using generator: inout T) -> Bool where T : RandomNumberGenerator
Concrete using: &rng custom RNG calls consume rng.next() on WASM/native; fully generic/existential RNG witness dispatch remains limited.
iOS allmacOS all
Bool.random()
static func random() -> Bool
Verified returns true/false.
iOS allmacOS all
Bool : Codable (init(from:)/encode(to:))
init(from: any Decoder) throws ; func encode(to: any Encoder) throws
Top-level JSONEncoder/JSONDecoder Bool true/false smoke paths work on WASM/native; full Encoder/Decoder container model is still unmodeled.
iOS allmacOS all
Bool.customMirror
var customMirror: Mirror { get }
customMirror.displayStyle == nil smoke path works through the scalar Mirror sentinel; full children/reflection printing remains shallow.
iOS allmacOS all
Bool : CVarArg / BitwiseCopyable
extension Bool : CVarArg, BitwiseCopyable
Marker constraints type-check and call through generic smoke helpers on WASM/native; true C varargs ABI/CVaList encoding is still not modeled.
iOS allmacOS all
Int/Int8…Int64/UInt/UInt8…UInt64.init(integerLiteral:)
init(integerLiteral value: Self)
Integer literals lowered to native constants.
iOS allmacOS all
FixedWidthInteger.init(_:) integer conversions
init<T>(_ source: T) where T : BinaryInteger
Family of widening/narrowing conversions; common concrete casts lowered (e.g. Int(UInt8(0))).
iOS allmacOS all
BinaryInteger.init(_:) from float
init<T>(_ source: T) where T : BinaryFloatingPoint ; Int(_ : Double/Float)
Truncating-toward-zero conversion lowered for Double/Float.
iOS allmacOS all
Int.init(_:) from Float16
init(_ source: Float16) ; init?(exactly: Float16)
Float16 resolves as a Float-backed compatibility alias; finite Int(_) and Int(exactly:) edges now cover positive/negative truncation, -0.0, and fractional nil on WASM/native. True half-precision storage/rounding and non-finite Float16 exactness remain limited.
iOS 14.0macOS 11.0
FixedWidthInteger.init?(exactly:) integer/float
init?<T>(exactly source: T)
Range and integral-exactness checks now produce Optional tag/payload for integer and float sources; verified Int8/UInt8 bounds and Int exact Double cases.
iOS allmacOS all
FixedWidthInteger.init(clamping:)
init<Other>(clamping source: Other) where Other : BinaryInteger
Narrow Int8/UInt8/Int16 plus Int32/UInt32 edge clamping and UInt/UInt64 negative-to-zero smoke paths work in WASM/native; true UInt64-above-Int64 semantics remain limited by signed 64-bit storage.
iOS allmacOS all
FixedWidthInteger.init(truncatingIfNeeded:)
init<T>(truncatingIfNeeded source: T) where T : BinaryInteger
Width-aware masking/sign-extension for narrow integer targets; verified Int8/UInt8/Int16/UInt16 truncation.
iOS allmacOS all
Int.init(bitPattern:) from UInt
init(bitPattern x: UInt)
Same-width reinterpret often a no-op; unsigned 64-bit printing unreliable (UInt.max sometimes prints -1).
iOS allmacOS all
Int.init(bitPattern: OpaquePointer?/ObjectIdentifier)
init(bitPattern pointer: OpaquePointer?) ; init(bitPattern objectID: ObjectIdentifier)
OpaquePointer-to-Int bitPattern lowers as an IR cast and is verified for non-null pointers; optional nil and ObjectIdentifier paths remain missing.
iOS allmacOS all
FixedWidthInteger.init?(_:radix:)
init?<S>(_ text: S, radix: Int = 10) where S : StringProtocol
Int/Int64 string radix parsing now preserves .some(0) and nil for invalid/Int.max + 1; narrow Int8/UInt8 range smoke paths are verified. UInt64-above-Int64, Int.min, and generic StringProtocol corners remain limited.
iOS allmacOS all
LosslessStringConvertible.init?(_:) (Int from String)
init?(_ description: String)
Base-10 string-to-int parsing supported per coverage radix/string paths; radix overload missing.
iOS allmacOS all
Int.init(littleEndian:)/init(bigEndian:)
init(littleEndian value: Self) ; init(bigEndian value: Self)
Host/little-endian identity and big-endian byte-swap initializer paths verified for Int and UInt16.
iOS allmacOS all
AdditiveArithmetic.+ / +=
static func + (Self,Self)->Self ; static func += (inout Self,Self)
Native add (verified for Int).
iOS allmacOS all
AdditiveArithmetic.- / -=
static func - (Self,Self)->Self ; static func -= (inout Self,Self)
Native subtract.
iOS allmacOS all
Numeric.* / *=
static func * (Self,Self)->Self ; static func *= (inout Self,Self)
Native multiply.
iOS allmacOS all
BinaryInteger./ and /=
static func / (Self,Self)->Self ; static func /= (inout Self,Self)
Verified: 7/3==2.
iOS allmacOS all
BinaryInteger.% and %=
static func % (Self,Self)->Self ; static func %= (inout Self,Self)
Verified: 7%3==1.
iOS allmacOS all
SignedNumeric.prefix - (negation)
prefix static func - (operand: Self) -> Self
Native negate; (-5) literals work.
iOS allmacOS all
SignedNumeric.negate()
mutating func negate()
In-place negation.
iOS allmacOS all
FixedWidthInteger.&+ / &+=
static func &+ (Self,Self)->Self ; static func &+= (inout Self,Self)
Verified: 5 &+ 3 == 8 (wrapping add).
iOS allmacOS all
FixedWidthInteger.&- / &-=
static func &- (Self,Self)->Self ; static func &-= (inout Self,Self)
Wrapping subtract lowered.
iOS allmacOS all
FixedWidthInteger.&* / &*=
static func &* (Self,Self)->Self ; static func &*= (inout Self,Self)
Verified: 5 &* 2 == 10 (wrapping multiply).
iOS allmacOS all
FixedWidthInteger.addingReportingOverflow(_:)
func addingReportingOverflow(_ rhs: Self) -> (partialValue: Self, overflow: Bool)
Int non-overflow and max/min overflow edges are verified native/WASM with wrapped partialValue; narrow/generic fixed-width coverage remains limited.
iOS allmacOS all
FixedWidthInteger.subtractingReportingOverflow(_:)
func subtractingReportingOverflow(_ rhs: Self) -> (partialValue: Self, overflow: Bool)
Int min-1 and max-(-1) overflow edges are verified with wrapped partialValue; broader fixed-width coverage remains limited.
iOS allmacOS all
FixedWidthInteger.multipliedReportingOverflow(by:)
func multipliedReportingOverflow(by rhs: Self) -> (partialValue: Self, overflow: Bool)
Int max*2, min*(-1), and 0*0 paths are verified without divide traps; narrow/generic coverage remains limited.
iOS allmacOS all
FixedWidthInteger.dividedReportingOverflow(by:)
func dividedReportingOverflow(by rhs: Self) -> (partialValue: Self, overflow: Bool)
Int division-by-zero and Int.min/(-1) return (self, true) without trapping in native/WASM; broader fixed-width edge coverage remains limited.
iOS allmacOS all
FixedWidthInteger.remainderReportingOverflow(dividingBy:)
func remainderReportingOverflow(dividingBy rhs: Self) -> (partialValue: Self, overflow: Bool)
Int remainder-by-zero returns (self, true) and Int.min % -1 returns (0, true) without trapping; broader fixed-width edge coverage remains limited.
iOS allmacOS all
FixedWidthInteger.multipliedFullWidth(by:)
func multipliedFullWidth(by other: Self) -> (high: Self, low: Self.Magnitude)
Simple Int products return (high, low) in wasm (3*4 -> 0,12 verified); true signed/unsigned 128-bit edge semantics remain partial.
iOS allmacOS all
FixedWidthInteger.dividingFullWidth(_:)
func dividingFullWidth(_ dividend: (high: Self, low: Self.Magnitude)) -> (quotient: Self, remainder: Self)
Low-half dividend path works when high == 0 (34 / 17 -> 2 r0 verified); nonzero high word is not true 128-bit division yet.
iOS allmacOS all
BinaryInteger.quotientAndRemainder(dividingBy:)
func quotientAndRemainder(dividingBy rhs: Self) -> (quotient: Self, remainder: Self)
Verified: 17 → (3,2).
iOS allmacOS all
BinaryInteger.isMultiple(of:)
func isMultiple(of other: Self) -> Bool
Verified for Int, UInt, and signed narrow Int8 member dispatch.
iOS allmacOS all
BinaryInteger.signum()
func signum() -> Self
Verified: 5→1, -5→-1.
iOS allmacOS all
BinaryInteger.& and &=
static func & (Self,Self)->Self ; static func &= (inout Self,Self)
Verified: 0xFF & 0x0F == 15.
iOS allmacOS all
BinaryInteger.| and |=
static func | (Self,Self)->Self ; static func |= (inout Self,Self)
Verified: 0xF0 | 0x0F == 255.
iOS allmacOS all
BinaryInteger.^ and ^=
static func ^ (Self,Self)->Self ; static func ^= (inout Self,Self)
Verified: 0xFF ^ 0x0F == 240.
iOS allmacOS all
FixedWidthInteger.prefix ~ (bitwise NOT)
prefix static func ~ (x: Self) -> Self
Verified: ~UInt8(0) == 255.
iOS allmacOS all
BinaryInteger.<< and <<= (smart shift)
static func << <RHS>(Self,RHS)->Self ; static func <<= ... where RHS : BinaryInteger
Verified: 1 << 4 == 16.
iOS allmacOS all
BinaryInteger.>> and >>= (smart shift)
static func >> <RHS>(Self,RHS)->Self ; static func >>= ... where RHS : BinaryInteger
Verified: 256 >> 2 == 64.
iOS allmacOS all
FixedWidthInteger.&<< / &<<= / &>> / &>>= (masking shifts)
static func &<< (Self,Self)->Self ; static func &>> (Self,Self)->Self (+ generic + assign forms)
Masking shift and compound-assignment forms verified for shift counts beyond bitWidth (1 &<< 65, 8 &>> 65).
iOS allmacOS all
Comparable.== / != (concrete)
static func == (Self,Self)->Bool ; static func != (Self,Self)->Bool
Native compare.
iOS allmacOS all
Comparable.< <= > >= (concrete)
static func < / <= / > / >= (Self,Self)->Bool
Native comparison; used in ranges/loops.
iOS allmacOS all
BinaryInteger heterogeneous compare ==/!=/</<=/>=/>
static func == <Other>(Self,Other)->Bool where Other : BinaryInteger (+ family)
Cross-width signed and unsigned integer comparisons verified (Int8 < Int, UInt8 == Int).
iOS allmacOS all
FixedWidthInteger.min (static)
static var min: Self { get }
Verified: Int8.min==-128, Int.min correct.
iOS allmacOS all
FixedWidthInteger.max (static)
static var max: Self { get }
Verified: Int8.max==127, UInt8.max==255.
iOS allmacOS all
FixedWidthInteger.bitWidth (static)
static var bitWidth: Int { get }
Verified: Int.bitWidth==64, Int8.bitWidth==8 (isolated).
iOS allmacOS all
FixedWidthInteger.bitWidth (instance)
var bitWidth: Int { get }
Instance bit width now preserves explicit and constructor-produced narrow integer types; verified Int, Int8, UInt8, Int16, UInt32.
iOS allmacOS all
FixedWidthInteger.leadingZeroBitCount
var leadingZeroBitCount: Int { get }
Width-aware leading-zero lowering for Int and narrow signed/unsigned values; verified Int8/UInt8/Int16 cases.
iOS allmacOS all
FixedWidthInteger.trailingZeroBitCount
var trailingZeroBitCount: Int { get }
Width-aware trailing-zero lowering including narrow zero values; verified Int and Int8/Int16 cases.
iOS allmacOS all
FixedWidthInteger.nonzeroBitCount
var nonzeroBitCount: Int { get }
Width-masked popcount for narrow integer values; verified Int8 positive and all-ones values.
iOS allmacOS all
FixedWidthInteger.byteSwapped
var byteSwapped: Self { get }
Width-aware byte-swap lowering verified for 64-bit Int plus UInt16/Int16/UInt8 narrow values.
iOS allmacOS all
FixedWidthInteger.bigEndian / littleEndian
var bigEndian: Self { get } ; var littleEndian: Self { get }
Little-endian identity and big-endian byte-swap paths verified for Int plus UInt16/Int16/UInt8 narrow values.
iOS allmacOS all
BinaryInteger.magnitude
var magnitude: Self.Magnitude { get } ; Int.magnitude: UInt
Verified: (-5).magnitude==5.
iOS allmacOS all
BinaryInteger.words
var words: Self.Words { get }
64-bit Int exposes a one-element array-like words view (42.words.count == 1, subscript 0 verified); not a full Words collection type.
iOS allmacOS all
BinaryInteger.description
var description: String { get }
Verified: 42.description=="42"; base-10 int→string lowering.
iOS allmacOS all
BinaryInteger.hashValue / hash(into:)
func hash(into:) ; var hashValue: Int
Hashable for ints supported per coverage.md.
iOS allmacOS all
BinaryInteger.isSigned (static)
static var isSigned: Bool { get }
Static signedness now returns true for Int/Int8 and false for UInt/UInt8 family members; verified.
iOS allmacOS all
Strideable.distance(to:)
func distance(to other: Self) -> Int (Stride for ints)
Used by ranges/stride lowering (for.c).
iOS allmacOS all
Strideable.advanced(by:)
func advanced(by n: Self.Stride) -> Self
Used by range/index advancement lowering.
iOS allmacOS all
FixedWidthInteger.random(in:) (Range/ClosedRange)
static func random(in range: Range<Self>) -> Self ; static func random(in: ClosedRange<Self>) -> Self
Verified: Int.random(in:1...6) stays in bounds.
iOS allmacOS all
FixedWidthInteger.random(in:using:)
static func random<T>(in range: Range<Self>/ClosedRange<Self>, using generator: inout T) -> Self where T : RandomNumberGenerator
Concrete using: &rng custom RNG calls consume rng.next() for Int ranges on WASM/native; fully generic/existential RNG witness dispatch remains limited.
iOS allmacOS all
Int : Codable
extension FixedWidthInteger : Codable
Minimal JSON Codable bridge per coverage.md; not full container model.
iOS allmacOS all
Int : CVarArg
extension Int : CVarArg
Builtin Int/fixed-width integer marker conformances type-check and Int generic CVarArg smoke path runs; true C varargs ABI/CVaList encoding remains missing.
iOS allmacOS all
Int : CustomReflectable (customMirror)
var customMirror: Mirror { get }
Mirror stubs only.
iOS allmacOS all
Int128 / UInt128 family
@frozen struct Int128 / UInt128 : FixedWidthInteger (full member surface)
Int128/UInt128 resolve as 64-bit Int/UInt compatibility aliases for simple literals/arithmetic; no true 128-bit storage, range, ABI, or full member surface yet.
iOS 18.0macOS 15.0

2. Floating-point types

50·33·0
Double
@frozen public struct Double
Mapped to TY_BUILTIN_DOUBLE / native C double; core arithmetic + printing work.
iOS allmacOS all
Float
@frozen public struct Float
Mapped to native float; arithmetic + conversions work (Float.pi OK).
iOS allmacOS all
Float16
@frozen public struct Float16
Name resolves as a Float-backed compatibility alias and simple scalar paths compile; no true half-precision storage, rounding, ABI, or full member surface.
iOS 14.0macOS 11.0
Double.init()
public init()
Zero-init; default value path.
iOS allmacOS all
Double.init(_:) from Int
public init(_ v: Int)
Int→Double conversion lowers to native cast; verified Double(5)==5.0.
iOS allmacOS all
Double.init(_:) from BinaryInteger
public init<Source>(_ value: Source) where Source : BinaryInteger
Generic integer conversions lower to native casts for concrete int types.
iOS allmacOS all
Double.init(exactly:) from BinaryInteger
public init?<Source>(exactly value: Source) where Source : BinaryInteger
Cast-roundtrip exactness is checked for miniswift scalar integer sources (2^53 succeeds, 2^53+1 is nil); UInt64/extreme generic corners remain partial.
iOS allmacOS all
Double.init(_:) from Float/Float16/Double
public init(_ other: Float)/(_ other: Double)/(_ other: Float16)
Float→Double and Double→Double cast OK; Float16 source uses the Float-backed compatibility alias.
iOS all (Float16: 14.0)macOS all (Float16: 11.0)
Double.init(exactly:) from float
public init?(exactly other: Float)/(_:Double)
Finite Float/Double values and infinity return .some; Float/Double NaN returns nil. Float16/edge payload semantics remain partial.
iOS allmacOS all
Double.init(sign:exponent:significand:)
public init(sign: FloatingPointSign, exponent: Int, significand: Double)
Normal finite values lower through a scale/sign helper (.minus, 2, 1.5 -> -6.0 verified); Float/generic and edge semantics remain partial.
iOS allmacOS all
Double.init(signOf:magnitudeOf:)
public init(signOf: Double, magnitudeOf: Double)
Finite Double sign-copy path works (-1.0, 2.5 -> -2.5 verified); NaN/signed-zero edge fidelity remains partial.
iOS allmacOS all
Double.init(bitPattern:)
public init(bitPattern: UInt64)
Common Double bit-pattern reinterprets through IEEE bits (Double(bitPattern: 4611686018427387904) == 2.0 verified); UInt64 edge printing/sign-bit fidelity remains partial.
iOS allmacOS all
Double.bitPattern
public var bitPattern: UInt64 { get }
Double bitPattern returns the raw IEEE payload for normal finite values (1.0 verified); full UInt64/NaN payload display semantics remain partial.
iOS allmacOS all
Double.init(nan:signaling:)
public init(nan payload: Double.RawSignificand, signaling: Bool)
Constructs a quiet NaN for the initializer shape (isNaN verified); payload/signaling distinction is not preserved.
iOS allmacOS all
Double.init(floatLiteral:)/(integerLiteral:)
public init(floatLiteral value: Double)
Typed float literals work; bare untyped literals in arithmetic mis-infer as Int (7.0/2.0 gives 3.0).
iOS allmacOS all
FloatingPoint.+ - * /
static func +/-/*//(lhs: Self, rhs: Self) -> Self
Native fadd/fsub/fmul/fdiv for typed Doubles; untyped literal operands can mis-infer Int (3.0 for 7.0/2.0).
iOS allmacOS all
FloatingPoint.+= -= *= /=
static func +=/-=/*=//=(lhs: inout Self, rhs: Self)
Compound assignment lowers to native in-place float ops.
iOS allmacOS all
FloatingPoint prefix - / negate()
prefix static func -(x: Self) -> Self; mutating func negate()
Negation lowers to native fneg; -(2.0)==-2.0 verified.
iOS allmacOS all
Comparison == != < <= > >=
static func ==/</<=/>/>=(lhs: Self, rhs: Self) -> Bool
Native float compares (IR_EQ/LT/...); used throughout.
iOS allmacOS all
FloatingPoint.magnitude
var magnitude: Self { get }
Lowers to fabs for Float/Double; Float.magnitude verified.
iOS allmacOS all
FloatingPoint.squareRoot()
func squareRoot() -> Self
Lowers to native sqrt(); (2.0).squareRoot()==1.41421 verified.
iOS allmacOS all
FloatingPoint.formSquareRoot()
mutating func formSquareRoot()
In-place square root stores the native sqrt result; var x = 9.0; x.formSquareRoot() verified as 3.0.
iOS allmacOS all
FloatingPoint.addingProduct(_:_:)
func addingProduct(_ lhs: Self, _ rhs: Self) -> Self
Lowers to fma(); (2.0).addingProduct(3,4)==14.0 verified.
iOS allmacOS all
FloatingPoint.addProduct(_:_:)
mutating func addProduct(_ lhs: Self, _ rhs: Self)
In-place fma store; numeric.c addProduct case.
iOS allmacOS all
FloatingPoint.truncatingRemainder(dividingBy:)
func truncatingRemainder(dividingBy other: Self) -> Self
Lowers to fmod(); (5.0).truncatingRemainder(dividingBy:1.5)==0.5 verified.
iOS allmacOS all
FloatingPoint.formTruncatingRemainder(dividingBy:)
mutating func formTruncatingRemainder(dividingBy other: Self)
In-place fmod store works for typed Double; 5.0.formTruncatingRemainder(dividingBy: 1.5) verified as 0.5.
iOS allmacOS all
FloatingPoint.remainder(dividingBy:)
func remainder(dividingBy other: Self) -> Self
Uses IEEE round-to-nearest remainder (remainder() natively; wasm lowers x - nearestEven(x/y) * y); 7.0.remainder(dividingBy: 2.0) == -1.0 verified against real Swift.
iOS allmacOS all
FloatingPoint.formRemainder(dividingBy:)
mutating func formRemainder(dividingBy other: Self)
In-place IEEE remainder store; var x = 7.0; x.formRemainder(dividingBy: 2.0) verified as -1.0 against real Swift.
iOS allmacOS all
FloatingPoint.rounded(_:)
func rounded(_ rule: FloatingPointRoundingRule = .toNearestOrAwayFromZero) -> Self
.up->ceil, .down->floor, .towardZero->trunc, default->round; (3.7).rounded(.down)==3.0 verified. .toNearestOrEven/.awayFromZero fall back to round().
iOS allmacOS all
FloatingPoint.rounded()
func rounded() -> Self
Lowers to round(); (3.7).rounded()==4.0 verified.
iOS allmacOS all
FloatingPoint.round(_:)/round()
mutating func round(_ rule: FloatingPointRoundingRule)
In-place round() stores the rounded result; default, .down, and .towardZero paths verified. .toNearestOrEven/.awayFromZero still share the round() fallback like rounded(_:).
iOS allmacOS all
FloatingPoint.nextUp
var nextUp: Self { get }
Lowers through nextafter; wasm has inline bit-step lowering and native uses C nextafter.
iOS allmacOS all
FloatingPoint.nextDown
var nextDown: Self { get }
Same nextafter path; normal, zero, and infinity-adjacent comparisons verified.
iOS allmacOS all
FloatingPoint.sign
var sign: FloatingPointSign { get }
Finite positive/negative values lower to .plus/.minus ((-5.5).sign verified); signed-zero/NaN edge semantics are shallow.
iOS allmacOS all
FloatingPoint.exponent
var exponent: Self.Exponent { get }
Normal finite Double exponent extracted from IEEE bits (8.0.exponent == 3 verified); zero/subnormal/NaN/infinity edge semantics remain partial.
iOS allmacOS all
FloatingPoint.significand
var significand: Self { get }
Finite normal values lower via x / binade; zero/NaN/infinity edge semantics are not fully modeled.
iOS allmacOS all
FloatingPoint.ulp
var ulp: Self { get }
Finite normal values verified against ulpOfOne; infinity/NaN edge semantics are incomplete.
iOS allmacOS all
FloatingPoint.isFinite
var isFinite: Bool { get }
Lowered as (x-x)==0; (2.0).isFinite==true verified.
iOS allmacOS all
FloatingPoint.isNaN
var isNaN: Bool { get }
Lowered as x != x (IEEE); (2.0).isNaN==false verified.
iOS allmacOS all
FloatingPoint.isInfinite
var isInfinite: Bool { get }
Uses fabs(x)==INFINITY; Double/Float infinity verified.
iOS allmacOS all
FloatingPoint.isZero
var isZero: Bool { get }
Lowered as x==0.0; verified.
iOS allmacOS all
FloatingPoint.isNormal
var isNormal: Bool { get }
Float/Double normal thresholds handled; leastNormalMagnitude verified.
iOS allmacOS all
FloatingPoint.isSubnormal
var isSubnormal: Bool { get }
Float/Double subnormal thresholds handled; leastNonzeroMagnitude and zero cases verified.
iOS allmacOS all
FloatingPoint.isSignalingNaN
var isSignalingNaN: Bool { get }
Quiet NaN returns false; signaling NaN payload distinction is not modeled, so Double.signalingNaN also reports false.
iOS allmacOS all
FloatingPoint.isCanonical
var isCanonical: Bool { get }
Native Float/Double values are treated as canonical; nan cases verified against Swift.
iOS allmacOS all
FloatingPoint.floatingPointClass
var floatingPointClass: FloatingPointClassification { get }
Double classification now lowers to enum tags for common normal/subnormal/infinity/quiet-NaN cases; signaling-NaN and Float/generic fidelity remain partial.
iOS allmacOS all
FloatingPoint.isEqual(to:)/isLess(than:)/isLessThanOrEqualTo(_:)
func isEqual(to:)/isLess(than:)/isLessThanOrEqualTo(_:) -> Bool
Lowered to native IEEE comparisons; finite and NaN predicate cases match Swift in wasm.
iOS allmacOS all
FloatingPoint.isTotallyOrdered(belowOrEqualTo:)
func isTotallyOrdered(belowOrEqualTo other: Self) -> Bool
Non-NaN finite values lower like <=; full IEEE totalOrder NaN/sign-bit ordering is not implemented.
iOS allmacOS all
FloatingPoint.minimum/maximum/minimumMagnitude/maximumMagnitude
static func minimum/maximum/minimumMagnitude/maximumMagnitude(_ x: Self, _ y: Self) -> Self
Generic free-function min/max work; the IEEE static FloatingPoint.minimum/maximum (NaN-handling) variants not specifically lowered.
iOS allmacOS all
FloatingPoint.radix
static var radix: Int { get }
Static radix constant returns 2 for Float/Double; verified.
iOS allmacOS all
FloatingPoint.pi
static var pi: Self { get }
Double.pi and Float.pi both fold to native constant; verified 3.14159.
iOS allmacOS all
FloatingPoint.nan / signalingNaN
static var nan: Self / signalingNaN: Self { get }
quiet/signaling distinction is not modeled, but both produce NaN for Float/Double and isNaN verifies.
iOS allmacOS all
FloatingPoint.infinity
static var infinity: Self { get }
Emits C/WASM infinity safely; Float/Double isInfinite verified.
iOS allmacOS all
FloatingPoint.greatestFiniteMagnitude
static var greatestFiniteMagnitude: Self { get }
Float/Double finite magnitude constants lowered; verified with isFinite.
iOS allmacOS all
FloatingPoint.leastNormalMagnitude / leastNonzeroMagnitude
static var leastNormalMagnitude/leastNonzeroMagnitude: Self { get }
Float/Double min-normal and min-subnormal constants lowered; normal/subnormal checks verified.
iOS allmacOS all
FloatingPoint.ulpOfOne
static var ulpOfOne: Self { get }
Float/Double epsilon constants lowered; positive-value smoke verified.
iOS allmacOS all
BinaryInteger.isMultiple(of:) on float
func isMultiple(of other: Self) -> Bool
Double isMultiple now lowers through quotient truncation and handles finite common cases (6.5.isMultiple(of: 0.5) verified); IEEE edge cases remain partial.
iOS allmacOS all
BinaryFloatingPoint.random(in:) Range
static func random(in range: Range<Self>) -> Self
Lowers to a uniform draw; Double.random(in:0..<1)<1 verified.
iOS allmacOS all
BinaryFloatingPoint.random(in:using:) Range
static func random<T>(in range: Range<Self>, using generator: inout T) -> Self
Concrete using: &rng custom RNG calls consume rng.next() for Double ranges on WASM/native; fully generic/existential RNG witness dispatch remains limited.
iOS allmacOS all
BinaryFloatingPoint.random(in:) ClosedRange
static func random(in range: ClosedRange<Self>) -> Self
Closed-range uniform draw supported like the half-open form.
iOS allmacOS all
BinaryFloatingPoint.random(in:using:) ClosedRange
static func random<T>(in range: ClosedRange<Self>, using generator: inout T) -> Self
Concrete using: &rng custom RNG calls consume rng.next() for Double closed ranges on WASM/native; fully generic/existential RNG witness dispatch remains limited.
iOS allmacOS all
BinaryFloatingPoint.init(_:) from BinaryFloatingPoint
init<Source>(_ value: Source) where Source : BinaryFloatingPoint
Concrete Float<->Double casts work; arbitrary generic source less covered; Float16 is only a Float-backed compatibility alias.
iOS allmacOS all
BinaryFloatingPoint.init(exactly:) from BinaryFloatingPoint
init?<Source>(exactly value: Source) where Source : BinaryFloatingPoint
Concrete Double(exactly:) handles finite values, infinity, and NaN nil; generic Float/Float16 exactness remains shallow.
iOS allmacOS all
BinaryFloatingPoint.init(sign:exponentBitPattern:significandBitPattern:)
init(sign:exponentBitPattern:significandBitPattern:)
Double field assembly works for normal values (+ 1023/0 -> 1.0, - 1024/0 -> -2.0 verified); Float/generic and payload edge semantics remain partial.
iOS allmacOS all
BinaryFloatingPoint.exponentBitCount / significandBitCount
static var exponentBitCount/significandBitCount: Int { get }
Static IEEE layout metadata provided for Double (11/52) and Float (8/23), verified.
iOS allmacOS all
BinaryFloatingPoint.exponentBitPattern / significandBitPattern
var exponentBitPattern: RawExponent / significandBitPattern: RawSignificand { get }
Double and Float raw exponent/significand fields extract from IEEE bits; verified 1.0 and 1.5 cases.
iOS allmacOS all
BinaryFloatingPoint.binade
var binade: Self { get }
Finite normal values lower through an IEEE exponent-bit helper (6.0.binade == 4.0 verified); zero/subnormal/NaN/infinity edge semantics incomplete.
iOS allmacOS all
BinaryFloatingPoint.significandWidth
var significandWidth: Int { get }
Double and Float finite significand width computed from IEEE significand bits; verified 1.0 and 1.5 cases.
iOS allmacOS all
Strideable.distance(to:)/advanced(by:) on Double
func distance(to other: Double) -> Double; func advanced(by amount: Double) -> Double
distance->subtract, advanced->add lowered in numeric.c; used by stride over Double.
iOS allmacOS all
Double.description / debugDescription
var description: String { get }
print() shows values, but formatting differs from Swift (e.g. 4.60718e+18 / shortest-roundtrip not matched).
iOS allmacOS all
Double.init?(_ text: String) LosslessStringConvertible
public init?(_ text: String)
String->Double parsing supported for common decimals; full grammar/edge cases not guaranteed.
iOS allmacOS all
Double : Hashable (hashValue/hash(into:))
var hashValue: Int; func hash(into:)
Hashable conformance accepted; deterministic but not Swift-identical hashing.
iOS allmacOS all
Double : Codable (encode/init(from:))
func encode(to:); init(from:)
Minimal JSON bridge handles numeric encode/decode; not full Codable fidelity.
iOS allmacOS all
abs(_:) global
public func abs<T>(_ x: T) -> T where T : Comparable, T : SignedNumeric
abs(-3.0)==3.0 verified; lowered to fabs for floats.
iOS allmacOS all
min(_:_:)/max(_:_:) global
public func min/max<T>(_ x: T, _ y: T, ...) -> T where T : Comparable
min(2.0,3.0)/max verified; variadic 3+ form also accepted.
iOS allmacOS all
pow(_:_:) (Darwin/C math)
func pow(_ x: Double, _ y: Double) -> Double
Not in stdlib interface (Darwin); BUILTIN_MATH_POW. pow(2,10)==1024.0 verified.
iOS allmacOS all
sin/cos/tan (Darwin/C math)
func sin/cos/tan(_ x: Double) -> Double
Darwin/C math free functions lower through Double builtin calls; sin(0), cos(0), tan(0) verified.
iOS allmacOS all
sqrt(_:) (Darwin/C math)
func sqrt(_ x: Double) -> Double
Free-function sqrt now lowers through the math builtin path; sqrt(16.0)==4.0 verified.
iOS allmacOS all
exp/log/log2/log10 (Darwin/C math)
func exp/log(_ x: Double) -> Double
exp(0.0), log(1.0), log2(8.0), and log10(100.0) verified as Double results.
iOS allmacOS all
floor/ceil/trunc/round (Darwin/C math)
func floor/ceil/trunc/round(_ x: Double) -> Double
Free functions now cast numeric arguments to Double and dispatch to math builtins; floor/ceil/trunc/round verified.
iOS allmacOS all
FloatingPointSign enum
@frozen public enum FloatingPointSign : Int { case plus; case minus }
.plus/.minus enum cases compare correctly, and finite Float/Double .sign values compare against them.
iOS allmacOS all
FloatingPointRoundingRule enum
public enum FloatingPointRoundingRule { case toNearestOrAwayFromZero; .toNearestOrEven; .up; .down; .towardZero; .awayFromZero }
.up/.down/.towardZero recognized by rounded(_:); .toNearestOrEven/.awayFromZero fall back to round().
iOS allmacOS all
FloatingPointClassification enum
@frozen public enum FloatingPointClassification { .signalingNaN, .quietNaN, .negativeInfinity, ... }
Case names lower to stable tags and compare with Double.floatingPointClass; printing/raw enum metadata remains simplified.
iOS allmacOS all

3. String / Substring / Character / Unicode

77·37·12
String.init()
init()
Empty string literal; native runtime.
iOS allmacOS all
String.init(_:Character)
init(_ c: Character)
Single-char string.
iOS allmacOS all
String.init(_:Substring)
init(_ substring: Substring)
__substr_to_string in native runtime.
iOS allmacOS all
String.init(stringLiteral:)
init(stringLiteral: String)
String literal lowering; core path.
iOS allmacOS all
String.init(stringInterpolation:)
init(stringInterpolation: DefaultStringInterpolation)
__str_interp; interpolation + closure-capture supported.
iOS allmacOS all
String.init(_:Unicode.Scalar)
init(_ scalar: Unicode.Scalar)
Scalar-to-string.
iOS allmacOS all
String.init(repeating:count:) (String)
init(repeating: String, count: Int)
__str_repeat is implemented for native + WASM; verified with String literal repeats.
iOS allmacOS all
String.init(repeating:count:) (Character)
init(repeating: Character, count: Int)
Character repeat path verified native + WASM.
iOS allmacOS all
String.init(_:radix:uppercase:)
init<T>(_ value: T, radix: Int = 10, uppercase: Bool = false) where T: BinaryInteger
__str_from_int_radix.
iOS allmacOS all
String.init(_:LosslessStringConvertible)
init<T>(_ value: T) where T: LosslessStringConvertible
__str_from_int/double/bool; common describing path.
iOS allmacOS all
String.init(describing:)
init<Subject>(describing: Subject)
Verified; routes to printer/describing.
iOS allmacOS all
String.init(_:Sequence<Character>)
init<S>(_ s: S) where S.Element == Character
String(arr-of-Char)/reversed path link-fails on native (Array(String)).
iOS allmacOS all
String.init(_:UnicodeScalarView)
init(_ unicodeScalars: String.UnicodeScalarView)
Scalar-view round-trip not fully wired on native.
iOS allmacOS all
String.init(decoding:as:)
init<C,Enc>(decoding: C, as: Enc.Type)
Encoding/codec model not implemented (deep Unicode).
iOS allmacOS all
String.init?(validating:as:)
init?<Enc>(validating: Sequence, as: Enc.Type)
Codec validation not modeled.
iOS 18.0macOS 15.0
String.init(cString:)
init(cString: UnsafePointer<CChar>)
UnsafePointer family unimplemented (gaps.md).
iOS allmacOS all
String.init?(validatingCString:)
init?(validatingCString: UnsafePointer<CChar>)
UnsafePointer/codec; not modeled.
iOS allmacOS all
String.init(unsafeUninitializedCapacity:initializingUTF8With:)
init(unsafeUninitializedCapacity: Int, initializingUTF8With: (UnsafeMutableBufferPointer<UInt8>) throws -> Int) rethrows
Unsafe buffer pointer not modeled.
iOS 14.0macOS 11.0
String.init?(from decoder:) / encode(to:)
init(from: any Decoder) throws; func encode(to: any Encoder) throws
Codable: minimal JSON bridge only (coverage.md).
iOS allmacOS all
String.+ (concat)
static func + (lhs: String, rhs: String) -> String
__str_concat; verified.
iOS allmacOS all
String.+=
static func += (lhs: inout String, rhs: String)
Verified; concat-assign.
iOS allmacOS all
String.count
var count: Int { get }
__str_grapheme_len; grapheme count, verified.
iOS allmacOS all
String.isEmpty
var isEmpty: Bool { get }
Verified.
iOS allmacOS all
String.hasPrefix(_:)
func hasPrefix(_ prefix: String) -> Bool
__str_has_prefix; verified. StringProtocol generic overload also accepted.
iOS allmacOS all
String.hasSuffix(_:)
func hasSuffix(_ suffix: String) -> Bool
__str_has_suffix; verified.
iOS allmacOS all
String.contains(_:) (substring)
func contains(_ other: String) -> Bool
__str_contains substring search, verified. Regex/element overloads differ — see regex rows.
iOS allmacOS all
String.append(_:String)
mutating func append(_ other: String)
Concat-based append.
iOS allmacOS all
String.append(_:Character)
mutating func append(_ c: Character)
Char append via concat.
iOS allmacOS all
String.append(contentsOf:)
mutating func append<S>(contentsOf: S) where S.Element == Character
String/Substring overloads work; arbitrary Character sequence relies on materialization.
iOS allmacOS all
String.insert(_:at:)
mutating func insert(_ newElement: Character, at i: String.Index)
__str_insert (index-based).
iOS allmacOS all
String.insert(contentsOf:at:)
mutating func insert<S>(contentsOf: S, at i: String.Index)
Common collection inserts; full index semantics simplified.
iOS allmacOS all
String.remove(at:)
@discardableResult mutating func remove(at i: String.Index) -> Character
__str_remove_at.
iOS allmacOS all
String.removeSubrange(_:)
mutating func removeSubrange(_ bounds: Range<String.Index>)
__str_remove_range.
iOS allmacOS all
String.removeAll(keepingCapacity:)
mutating func removeAll(keepingCapacity: Bool = false)
__str_remove_all.
iOS allmacOS all
String.removeFirst()/removeLast()/popLast()
mutating func removeFirst() -> Character; removeLast(); popLast() -> Character?
__str_remove_first/last, __str_pop_last.
iOS allmacOS all
String.replaceSubrange(_:with:)
mutating func replaceSubrange<C>(_ subrange: Range<String.Index>, with: C)
__str_replace_subrange.
iOS allmacOS all
String.reserveCapacity(_:)
mutating func reserveCapacity(_ n: Int)
__str_reserve_capacity (storage hint).
iOS allmacOS all
String.subscript(_:Index)
subscript(i: String.Index) -> Character { get }
__str_char_at; index subscript.
iOS allmacOS all
String.subscript(_:Range)
subscript(bounds: Range<Index>) -> Substring { get }
__str_substr; range/partial-range slicing to Substring.
iOS allmacOS all
String.startIndex / endIndex
var startIndex: String.Index; var endIndex: String.Index
Index pair; common path verified.
iOS allmacOS all
String.index(after:)/index(before:)
func index(after: Index) -> Index; func index(before: Index) -> Index
BidirectionalCollection index stepping.
iOS allmacOS all
String.index(_:offsetBy:)
func index(_ i: Index, offsetBy: Int) -> Index
Offset indexing; verified via distance.
iOS allmacOS all
String.index(_:offsetBy:limitedBy:)
func index(_ i: Index, offsetBy: Int, limitedBy: Index) -> Index?
Common path; full limiting edge cases simplified.
iOS allmacOS all
String.distance(from:to:)
func distance(from: Index, to: Index) -> Int
Verified.
iOS allmacOS all
String.firstIndex(of:)/firstIndex(where:)
func firstIndex(of: Character) -> Index?; firstIndex(where:) -> Index?
Native + WASM verified for of: and closure predicates; uses MiniSwift's flat String.Index offset model.
iOS allmacOS all
String.lastIndex(of:)
func lastIndex(of: Character) -> Index?
Native + WASM verified for character lookup.
iOS allmacOS all
String.range(of:)
func range(of: String) -> Range<Index>?
Foundation API; builtin lowering exists, native index materialization limited.
iOS allmacOS all
String.prefix(_:)
func prefix(_ maxLength: Int) -> Substring
__str_prefix/prefix_sub; verified.
iOS allmacOS all
String.suffix(_:)
func suffix(_ maxLength: Int) -> Substring
__str_suffix/suffix_sub; verified.
iOS allmacOS all
String.prefix(while:)
func prefix(while: (Character) -> Bool) -> Substring
Predicate prefix accepted; concrete closure paths only.
iOS allmacOS all
String.dropFirst(_:)/dropLast(_:)
func dropFirst(_ k: Int = 1) -> Substring; dropLast(_ k: Int = 1) -> Substring
__str_drop_first_sub/drop_last_sub; verified.
iOS allmacOS all
String.split(separator:maxSplits:omittingEmptySubsequences:)
func split(separator: Character, maxSplits: Int, omittingEmptySubsequences: Bool) -> [Substring]
__str_split/split_ex; verified.
iOS allmacOS all
String.split(separator:String)
func split(separator: some StringProtocol, ...) -> [Substring]
String-separator split via __str_split_ex.
iOS allmacOS all
String.components(separatedBy:)
func components(separatedBy: String) -> [String]
Foundation API (needs import in real Swift); miniswift provides as builtin.
iOS allmacOS all
Array.joined(separator:) on [String]
func joined(separator: String) -> String
joined() and joined(separator:) lower to native/WASM string-array join helpers; verified on [String].
iOS allmacOS all
String.uppercased()
func uppercased() -> String
__str_uppercased/unicode_upper; verified (Unicode-aware).
iOS allmacOS all
String.lowercased()
func lowercased() -> String
__str_lowercased/unicode_lower; verified.
iOS allmacOS all
String.capitalized
var capitalized: String { get }
Native + WASM ASCII word-capitalization path verified ("miniSWIFT stdLIB" -> "Miniswift Stdlib").
iOS allmacOS all
String.trimmingCharacters(in:)
func trimmingCharacters(in: CharacterSet) -> String
Foundation API; miniswift provides builtin lowering + CharacterSet stub.
iOS allmacOS all
String.replacingOccurrences(of:with:)
func replacingOccurrences(of: String, with: String) -> String
Foundation API; builtin lowering exists.
iOS allmacOS all
String.padding(toLength:withPad:startingAt:)
func padding(toLength: Int, withPad: String, startingAt: Int) -> String
Foundation API; builtin lowering present.
iOS allmacOS all
String.reversed()
func reversed() -> ReversedCollection<...> / [Character]
Concrete string reversal works in native + WASM, including String(s.reversed()); implemented as eager string materialization.
iOS allmacOS all
String.== (Equatable)
static func == (lhs: String, rhs: String) -> Bool
__str_eq/__str_neq; verified.
iOS allmacOS all
String.< (Comparable)
static func < (lhs: String, rhs: String) -> Bool
Native + WASM string comparison operators route through __str_cmp; <, >, <=, >= smoke paths verified.
iOS allmacOS all
String.lexicographicallyPrecedes(_:)
func lexicographicallyPrecedes(_ other: ...) -> Bool
__str_lex_precedes in native runtime.
iOS allmacOS all
String.localizedCompare(_:)/localizedCaseInsensitiveCompare(_:)
func localizedCompare(_:) -> ComparisonResult
ASCII/Unicode-codepoint lexicographic compare and lowercase case-insensitive compare now lower; true locale/ICU collation remains partial.
iOS allmacOS all
String.~= (pattern match)
static func ~= (lhs: String, rhs: Substring) -> Bool
switch-case on strings supported via equality.
iOS allmacOS all
String.hash(into:) / hashValue
func hash(into:); var hashValue: Int { get }
__str_hash (FNV-1a) / Hasher feed.
iOS allmacOS all
String.description / debugDescription
var description: String; var debugDescription: String
Identity / quoted-escaped form.
iOS allmacOS all
String.write(_:) / write(to:)
mutating func write(_ other: String); func write<T>(to: inout T)
TextOutputStream append works for String sinks and nominal sinks with a String stored field; generic witness dispatch remains limited.
iOS allmacOS all
String.unicodeScalars
var unicodeScalars: String.UnicodeScalarView
View + .count (__str_codepoint_count) verified; deep view APIs simplified.
iOS allmacOS all
String.utf8 / UTF8View.count
var utf8: String.UTF8View
.count works (__str_utf8_count); direct byte iteration segfaults on native.
iOS allmacOS all
String.utf16 / UTF16View.count
var utf16: String.UTF16View
.count works (__str_utf16_count); iteration/index APIs simplified.
iOS allmacOS all
String.utf8CString
var utf8CString: ContiguousArray<CChar> { get }
__str_utf8c_string exists; ContiguousArray maps to Array.
iOS allmacOS all
String.makeIterator()/Iterator.next()
func makeIterator() -> String.Iterator; mutating func next() -> Character?
__str_make_iterator; for-in over Characters supported, edge cases rough.
iOS allmacOS all
String.isContiguousUTF8 / makeContiguousUTF8() / withUTF8
var isContiguousUTF8: Bool; mutating func makeContiguousUTF8(); withUTF8(_:)
__str_is_contiguous_utf8 stub returns true; withUTF8 needs unsafe-buffer (missing).
iOS allmacOS all
String.withCString(_:)
func withCString<R>(_ body: (UnsafePointer<Int8>) throws -> R) rethrows -> R
UnsafePointer not modeled (gaps.md).
iOS allmacOS all
String.enumerated()
func enumerated() -> EnumeratedSequence
__str_enumerated.
iOS allmacOS all
String.elementsEqual(_:)
func elementsEqual(_ other:) -> Bool
__str_elements_equal/_seq.
iOS allmacOS all
String.max(_:_:)/min(_:_:)
func max<T:Comparable>(_ x: T, _ y: T) -> T
__str_max/min free-function shims.
iOS allmacOS all
String.contains/firstMatch/wholeMatch/replacing (Regex)
func contains(_: some RegexComponent) -> Bool; firstMatch(of:); wholeMatch(of:); replacing(_:with:)
Regex engine not implemented; stubs/divergent (gaps.md §2).
iOS 16.0macOS 13.0
Substring.init()
init()
Empty substring.
iOS allmacOS all
Substring (StringProtocol surface)
prefix/suffix/dropFirst/count/uppercased/hasPrefix/split etc.
Common ops via SwiftSubstring boundaries; many forwarded to String, full StringProtocol surface incomplete (coverage.md).
iOS allmacOS all
String(_:Substring) / Substring → String
init(_ s: Substring); __substr_to_string
Round-trip in native runtime.
iOS allmacOS all
Substring.subscript/index/startIndex/endIndex
shares String.Index with parent
Index sharing pragmatic; pointer-subscript optimized but not full semantics.
iOS allmacOS all
Substring.base
var base: String { get }
Slice-to-parent mapping simplified.
iOS allmacOS all
Substring.== / < / hash
Equatable/Comparable/Hashable
Equality works; comparison shares String operator gaps on native.
iOS allmacOS all
Character.init(_:Unicode.Scalar)
init(_ content: Unicode.Scalar)
Scalar→Character.
iOS allmacOS all
Character.init(_:String)
init(_ s: String)
Single-grapheme string→Character.
iOS allmacOS all
Character.init(extendedGraphemeClusterLiteral:)
init(extendedGraphemeClusterLiteral: Character)
Character literal lowering.
iOS allmacOS all
Character.== / < / hash
Equatable/Comparable/Hashable
Char compare/equality via single-element string ops.
iOS allmacOS all
Character.description / debugDescription
var description: String; var debugDescription: String
Identity/escaped.
iOS allmacOS all
Character.isASCII
var isASCII: Bool { get }
__str_is_ascii works in wasm and native runtime; verified on Character("A").
iOS allmacOS all
Character.asciiValue
var asciiValue: UInt8? { get }
__str_ascii_value works in wasm and native; optional binding over ASCII verified.
iOS allmacOS all
Character.isLetter
var isLetter: Bool { get }
__str_is_letter wired in wasm and native decoder wrapper; verified.
iOS allmacOS all
Character.isNumber
var isNumber: Bool { get }
__str_is_number wired in wasm and native decoder wrapper; verified.
iOS allmacOS all
Character.isWhitespace
var isWhitespace: Bool { get }
__str_is_whitespace wired in wasm and native decoder wrapper; verified.
iOS allmacOS all
Character.isUppercase / isLowercase
var isUppercase: Bool; var isLowercase: Bool
ASCII cased checks now available in wasm and native; verified.
iOS allmacOS all
Character.isPunctuation / isSymbol
var isPunctuation: Bool; var isSymbol: Bool
ASCII punctuation/symbol checks now available in wasm and native; verified.
iOS allmacOS all
Character.isHexDigit
var isHexDigit: Bool { get }
__str_is_hex_digit wired in wasm and native; verified.
iOS allmacOS all
Character.hexDigitValue
var hexDigitValue: Int? { get }
Hex digit values work in wasm/native for ASCII 0-9/A-F/a-f; invalid nil remains represented as -1.
iOS allmacOS all
Character.wholeNumberValue
var wholeNumberValue: Int? { get }
ASCII digit values work in wasm/native; invalid nil remains represented as -1.
iOS allmacOS all
Character.isWholeNumber / isNewline / isCased / isMathSymbol / isCurrencySymbol
var isWholeNumber/isNewline/isCased/...: Bool
Lowered for common ASCII cases in wasm/native; full Unicode category semantics remain limited.
iOS allmacOS all
Character.uppercased()/lowercased()
func uppercased() -> String; func lowercased() -> String
Routes to String casing (__str_unicode_upper/lower).
iOS allmacOS all
Character.utf8 / utf16 / unicodeScalars
var utf8: UTF8View; var utf16: UTF16View; var unicodeScalars
Views alias String views; counts work, deep iteration limited.
iOS allmacOS all
Character.write(to:)
func write<T>(to: inout T) where T: TextOutputStream
Generic stream target limited.
iOS allmacOS all
Unicode.Scalar.init?(_:UInt32)
init?(_ v: UInt32)
Verified; validates 0...0xD7FF/0xE000...0x10FFFF range.
iOS allmacOS all
Unicode.Scalar.init(_:UInt8) / init?(_:UInt16) / init?(_:Int)
init(_ v: UInt8); init?(_ v: UInt16); init?(_ v: Int)
Integer→scalar conversions.
iOS allmacOS all
Unicode.Scalar.init(unicodeScalarLiteral:)
init(unicodeScalarLiteral: Unicode.Scalar)
Literal lowering.
iOS allmacOS all
Unicode.Scalar.init?(_:String)
init?(_ description: String)
LosslessStringConvertible single-scalar parse; common cases.
iOS allmacOS all
Unicode.Scalar.value
var value: UInt32 { get }
Verified; scalar codepoint.
iOS allmacOS all
Unicode.Scalar.isASCII
var isASCII: Bool { get }
value<128 check derivable; not a dedicated builtin.
iOS allmacOS all
Unicode.Scalar.description / debugDescription
var description: String; var debugDescription: String
description as 1-char string works; escaped debugDescription simplified.
iOS allmacOS all
Unicode.Scalar.escaped(asASCII:)
func escaped(asASCII: Bool) -> String
Literal Unicode.Scalar(...) calls lower to escaped strings for ASCII controls and common non-ASCII/asASCII cases on native and WASM; variable scalars, generic paths, and full escaping coverage remain unmodeled.
iOS allmacOS all
Unicode.Scalar.== / < / hash
Equatable/Comparable/Hashable
Compares on .value.
iOS allmacOS all
Unicode.Scalar.properties
var properties: Unicode.Scalar.Properties { get }
Deep Unicode property DB (isAlphabetic/isDiacritic/etc.) not implemented (coverage.md Full Unicode internals).
iOS allmacOS all
Unicode.Scalar.Properties.*
isAlphabetic/isASCIIHexDigit/isDiacritic/isEmoji/numericValue/name/...: Bool/...
Entire scalar-property family unmodeled.
iOS allmacOS all
Unicode.Scalar.utf8 / utf16 views
var utf8: Unicode.Scalar.UTF8View; var utf16: Unicode.Scalar.UTF16View
Per-scalar encoding views not modeled.
iOS 13.0/allmacOS 10.15/all
Unicode.UTF8/UTF16/UTF32 (UnicodeCodec)
enum Unicode.UTF8: UnicodeCodec; encode/decode/width/...
UnicodeCodec/encoding model not implemented (coverage.md).
iOS allmacOS all
Unicode.ASCII / Unicode.Encoding protocol
enum Unicode.ASCII: Unicode.Encoding
Encoding protocol family decl-only.
iOS allmacOS all
UnicodeDecodingResult
enum UnicodeDecodingResult { case scalarValue/emptyInput/error }
emptyInput/error case values and equality smoke paths lower on native and WASM; associated scalarValue, codec integration, Sendable/BitwiseCopyable fidelity remain unmodeled.
iOS allmacOS all
StringProtocol (protocol)
protocol StringProtocol: BidirectionalCollection, Comparable, ... where Element == Character, Index == String.Index
String/Substring conform structurally; generic-over-StringProtocol code partially lowered, full surface incomplete.
iOS allmacOS all
StringProtocol.hasPrefix(_:)/hasSuffix(_:) (generic)
func hasPrefix<P: StringProtocol>(_ prefix: P) -> Bool
Resolves to String builtins for concrete String/Substring.
iOS allmacOS all
StringProtocol.lowercased()/uppercased()
func lowercased() -> String; func uppercased() -> String
Protocol requirement maps to String casing.
iOS allmacOS all
StringProtocol cross-type == / < / != / <= / >=
static func == <RHS: StringProtocol>(lhs: Self, rhs: RHS) -> Bool
Equality across String/Substring works; ordering shares native __str_cmp gap.
iOS allmacOS all
StringProtocol.utf8/utf16/unicodeScalars (requirements)
var utf8: UTF8View { get }; var utf16; var unicodeScalars
Counts work for concrete types; associated-view generics simplified.
iOS allmacOS all

4. Array / ArraySlice / ContiguousArray

43·24·8
Array.init(arrayLiteral:)
init(arrayLiteral elements: Element...)
Array literals lower to TY_ARRAY construction; core path.
iOS allmacOS all
Array.init()
init()
Empty array; equivalent to [] literal.
iOS allmacOS all
Array.init(_:) from Sequence
init<S>(_ s: S) where Element == S.Element, S: Sequence
Works from ranges/arrays/keys; Array(slice) and Array(ContiguousArray) conversions diverge (garbage), verified.
iOS allmacOS all
Array.init(repeating:count:)
init(repeating repeatedValue: Element, count: Int)
Lowered to repeating-fill array runtime.
iOS allmacOS all
Array.init(unsafeUninitializedCapacity:initializingWith:)
init<E>(unsafeUninitializedCapacity: Int, initializingWith: (inout UnsafeMutableBufferPointer<Element>, inout Int) throws(E) -> Void) throws(E)
UnsafeMutableBufferPointer has no runtime model (gaps.md unsafe memory).
iOS allmacOS all
Array.init(capacity:initializingWith:) / append(addingCapacity:...)
init<E>(capacity: Int, initializingWith: (inout OutputSpan<Element>) throws(E) -> Void)
OutputSpan unsupported; span/output-span families not modeled.
iOS 12.2macOS 10.14.4
Array.init(from:) Decodable
init(from decoder: any Decoder) throws
Decodable only via minimal JSON/plist bridge; not full Decoder protocol.
iOS allmacOS all
Array.append(_:)
mutating func append(_ newElement: Element)
Core mutation; __array append runtime.
iOS allmacOS all
Array.append(contentsOf:)
mutating func append<S>(contentsOf: S) where Element == S.Element, S: Sequence
Handled in array/pt1.c contentsOf path.
iOS allmacOS all
Array.insert(_:at:)
mutating func insert(_ newElement: Element, at i: Int)
array/pt2.c insert; shifts elements.
iOS allmacOS all
Array.insert(contentsOf:at:)
mutating func insert<C>(contentsOf: C, at i: Int) where Element == C.Element, C: Collection
array/pt2.c insert contentsOf branch.
iOS allmacOS all
Array.remove(at:)
@discardableResult mutating func remove(at index: Int) -> Element
Removes and returns; closes gap.
iOS allmacOS all
Array.removeFirst()/removeFirst(_:)
mutating func removeFirst() -> Element; mutating func removeFirst(_ k: Int)
array/pt1.c removeFirst (Collection/RangeReplaceable default).
iOS allmacOS all
Array.removeLast()/removeLast(_:)
mutating func removeLast() -> Element; mutating func removeLast(_ k: Int)
array/pt1.c removeLast.
iOS allmacOS all
Array.popLast()
mutating func popLast() -> Element?
array/pt2.c & pt3.c; returns nil on empty.
iOS allmacOS all
Array.removeAll(keepingCapacity:)
mutating func removeAll(keepingCapacity: Bool = false)
__array_clear_discarding_capacity / keep branch in pt1.c.
iOS allmacOS all
Array.removeAll(where:)
mutating func removeAll(where: (Element) throws -> Bool) rethrows
Predicate removal supported (coverage Array mutation).
iOS allmacOS all
Array.removeSubrange(_:)
mutating func removeSubrange(_ bounds: Range<Int>)
array/pt3.c removeSubrange.
iOS allmacOS all
Array.replaceSubrange(_:with:)
mutating func replaceSubrange<C>(_ subrange: Range<Int>, with: C) where Element == C.Element, C: Collection
array/pt3.c replaceSubrange.
iOS allmacOS all
Array.reserveCapacity(_:)
mutating func reserveCapacity(_ minimumCapacity: Int)
__array_reserve_capacity; capacity is pragmatic but call accepted, verified.
iOS allmacOS all
Array.swapAt(_:_:)
mutating func swapAt(_ i: Int, _ j: Int)
array/pt2.c swapAt.
iOS allmacOS all
Array.subscript(_: Int) get/set
subscript(index: Int) -> Element { get set }
O(1) indexed get/set via collections lowering.
iOS allmacOS all
Array.subscript(_: Range) -> ArraySlice
subscript(bounds: Range<Int>) -> ArraySlice<Element> { get set }
Range slicing, Array(slice) conversion, and range-slice assignment verified.
iOS allmacOS all
Array.count
var count: Int { get }
Core property.
iOS allmacOS all
Array.isEmpty
var isEmpty: Bool { get }
Collection default; supported.
iOS allmacOS all
Array.capacity
var capacity: Int { get }
BUILTIN_ARRAY_CAPACITY exists but growth/storage differs from stdlib; value is pragmatic (>= count).
iOS allmacOS all
Array.underestimatedCount
var underestimatedCount: Int { get }
Equals count for arrays (coverage slicing/query).
iOS allmacOS all
Array.startIndex / endIndex
var startIndex: Int; var endIndex: Int { get }
0 and count; flat zero-indexed mapping.
iOS allmacOS all
Array.indices
var indices: Range<Int> { get }
0..<count range.
iOS allmacOS all
Array.index(after:)/index(before:)
func index(after i: Int) -> Int; func index(before i: Int) -> Int
Integer index arithmetic.
iOS allmacOS all
Array.formIndex(after:)/formIndex(before:)
func formIndex(after i: inout Int); func formIndex(before i: inout Int)
In-out integer index mutation verified for Array/BidirectionalCollection forms.
iOS allmacOS all
Array.index(_:offsetBy:)/index(_:offsetBy:limitedBy:)
func index(_ i: Int, offsetBy: Int) -> Int; ... limitedBy: Int) -> Int?
Index offset arithmetic (coverage slicing/query).
iOS allmacOS all
Array.distance(from:to:)
func distance(from start: Int, to end: Int) -> Int
end - start.
iOS allmacOS all
Array.first / last
var first: Element? { get }; var last: Element? { get }
Collection/BidirectionalCollection; nil on empty.
iOS allmacOS all
Array.firstIndex(of:)/firstIndex(where:)
func firstIndex(of: Element) -> Int?; func firstIndex(where: (Element) -> Bool) -> Int?
array/pt2.c & pt3.c (of: + closure).
iOS allmacOS all
Array.lastIndex(of:)/lastIndex(where:)
func lastIndex(of: Element) -> Int?; func lastIndex(where: (Element) -> Bool) -> Int?
array/pt1.c & pt3.c.
iOS allmacOS all
Array.contains(_:)/contains(where:)
func contains(_ element: Element) -> Bool; func contains(where:) -> Bool
Element contains needs Equatable; where: predicate path supported.
iOS allmacOS all
Array.randomElement()/randomElement(using:)
func randomElement() -> Element?; func randomElement<T: RandomNumberGenerator>(using: inout T) -> Element?
randomElement() works (array/pt2.c); using: custom RNG generator not specially lowered.
iOS allmacOS all
Array.reverse()
mutating func reverse()
In-place reverse (coverage algorithms).
iOS allmacOS all
Array.reversed()
func reversed() -> [Element]
array/pt1.c; materializes reversed array (not lazy ReversedCollection), verified.
iOS allmacOS all
Array.sort()/sort(by:)
mutating func sort(); mutating func sort(by: (Element, Element) -> Bool)
In-place sort; Comparable + by: comparator, verified.
iOS allmacOS all
Array.sorted()/sorted(by:)
func sorted() -> [Element]; func sorted(by:) -> [Element]
array/pt1.c sorted.
iOS allmacOS all
Array.shuffle()/shuffle(using:)
mutating func shuffle(); mutating func shuffle<T: RandomNumberGenerator>(using:)
shuffle() supported; custom RNG using: not specially lowered.
iOS allmacOS all
Array.shuffled()/shuffled(using:)
func shuffled() -> [Element]; func shuffled<T>(using:) -> [Element]
array/pt2.c shuffled(); using: custom RNG not lowered.
iOS allmacOS all
Array.+ (concatenation)
static func + (lhs: [Element], rhs: [Element]) -> [Element]
Concatenation, verified.
iOS allmacOS all
Array.+= (append in place)
static func += (lhs: inout [Element], rhs: [Element])
In-place append, verified.
iOS allmacOS all
Array.== (Equatable)
static func == (lhs: [Element], rhs: [Element]) -> Bool where Element: Equatable
Element-wise equality (coverage comparison helpers).
iOS allmacOS all
Array.hash(into:)/hashValue (Hashable)
func hash(into: inout Hasher); var hashValue: Int where Element: Hashable
Hashable via deterministic hashing for common element types; not full stdlib hashing details.
iOS allmacOS all
Array.description / debugDescription
var description: String; var debugDescription: String { get }
CustomStringConvertible; [a, b, c] formatting.
iOS allmacOS all
Array.customMirror
var customMirror: Mirror { get }
Mirror stubs only; children/reflection shallow (gaps reflection).
iOS allmacOS all
Array.encode(to:) Encodable
func encode(to encoder: any Encoder) throws where Element: Encodable
Only via minimal JSON/plist bridge; not full Encoder protocol.
iOS allmacOS all
Array.withContiguousStorageIfAvailable(_:)
func withContiguousStorageIfAvailable<R>(_ body: (UnsafeBufferPointer<Element>) throws -> R) rethrows -> R?
Calls the body and returns .some(result) for Array-backed storage; buffer is an Array-compatible view, not a true UnsafeBufferPointer/lifetime/ABI model.
iOS allmacOS all
Array.withContiguousMutableStorageIfAvailable(_:)
mutating func withContiguousMutableStorageIfAvailable<R>(_ body: (inout UnsafeMutableBufferPointer<Element>) throws -> R) rethrows -> R?
UnsafeMutableBufferPointer unsupported (gaps unsafe memory).
iOS allmacOS all
Array.withUnsafeBufferPointer(_:)/withUnsafeMutableBufferPointer(_:)
func withUnsafeBufferPointer<R,E>(_ body: (UnsafeBufferPointer<Element>) throws(E) -> R) throws(E) -> R
Buffer pointer families are stubs only (gaps unsafe memory).
iOS allmacOS all
Array.withUnsafeBytes(_:)/withUnsafeMutableBytes(_:)
func withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> R
Raw buffer pointers unsupported (gaps unsafe memory).
iOS allmacOS all
Array.span / mutableSpan
var span: Span<Element> { get }; var mutableSpan: MutableSpan<Element> { mutating get }
Span/MutableSpan not modeled.
iOS 26.0macOS 26.0
Array Sequence/Collection algorithms (map/filter/compactMap/flatMap/reduce/forEach/enumerated/min/max/zip/joined/split/prefix/suffix/drop/allSatisfy/elementsEqual/starts(with:))
e.g. func map<T>(_ transform: (Element) throws -> T) rethrows -> [T]
Broad eager algorithm lowering for arrays (coverage Sequence/Collection algorithms).
iOS allmacOS all
Array.makeIterator()
func makeIterator() -> IndexingIterator<[Element]>
for-in iteration lowered to flat integer loops.
iOS allmacOS all
ArraySlice.init / init(_:) / init(repeating:count:) / init(arrayLiteral:)
init(); init<S: Sequence>(_:); init(repeating:count:); init(arrayLiteral:)
Desugared to TY_ARRAY; constructible but treated as a flat array, not a true shared-index slice.
iOS allmacOS all
ArraySlice.startIndex / endIndex (shared indices)
var startIndex: Int; var endIndex: Int { get }
Real ArraySlice shares parent indices (nonzero startIndex); miniswift flattens to zero-based, so slice indices diverge from stdlib.
iOS allmacOS all
ArraySlice.subscript / count / first / last / isEmpty / indices
subscript(Int)->Element; var count/first/last/isEmpty/indices
count/first/last/iteration work on array range-slices; index base differs from stdlib (zero-based).
iOS allmacOS all
ArraySlice.firstIndex(of:)/lastIndex(of:)/contains
func firstIndex(of:) -> Int?; func contains(_:) -> Bool
Returned indices are zero-based vs stdlib parent-relative (verified: stdlib gives parent index).
iOS allmacOS all
ArraySlice mutation (append/insert/remove/removeFirst/removeLast/popLast/removeSubrange/replaceSubrange/reserveCapacity/swapAt)
RangeReplaceableCollection/MutableCollection requirements
Map onto array mutation runtime; no write-back to a backing parent array (slices are independent flat arrays).
iOS allmacOS all
ArraySlice algorithms (map/filter/reduce/sorted/reversed/sort/shuffle/prefix/suffix/drop/split/joined)
Sequence/Collection algorithm surface
Work via array desugaring (coverage: prefix/suffix/drop/split fully integrated under array mapping).
iOS allmacOS all
ArraySlice.+ / += / == / hashValue / description / capacity
operators, Equatable, Hashable, CustomStringConvertible, var capacity
Inherit Array operator/description/equality behavior via desugaring; same caveats as Array slice path.
iOS allmacOS all
ArraySlice.withUnsafe*/withContiguous*/span
buffer-pointer and span accessors
Buffer/raw/span pointer families unsupported (gaps unsafe memory).
iOS allmacOS all
ArraySlice.encode(to:)/init(from:) (Codable)
Encodable/Decodable conformance
Only via minimal JSON/plist bridge.
iOS allmacOS all
ContiguousArray.init / init(_:) / init(repeating:count:) / init(arrayLiteral:)
init(); init<S: Sequence>(_:); init(repeating:count:); init(arrayLiteral:)
Desugared to TY_ARRAY; literal/append/subscript work (verified), but conversion Array(ContiguousArray) diverges (garbage).
iOS allmacOS all
ContiguousArray.append/append(contentsOf:)/insert/remove/removeFirst/removeLast/popLast/removeSubrange/replaceSubrange/reserveCapacity/swapAt/removeAll
RangeReplaceableCollection/MutableCollection requirements
Mutation maps to array runtime; append/removeLast verified. Not a distinct storage type.
iOS allmacOS all
ContiguousArray.subscript / count / isEmpty / first / last / startIndex / endIndex / indices / capacity
subscript(Int)->Element; query/index properties
Subscript/count verified; zero-based flat mapping like Array.
iOS allmacOS all
ContiguousArray.contains(_:)
func contains(_ element: Element) -> Bool where Element: Equatable
Desugared to Array.contains; Int and String true/false cases verified against Swift.
iOS allmacOS all
ContiguousArray algorithms (map/filter/reduce/sorted/sort/reversed/firstIndex/shuffle/prefix/suffix/drop)
Sequence/Collection algorithm surface
map/reduce/contains verified working via array desugaring; broader algorithm surface still inherits Array caveats.
iOS allmacOS all
ContiguousArray.+ / += / == / hashValue / description / customMirror
operators, Equatable, Hashable, CustomStringConvertible, CustomReflectable
Inherit Array behavior via desugaring; equality/description pragmatic, mirror shallow.
iOS allmacOS all
ContiguousArray.withUnsafe*/withContiguous*/span
buffer-pointer and span accessors
Buffer/raw/span pointer families unsupported (gaps unsafe memory).
iOS allmacOS all
ContiguousArray.encode(to:)/init(from:) (Codable)
Encodable/Decodable conformance
Only via minimal JSON/plist bridge.
iOS allmacOS all

5. Dictionary

28·17·0
Dictionary.init()
init()
Lowered to __dict_create() in ir_lowering/init.c.
iOS allmacOS all
Dictionary.init(minimumCapacity:)
init(minimumCapacity: Int)
Creates empty dict; capacity hint accepted (treated as ordinary create).
iOS allmacOS all
Dictionary.init(dictionaryLiteral:)
init(dictionaryLiteral elements: (Key, Value)...)
Dictionary literals and the explicit Dictionary(dictionaryLiteral:) initializer infer [Key: Value] and lower through the ExpressibleByDictionaryLiteral/runtime dict-set path.
iOS allmacOS all
Dictionary.init(uniqueKeysWithValues:)
init<S>(uniqueKeysWithValues: S) where S.Element == (Key, Value)
Lowered for zip(keys, values) and tuple-array pair sequences; infers [Key: Value], stores non-Int values correctly, and duplicate keys trap like Swift.
iOS allmacOS all
Dictionary.init(_:uniquingKeysWith:)
init<S>(_ keysAndValues: S, uniquingKeysWith combine: (Value, Value) throws -> Value) rethrows
Lowered for pair sequences, with a direct zip(keys, values) path; duplicate keys call the combine closure and inferred [Key: Value] type feeds subscripts.
iOS allmacOS all
Dictionary.init(grouping:by:)
init<S>(grouping values: S, by keyForValue: (S.Element) throws -> Key) rethrows where Value == [S.Element]
Lowered for array sequences into [String: [Element]]; key closure receives the element with its closure environment, sub-arrays are created via __dict_get_or_init_arr, and grouped counts/order are verified native against Swift.
iOS allmacOS all
Dictionary.init(from:)
init(from decoder: any Decoder) throws
Top-level JSONDecoder().decode([String:Int].self, from:) decodes a JSON object smoke path; full Decoder/container semantics, non-string keys, and broad value types remain unmodeled.
iOS allmacOS all
Dictionary.subscript(key:)
subscript(key: Key) -> Value? { get set }
Key get/set including assigning nil to remove; if let optional binding checks __dict_get presence before loading the payload.
iOS allmacOS all
Dictionary.subscript(key:default:)
subscript(key: Key, default: @autoclosure () -> Value) -> Value { get set }
Read returns the fallback without inserting; compound write-back such as counts[k, default: 0] += 1 inserts missing keys and updates existing keys.
iOS allmacOS all
Dictionary.subscript(position:)
subscript(position: Index) -> Element { get }
Reads (key,value) through MiniSwift's Int-backed Dictionary.Index surrogate for tuple-result/index expressions; invalid-index traps and opaque index identity remain shallow.
iOS allmacOS all
Dictionary.updateValue(_:forKey:)
@discardableResult mutating func updateValue(_ value: Value, forKey key: Key) -> Value?
Verified: returns old value or nil; lowered in dict.c.
iOS allmacOS all
Dictionary.removeValue(forKey:)
@discardableResult mutating func removeValue(forKey key: Key) -> Value?
Verified: returns removed value or nil; lowered in dict.c.
iOS allmacOS all
Dictionary.remove(at:)
@discardableResult mutating func remove(at index: Index) -> Element
Removes by MiniSwift's Int-backed Dictionary.Index surrogate and returns a (key,value) tuple; invalid-index trapping and opaque index identity are shallow.
iOS allmacOS all
Dictionary.removeAll(keepingCapacity:)
mutating func removeAll(keepingCapacity: Bool = false)
Verified empties dict; keepingCapacity flag ignored but harmless.
iOS allmacOS all
Dictionary.popFirst()
mutating func popFirst() -> Element?
Lowered via __dict_first + __dict_remove; wasm/native verified for nonempty and empty dictionaries.
iOS allmacOS all
Dictionary.keys
var keys: Dictionary<Key, Value>.Keys { get }
Iterating/Array(d.keys)/count work; Keys view as a full Collection (indices, Equatable ==) is shallow.
iOS all (swift 4.0)macOS all (swift 4.0)
Dictionary.values
var values: Dictionary<Key, Value>.Values
Iterating/reduce over values works; mutable Values view (subscript set, swapAt) not implemented.
iOS all (swift 4.0)macOS all (swift 4.0)
Dictionary.Keys (view type)
struct Keys : Collection, Equatable
Usable as a sequence/Array source; full Collection conformance (startIndex/endIndex/index(after:), subscript, ==) is shallow.
iOS allmacOS all
Dictionary.Values (view type)
struct Values : MutableCollection
Read iteration works; MutableCollection ops (positional subscript set, swapAt) missing.
iOS allmacOS all
Dictionary.Index (view type)
struct Index : Comparable, Hashable
Explicit Dictionary<Key,Value>.Index annotations, comparisons, and hashValue work through MiniSwift's Int-backed surrogate; opaque identity, invalid-index validation, and full view integration remain shallow.
iOS allmacOS all
Dictionary.Iterator
struct Iterator : IteratorProtocol
for-(k,v)-in iteration lowered to runtime walk; verified.
iOS allmacOS all
Dictionary.makeIterator()
func makeIterator() -> Iterator
Backs for-in over (key, value) tuples.
iOS allmacOS all
Dictionary.index(forKey:)
func index(forKey key: Key) -> Index?
Found/missing optional behavior is verified. Native uses MiniSwift's Int-backed dictionary index surrogate; WASM currently preserves presence, while opaque Dictionary.Index and index-based subscript remain shallow.
iOS allmacOS all
Dictionary.index(after:)
func index(after i: Index) -> Index
MiniSwift advances its Int-backed Dictionary.Index surrogate; opaque index identity and invalid-index traps remain shallow.
iOS allmacOS all
Dictionary.formIndex(after:)
func formIndex(after i: inout Index)
Mutates the Int-backed Dictionary.Index surrogate by one step; full opaque index validation is not modeled.
iOS allmacOS all
Dictionary.startIndex / endIndex
var startIndex: Index / var endIndex: Index { get }
Exposed as Int-backed endpoints (0 and count); enough for smoke iteration, but not a real opaque Dictionary.Index.
iOS allmacOS all
Dictionary.count
var count: Int { get }
Runtime __dict_count; verified.
iOS allmacOS all
Dictionary.isEmpty
var isEmpty: Bool { get }
Verified.
iOS allmacOS all
Dictionary.capacity
var capacity: Int { get }
Recognized in dict.c; returns a plausible value (>= count) but not a precise allocated-capacity model.
iOS allmacOS all
Dictionary.reserveCapacity(_:)
mutating func reserveCapacity(_ minimumCapacity: Int)
Accepted as a no-op/hint; verified compiles and runs.
iOS allmacOS all
Dictionary.first
var first: Element? { get }
From Sequence/Collection default; verified returns a (key,value) or nil.
iOS allmacOS all
Dictionary.randomElement()
func randomElement() -> Element?
Lowered in dict.c; verified returns non-nil on non-empty dict.
iOS allmacOS all
Dictionary.mapValues(_:)
func mapValues<T>(_ transform: (Value) throws -> T) rethrows -> [Key : T]
Lowered in dict.c; verified value transform with new value type.
iOS allmacOS all
Dictionary.compactMapValues(_:)
func compactMapValues<T>(_ transform: (Value) throws -> T?) rethrows -> [Key : T]
Lowered with the dictionary value loop; verified native + WASM for optional passthrough transform ([String:Int?][String:Int]).
iOS allmacOS all
Dictionary.filter(_:)
func filter(_ isIncluded: (Element) throws -> Bool) rethrows -> [Key : Value]
Dedicated dictionary filter lowering handles $0.value predicates and returns a new dictionary with matching entries; verified.
iOS all (swift 4.0)macOS all (swift 4.0)
Dictionary.merge(_:uniquingKeysWith:) (sequence)
mutating func merge<S>(_ other: S, uniquingKeysWith combine: (Value, Value) throws -> Value) rethrows
Native dictionary-source merge now calls the combine closure on conflicts; arbitrary Sequence sources and WASM conflict-combine fidelity remain shallow.
iOS allmacOS all
Dictionary.merge(_:uniquingKeysWith:) (dict)
mutating func merge(_ other: [Key : Value], uniquingKeysWith combine: (Value, Value) throws -> Value) rethrows
Verified: m.merge([...]) { _, new in new } updates and inserts; native lowering also calls nontrivial combine closures on conflicts.
iOS allmacOS all
Dictionary.merging(_:uniquingKeysWith:)
func merging(_ other:..., uniquingKeysWith combine: (Value, Value) throws -> Value) rethrows -> [Key : Value]
Non-mutating dictionary merge returns a new dictionary and preserves the original; native lowering also calls nontrivial combine closures on conflicts.
iOS allmacOS all
Dictionary.reduce(_:_:)
func reduce<R>(_ initialResult: R, _ next: (R, Element) -> R) -> R
Verified d.reduce(0){$0 + $1.value}; Sequence default works with (key,value) element.
iOS allmacOS all
Dictionary.contains(where:)
func contains(where predicate: (Element) throws -> Bool) rethrows -> Bool
Dedicated dictionary contains lowering handles tuple-element predicates and verified both false and true paths.
iOS allmacOS all
Dictionary.== (Equatable)
static func == (lhs: [Key : Value], rhs: [Key : Value]) -> Bool
Verified value-equality compare; requires Value: Equatable.
iOS allmacOS all
Dictionary.hash(into:) / hashValue
func hash(into:) ; var hashValue: Int
hashValue returns a deterministic count-based MiniSwift placeholder; hash(into:), key/value mixing, and Swift-compatible seeding remain shallow.
iOS allmacOS all
Dictionary.description / debugDescription
var description: String { get } ; var debugDescription: String
Verified non-empty description via runtime dict-to-string (order may differ from Swift, which is also unordered).
iOS allmacOS all
Dictionary.customMirror
var customMirror: Mirror { get }
Returns a Mirror-typed dictionary value so displayStyle reports dictionary; children/labels remain shallow.
iOS allmacOS all
Dictionary.encode(to:)
func encode(to encoder: any Encoder) throws
Top-level JSONEncoder().encode([String:Int]) emits a JSON object Data payload; full Encoder/container semantics, non-string keys, and broad value types remain unmodeled.
iOS allmacOS all

6. Set / SetAlgebra / OptionSet

51·16·0
Set.init(arrayLiteral:) / Set literal
init(arrayLiteral elements: Element...)
Set literal lowers to __set_create(_str) + __set_insert per element (collections.c)
iOS allmacOS all
Set.init()
init()
empty set; __set_create with elem size, verified
iOS allmacOS all
Set.init(minimumCapacity:)
init(minimumCapacity: Int)
Creates an empty set and applies the capacity hint; verified native + WASM with capacity preservation after inserts.
iOS allmacOS all
Set.init(_:) from Sequence
init<S>(_ sequence: S) where Element == S.Element, S: Sequence
Int Array and integer Range sources are materialized into Set and verified native + WASM; broader sequence/string-WASM sources remain partial.
iOS allmacOS all
Set.init(from:) Decodable
init(from decoder: any Decoder) throws
Set has marker Codable/Decodable conformance and JSONDecoder().decode(Set<Int>.self, from:) top-level JSON array smoke support; existential Decoder/container semantics and broader element coverage remain partial.
iOS allmacOS all
Set.insert(_:)
mutating func insert(_ newMember: Element) -> (inserted: Bool, memberAfterInsert: Element)
Mutation plus (inserted, memberAfterInsert) tuple payload verified native + WASM for concrete Set<Int>.
iOS allmacOS all
Set.update(with:)
mutating func update(with newMember: Element) -> Element?
Inserts new members and returns nil; existing-member update returns the member payload. Verified native + WASM for concrete Set<Int>.
iOS allmacOS all
Set.remove(_:)
mutating func remove(_ member: Element) -> Element?
Removes present members and returns the removed payload; missing members return nil. Verified native + WASM for concrete Set<Int>.
iOS allmacOS all
Set.remove(at:)
mutating func remove(at position: Set<Element>.Index) -> Element
Dense Set index path removes and returns the indexed member; verified native + WASM.
iOS allmacOS all
Set.removeAll(keepingCapacity:)
mutating func removeAll(keepingCapacity: Bool = false)
__set_remove_all, verified empties the set
iOS allmacOS all
Set.removeFirst()
mutating func removeFirst() -> Element
verified: returns a member and decrements count
iOS allmacOS all
Set.popFirst()
mutating func popFirst() -> Element?
Nonempty Set returns a real optional member and removes it; empty Set returns nil. Int Set path verified in wasm/native.
iOS allmacOS all
Set.contains(_:)
func contains(_ member: Element) -> Bool
__set_contains, verified
iOS allmacOS all
Set.count
var count: Int { get }
__set_count, verified
iOS allmacOS all
Set.isEmpty
var isEmpty: Bool { get }
count==0, verified
iOS allmacOS all
Set.first
var first: Element? { get }
verified non-nil for non-empty
iOS allmacOS all
Set.randomElement()
func randomElement() -> Element?
verified returns a member
iOS allmacOS all
Set.capacity
var capacity: Int { get }
Reads the runtime storage capacity, not count; verified native + WASM.
iOS allmacOS all
Set.reserveCapacity(_:)
mutating func reserveCapacity(_ minimumCapacity: Int)
Grows storage when the requested capacity exceeds current capacity and preserves existing elements; verified native + WASM.
iOS allmacOS all
Set.union(_:)
func union<S>(_ other: S) -> Set<Element> where S: Sequence
__set_union; Set arg and array-sequence arg verified native + WASM.
iOS allmacOS all
Set.formUnion(_:)
mutating func formUnion<S>(_ other: S) where S: Sequence
Core Set mutating formUnion stores the union result back; array-sequence arg verified.
iOS allmacOS all
Set.intersection(_:)
func intersection<S>(_ other: S) -> Set<Element> where S: Sequence
__set_intersection; Set arg and array-sequence arg verified native + WASM.
iOS allmacOS all
Set.formIntersection(_:)
mutating func formIntersection<S>(_ other: S) where S: Sequence
Core Set mutating formIntersection verified native + WASM.
iOS allmacOS all
Set.subtracting(_:)
func subtracting<S>(_ other: S) -> Set<Element> where S: Sequence
__set_subtracting; Set arg and array-sequence arg verified native + WASM.
iOS allmacOS all
Set.subtract(_:)
mutating func subtract<S>(_ other: S) where S: Sequence
Core Set mutating subtract stores the subtraction result back; verified native + WASM.
iOS allmacOS all
Set.symmetricDifference(_:)
func symmetricDifference<S>(_ other: S) -> Set<Element> where S: Sequence
__set_symmetric_difference; Set arg and array-sequence arg verified native + WASM.
iOS allmacOS all
Set.formSymmetricDifference(_:)
mutating func formSymmetricDifference<S>(_ other: S) where S: Sequence
Core Set mutating formSymmetricDifference verified native + WASM.
iOS allmacOS all
Set.isSubset(of:)
func isSubset<S>(of: S) -> Bool where S: Sequence / func isSubset(of: Set) -> Bool
__set_is_subset, verified (also drives < operator)
iOS allmacOS all
Set.isStrictSubset(of:)
func isStrictSubset<S>(of: S) -> Bool / func isStrictSubset(of: Set) -> Bool
subset AND not-equal, verified
iOS allmacOS all
Set.isSuperset(of:)
func isSuperset<S>(of: S) -> Bool / func isSuperset(of: Set) -> Bool
__set_is_superset, verified
iOS allmacOS all
Set.isStrictSuperset(of:)
func isStrictSuperset<S>(of: S) -> Bool / func isStrictSuperset(of: Set) -> Bool
superset AND not-equal, verified
iOS allmacOS all
Set.isDisjoint(with:)
func isDisjoint<S>(with: S) -> Bool / func isDisjoint(with: Set) -> Bool
__set_is_disjoint, verified
iOS allmacOS all
Set.== / !=
static func == (lhs: Set, rhs: Set) -> Bool
order-independent element equality, verified
iOS allmacOS all
Set comparison operators (< <= > >=)
static func < / <= / > / >= (Set, Set) -> Bool (strict/subset)
< maps to isSubset path (unary_binary.c, __set_is_subset), verified; strictness/other ops less exercised
iOS allmacOS all
Set.hash(into:) / hashValue
func hash(into:) ; var hashValue: Int
Hashable conformance structurally present; full stdlib hashing details incomplete (coverage.md caveat)
iOS allmacOS all
Set.sorted()
func sorted() -> [Element]
__set_sorted (standard.c), verified
iOS allmacOS all
Set.min() / max()
func min() -> Element? ; func max() -> Element?
Comparable element reduction over set, verified
iOS allmacOS all
Set.filter(_:)
func filter(_ isIncluded: (Element) throws -> Bool) rethrows -> Set<Element>
Dedicated lowering exists and Set<Int>.filter is verified native + WASM; broader element types / throwing closures are not exhaustively checked.
iOS all (swift 4.0)macOS all (swift 4.0)
Set.map(_:)
func map<T>(_ transform: (Element) throws -> T) rethrows -> [T]
Set.map lowering verified native + WASM for scalar elements.
iOS allmacOS all
Set.reduce(_:_:)
func reduce<R>(_ initial: R, _ next: (R, Element) -> R) -> R
Set iteration reduce lowers through __set_count/__set_get_ptr and closure(acc, element), verified native + WASM.
iOS allmacOS all
Set for-in / makeIterator()
func makeIterator() -> Set<Element>.Iterator
for-in over Set lowered via __set_count + __set_get_ptr (for.c), verified
iOS allmacOS all
Set Collection: startIndex/endIndex/subscript/index(after:)/firstIndex(of:)
var startIndex/endIndex: Index; subscript(Index) -> Element; func index(after:); func firstIndex(of:) -> Index?
Dense Set index surface is backed by MiniSwift integer offsets and __set_get_ptr; start/end, index(after:), subscript, and firstIndex(of:) verified native + WASM.
iOS allmacOS all
Set.description / debugDescription
var description: String ; var debugDescription: String
Verified native + WASM for Set<Int> property access and direct print; description uses sorted array formatting and debugDescription wraps it as Set([...]) (Set order remains unspecified).
iOS allmacOS all
Set.customMirror
var customMirror: Mirror { get }
Minimal customMirror/customPlaygroundQuickLook stub returns the standard MiniSwift mirror sentinel; full dynamic reflection children/display style are not modeled.
iOS allmacOS all
Set.encode(to:)
func encode(to encoder: any Encoder) throws
Set has marker Encodable conformance and JSONEncoder().encode(Set<Int>) emits a sorted JSON array Data payload; existential Encoder/container semantics and broader element coverage remain partial.
iOS allmacOS all
SetAlgebra protocol
protocol SetAlgebra<Element> : Equatable, ExpressibleByArrayLiteral
witness/conformance recognized for Set & OptionSet; not a general user-conformable protocol path natively
iOS allmacOS all
SetAlgebra.init()
init()
satisfied for Set/OptionSet; generic protocol-witness dispatch limited
iOS allmacOS all
SetAlgebra.contains(_:)
func contains(_ member: Element) -> Bool
works on concrete Set/OptionSet; no generic over-any-SetAlgebra dispatch
iOS allmacOS all
SetAlgebra.union/intersection/symmetricDifference
func union/intersection/symmetricDifference(_ other: Self) -> Self
Concrete Set and OptionSet bitwise variants verified; generic over-any-SetAlgebra dispatch still limited.
iOS allmacOS all
SetAlgebra.insert/update/remove
mutating func insert(_:) -> (Bool,Element); update(with:) -> Element?; remove(_:) -> Element?
Concrete Set and OptionSet now model tuple/optional return payloads; generic protocol dispatch remains partial.
iOS allmacOS all
SetAlgebra.formUnion/formIntersection/formSymmetricDifference/subtract
mutating func formUnion/formIntersection/formSymmetricDifference/subtract(_ other: Self)
Concrete Set and OptionSet mutating bitwise defaults are wired; generic protocol dispatch remains limited.
iOS allmacOS all
SetAlgebra.subtracting/isSubset/isSuperset/isDisjoint/isEmpty
func subtracting(_:) -> Self; isSubset/isSuperset/isDisjoint(of/with:) -> Bool; var isEmpty
Concrete Set and OptionSet verified; generic SetAlgebra witnesses remain partial.
iOS allmacOS all
SetAlgebra.init(_:) from Sequence
init<S>(_ sequence: S) where S: Sequence, Element == S.Element
Concrete Set works for Int Array and integer Range sources; generic witness path and broader sequence sources remain partial.
iOS allmacOS all
OptionSet protocol
protocol OptionSet : RawRepresentable, SetAlgebra
Concrete OptionSet rawValue + SetAlgebra surface works; generic protocol-witness dispatch remains limited.
iOS allmacOS all
OptionSet.init(rawValue:)
init(rawValue: Self.RawValue)
Memberwise rawValue init synthesized; rawValue read-back verified after literal and mutations.
iOS allmacOS all
OptionSet static option members
static let x = T(rawValue: 1 << n)
Lazy static option members construct through getters and combine correctly.
iOS allmacOS all
OptionSet array-literal init
let s: T = [.a, .b] (ExpressibleByArrayLiteral)
Multi-element bitflag OR-combine verified ([.a, .b].rawValue == 3).
iOS allmacOS all
OptionSet.contains(_:)
func contains(_ member: Self) -> Bool (Element==Self)
bitwise AND test, verified correct
iOS allmacOS all
OptionSet.insert(_:)
mutating func insert(_:) -> (inserted: Bool, memberAfterInsert: Element)
OR-in mutation plus (inserted, memberAfterInsert) tuple payload verified native + WASM.
iOS allmacOS all
OptionSet.remove(_:)
mutating func remove(_ member: Element) -> Element?
Bitclear mutation returns the removed/intersection payload or nil; verified native + WASM.
iOS allmacOS all
OptionSet.update(with:)
mutating func update(with newMember: Element) -> Element?
OR-in mutation returns prior intersection payload or nil; verified native + WASM.
iOS allmacOS all
OptionSet.union(_:)
func union(_ other: Self) -> Self
Bitwise OR default synthesized and verified.
iOS allmacOS all
OptionSet.intersection(_:)
func intersection(_ other: Self) -> Self
Bitwise AND default synthesized and verified.
iOS allmacOS all
OptionSet.symmetricDifference(_:)
func symmetricDifference(_ other: Self) -> Self
Bitwise XOR default synthesized and verified.
iOS allmacOS all
OptionSet.init() (RawValue: FixedWidthInteger)
init() // rawValue == 0
Zero-arg OptionSet init lowers to rawValue 0; [] literal also verified.
iOS allmacOS all
OptionSet.formUnion/formIntersection/formSymmetricDifference
mutating func formUnion/formIntersection/formSymmetricDifference(_ other: Self) (FixedWidthInteger)
Mutating bitwise defaults synthesized and verified.
iOS allmacOS all
OptionSet.isEmpty
var isEmpty: Bool { get }
rawValue == 0 Bool lowering verified.
iOS allmacOS all

7. Optional

15·11·0
Optional (enum)
@frozen enum Optional<Wrapped> : ~Copyable, ~Escapable
Core optional type; lowered as two-slot [tag, value] in irgen. coverage.md ✅.
iOS allmacOS all
Optional.none
case none
Absence case; produced by nil literal. Works in switch/binding.
iOS allmacOS all
Optional.some(_:)
case some(Wrapped)
Presence case; .some(x) and pattern let x? both work.
iOS allmacOS all
Optional.init(nilLiteral:)
init(nilLiteral: ())
ExpressibleByNilLiteral conformance; let x: T? = nil lowers to .none tag.
iOS allmacOS all
Optional.init(_:)
init(_ value: consuming Wrapped)
Wraps a value as .some; implicit value→optional promotion works.
iOS allmacOS all
nil literal binding (if let / guard let)
if let x = opt { } / guard let x = opt else { }
Language feature; optional binding verified working incl. nested. coverage.md ✅.
iOS allmacOS all
Optional chaining (?.)
opt?.member / opt?.method()
Member reads preserve nil vs some(0) and verify struct fields plus String/Array ?.count native/WASM; broader method chains, mutation through chains, and key-path optional chaining remain partial.
iOS allmacOS all
Force unwrap (!)
opt!
Postfix force-unwrap verified (prints wrapped value); traps on nil per language.
iOS allmacOS all
Nil-coalescing ?? (value)
func ?? <T>(optional: consuming T?, defaultValue: @autoclosure () throws -> T) rethrows -> T
Verified: opt ?? default returns wrapped or default. autoclosure lazy eval honored.
iOS allmacOS all
Nil-coalescing ?? (optional)
func ?? <T>(optional: consuming T?, defaultValue: @autoclosure () throws -> T?) rethrows -> T?
Optional-returning overload; T? ?? T? chaining works.
iOS allmacOS all
Optional.map(_:)
func map<E,U>(_ transform: (Wrapped) throws(E) -> U) throws(E) -> U? where U : ~Copyable
Verified: n.map{$0*$0} → Optional(1764). irgen copies returned [tag,value] to two-slot (ir_internal.h:158, var_decl.c:1300).
iOS allmacOS all
Optional.flatMap(_:)
func flatMap<E,U>(_ transform: (Wrapped) throws(E) -> U?) throws(E) -> U? where U : ~Copyable
Verified: returns unwrapped optional (no double-wrap). Same two-slot lowering path.
iOS allmacOS all
Optional.unsafelyUnwrapped
var unsafelyUnwrapped: Wrapped { get }
Primitive Optional value load works (Int? = 9 verified); pointer/string optional payloads remain unreliable.
iOS allmacOS all
Optional.take()
mutating func take() -> Wrapped?
Int? take() returns the current optional and nils the source in wasm/native; pointer/string payloads not covered.
iOS allmacOS all
Optional.== (Equatable)
static func == (lhs: Wrapped?, rhs: Wrapped?) -> Bool where Wrapped : Equatable
Verified: n == 5 → true; both-nil → true; one-nil → false. Implicit value→optional promotion in compare works.
iOS allmacOS all
Optional.== (vs nil literal)
static func == (lhs: borrowing Wrapped?, rhs/lhs: _OptionalNilComparisonType) -> Bool
Verified both sides (opt == nil, nil == opt); works for non-Equatable Wrapped.
iOS allmacOS all
Optional.!= (vs nil literal)
static func != (lhs: borrowing Wrapped?, rhs/lhs: _OptionalNilComparisonType) -> Bool
Both-sides nil inequality; used by if opt != nil.
iOS allmacOS all
Optional.~= (pattern match nil)
static func ~= (lhs: _OptionalNilComparisonType, rhs: borrowing Wrapped?) -> Bool
switch opt { case nil: } verified; case let x?: binding verified. Pattern matching works for non-Equatable Wrapped.
iOS allmacOS all
Optional.hash(into:) / hashValue (Hashable)
func hash(into:) where Wrapped : Hashable; var hashValue: Int
Hashable conformance not separately verified; Optional-as-Dictionary-key/Set untested. Equatable verified, hashing assumed via generic Hashable path.
iOS allmacOS all
Optional.debugDescription
var debugDescription: String { get } (CustomDebugStringConvertible)
Primitive Optional payloads format as Optional(value)/nil in wasm/native. Pointer/string payloads and broader reflection-backed debug output remain shallow.
iOS allmacOS all
Optional description (via String(describing:) / interpolation)
String(describing: opt) / "\(opt)"
String(describing:) works for primitive Optional payloads (Optional(5)/nil verified); interpolation and pointer/string Optional payloads remain partial.
iOS allmacOS all
Optional as Any / existential boxing
opt as Any (e.g. print(opt as Any))
Primitive Optional-as-Any direct print and let boxed: Any = opt as Any storage work by string-boxing Optional(value)/nil; full existential container semantics and non-primitive payloads remain partial.
iOS allmacOS all
Optional.customMirror
var customMirror: Mirror { get } (CustomReflectable)
Minimal customMirror/customPlaygroundQuickLook sentinel returns 0 for Optional; full Mirror children/display style reflection is not modeled.
iOS allmacOS all
Optional.encode(to:) (Encodable)
func encode(to: any Encoder) throws where Wrapped : Encodable
Optional has marker Codable/Encodable conformance and JSONEncoder().encode(Int?) top-level smoke support for some/nil; existential Encoder/container semantics and broad Wrapped coverage remain partial.
iOS allmacOS all
Optional.init(from:) (Decodable)
init(from: any Decoder) throws where Wrapped : Decodable
Optional has marker Codable/Decodable conformance and JSONDecoder().decode(Optional<Int>.self, from:) into an explicit Int? supports numeric/null top-level JSON; full Decoder/container semantics remain partial.
iOS allmacOS all
Optional : Sendable / Copyable / Escapable / BitwiseCopyable
conditional conformances where Wrapped : <protocol>
Marker/ownership conformances; not modeled explicitly but Optional value semantics behave correctly. Concurrency/ownership checking not enforced.
iOS allmacOS all

8. Ranges / Strideable / indexing

54·33·1
Range (type)
@frozen struct Range<Bound> where Bound : Comparable
Half-open range; lowered to register-pair boundaries + flat integer loops (irgen/stmt/for.c).
iOS allmacOS all
Range.init(uncheckedBounds:)
init(uncheckedBounds: (lower: Bound, upper: Bound))
Primary construction path is the ..< operator; bounds stored as register pair.
iOS allmacOS all
Range.init(_:) from ClosedRange
init(_ other: ClosedRange<Bound>) where Bound: Strideable, Stride: SignedInteger
Integer concrete cases lower fine; not a generic runtime conversion.
iOS allmacOS all
Range.lowerBound
let lowerBound: Bound
Field of the register-pair boundary.
iOS allmacOS all
Range.upperBound
let upperBound: Bound
Field of the register-pair boundary.
iOS allmacOS all
Range.contains(_:)
func contains(_ element: Bound) -> Bool
Lowered to lower<=e && e<upper; verified.
iOS allmacOS all
Range.isEmpty
var isEmpty: Bool { get }
lower==upper comparison for integer ranges.
iOS allmacOS all
Range.count
var count: Int { get } (RandomAccessCollection)
upper-lower for integer ranges; verified.
iOS allmacOS all
Range.overlaps(_:)
func overlaps(_ other: Range/ClosedRange<Bound>) -> Bool
dispatch_emit_interval_overlaps (irgen/expr/call/dispatch.c); verified.
iOS allmacOS all
Range.contains(_: Range/ClosedRange)
func contains(_ other: Range/ClosedRange<Bound>) -> Bool
Range/ClosedRange containment lowers through normalized half-open bounds; mixed overloads and empty Range containment verified native + WASM.
iOS allmacOS all
Range.clamped(to:)
func clamped(to limits: Range<Bound>) -> Range<Bound>
Integer Range clamp lowered inline; wasm/native verified for inside, below, and above-limit cases.
iOS allmacOS all
Range.relative(to:)
func relative<C>(to: C) -> Range<Bound> (RangeExpression)
Used implicitly for collection slicing; not exposed as a generic standalone call.
iOS allmacOS all
Range as Sequence/Collection
extension Range: Sequence, Collection, BidirectionalCollection, RandomAccessCollection where Bound: Strideable, Stride: SignedInteger
for-in over integer ranges desugared to flat loops; map etc. work via concrete iterators.
iOS allmacOS all
Range.startIndex / endIndex
var startIndex/endIndex: Bound { get }
Index == Bound; lowered to the boundary registers.
iOS allmacOS all
Range.index(after:)
func index(after i: Bound) -> Bound
i+1 for integer bound.
iOS allmacOS all
Range.index(before:)
func index(before i: Bound) -> Bound
i-1 for integer bound (BidirectionalCollection).
iOS allmacOS all
Range.index(_:offsetBy:)
func index(_ i: Bound, offsetBy n: Int) -> Bound
i+n; O(1) random-access lowering.
iOS allmacOS all
Range.distance(from:to:)
func distance(from: Bound, to: Bound) -> Int
end-start for integer bound.
iOS allmacOS all
Range.indices
var indices: Range<Bound>.Indices { get } (== self)
Indices == Range; integer index walks work, generic Indices object not materialized.
iOS allmacOS all
Range.subscript(position:)
subscript(position: Bound) -> Bound { get }
Returns the index itself; integer case lowered directly.
iOS allmacOS all
Range.subscript(bounds:)
subscript(bounds: Range<Bound>) -> Range<Bound> { get }
Sub-slicing a range works for integer concrete cases.
iOS allmacOS all
Range.== / hashValue / hash(into:)
static func ==; var hashValue; func hash(into:)
Equality of integer ranges works; Hashable conformance not a dedicated runtime path.
iOS allmacOS all
Range.description / debugDescription
var description/debugDescription: String { get }
String interpolation of a range prints lower..<upper; full CustomReflectable mirror absent.
iOS allmacOS all
Range Codable
init(from:) throws / encode(to:) throws where Bound: Codable
Top-level JSONEncoder/JSONDecoder bridge supports Range<Int> as Swift-compatible [lower,upper]; full Decoder/Encoder container semantics and generic Bound coverage remain unmodeled.
iOS allmacOS all
Range.customMirror
var customMirror: Mirror { get }
Minimal customMirror/customPlaygroundQuickLook sentinel returns 0 for Range/ClosedRange; full dynamic reflection children/display style are not modeled.
iOS allmacOS all
ClosedRange (type)
@frozen struct ClosedRange<Bound> where Bound : Comparable
Closed range; register-pair boundaries + flat loops; verified.
iOS allmacOS all
ClosedRange.init(uncheckedBounds:)
init(uncheckedBounds: (lower: Bound, upper: Bound))
Primary construction via ... operator.
iOS allmacOS all
ClosedRange.init(_:) from Range
init(_ other: Range<Bound>) where Bound: Strideable, Stride: SignedInteger
Integer concrete cases only; not a generic runtime conversion.
iOS allmacOS all
ClosedRange.lowerBound / upperBound
let lowerBound/upperBound: Bound
Boundary register fields.
iOS allmacOS all
ClosedRange.contains(_:)
func contains(_ element: Bound) -> Bool
lower<=e && e<=upper; verified (contains(5) on 1...5 == true).
iOS allmacOS all
ClosedRange.isEmpty
var isEmpty: Bool { get } (always false)
Constant false.
iOS allmacOS all
ClosedRange.count
var count: Int { get } (RandomAccessCollection)
upper-lower+1 for integer ranges; verified.
iOS allmacOS all
ClosedRange.overlaps(_:)
func overlaps(_ other: ClosedRange/Range<Bound>) -> Bool
dispatch_emit_interval_overlaps; verified.
iOS allmacOS all
ClosedRange.contains(_: Range/ClosedRange)
func contains(_ other: Range/ClosedRange<Bound>) -> Bool
Range/ClosedRange containment lowers through normalized half-open bounds; mixed overloads and empty Range containment verified native + WASM.
iOS allmacOS all
ClosedRange.clamped(to:)
func clamped(to limits: ClosedRange<Bound>) -> ClosedRange<Bound>
Integer ClosedRange clamp lowered inline; wasm/native verified for inside, below, and above-limit cases.
iOS allmacOS all
ClosedRange.relative(to:)
func relative<C>(to: C) -> Range<Bound>
Used implicitly for slicing; not a standalone generic call.
iOS allmacOS all
ClosedRange as Sequence/Collection
extension ClosedRange: Sequence, Collection, BidirectionalCollection, RandomAccessCollection where Bound: Strideable, Stride: SignedInteger
for-in over 1...n desugars to inclusive flat loops; verified.
iOS allmacOS all
ClosedRange.Index (enum)
enum Index { case pastEnd; case inRange(Bound) }
Inclusive iteration handled by loop lowering; the pastEnd/inRange index object is not materialized.
iOS allmacOS all
ClosedRange.startIndex / endIndex
var startIndex/endIndex: ClosedRange.Index { get }
Loop bounds lowered directly; opaque Index value not exposed.
iOS allmacOS all
ClosedRange.index(after:)/(before:)/(_:offsetBy:)
func index(after/before:)/(_:offsetBy:) -> Index
Walked via loop lowering; standalone Index arithmetic over enum Index not implemented.
iOS allmacOS all
ClosedRange.distance(from:to:)
func distance(from: Index, to: Index) -> Int
Count derivable; generic enum-Index distance not implemented.
iOS allmacOS all
ClosedRange.subscript(position:)
subscript(position: Index) -> Bound { get }
Element access via integer iteration works; opaque-Index subscript not separately implemented.
iOS allmacOS all
ClosedRange.== / Hashable
static func ==; hash(into:); hashValue
Integer-range equality works; full Hashable conformance not a runtime path.
iOS allmacOS all
ClosedRange.description / debugDescription
var description/debugDescription: String
Interpolation prints lower...upper; Mirror/CustomReflectable absent.
iOS allmacOS all
ClosedRange Codable
init(from:) throws / encode(to:) throws where Bound: Codable
Top-level JSONEncoder/JSONDecoder bridge supports ClosedRange<Int> as Swift-compatible [lower,upper]; full Decoder/Encoder container semantics and generic Bound coverage remain unmodeled.
iOS allmacOS all
PartialRangeFrom (type)
@frozen struct PartialRangeFrom<Bound> where Bound : Comparable
Created by postfix ... ; used as a[2...] collection subscript; verified.
iOS allmacOS all
PartialRangeFrom.init(_:)
init(_ lowerBound: Bound)
Stores lower bound; produced by postfix ... operator.
iOS allmacOS all
PartialRangeFrom.lowerBound
let lowerBound: Bound
Stored field.
iOS allmacOS all
PartialRangeFrom.contains(_:)
func contains(_ element: Bound) -> Bool
Standalone lower-bound containment works; 3... contains 5 and rejects 2.
iOS allmacOS all
PartialRangeFrom.relative(to:)
func relative<C>(to: C) -> Range<Bound>
Resolved to concrete a[lower..<endIndex] slice at lowering; verified via a[2...].
iOS allmacOS all
PartialRangeFrom Sequence/Iterator
extension PartialRangeFrom: Sequence; struct Iterator: IteratorProtocol; next()->Bound?
Slicing use works; unbounded infinite iteration over a one-sided range not a supported standalone path.
iOS allmacOS all
PartialRangeFrom Codable
init(from:) throws / encode(to:) throws
Top-level JSONEncoder/JSONDecoder bridge supports PartialRangeFrom<Int> as Swift-compatible [lower]; full Decoder/Encoder container semantics and generic Bound coverage remain unmodeled.
iOS allmacOS all
PartialRangeUpTo (type)
@frozen struct PartialRangeUpTo<Bound> where Bound : Comparable
Created by prefix ..< ; used as a[..<3] subscript; verified.
iOS allmacOS all
PartialRangeUpTo.init(_:)
init(_ upperBound: Bound)
Produced by prefix ..< operator; stores upper bound.
iOS allmacOS all
PartialRangeUpTo.upperBound
let upperBound: Bound
Stored field.
iOS allmacOS all
PartialRangeUpTo.contains(_:)
func contains(_ element: Bound) -> Bool
Standalone upper-bound containment works; ..<5 contains 4 and rejects 5.
iOS allmacOS all
PartialRangeUpTo.relative(to:)
func relative<C>(to: C) -> Range<Bound>
Resolved to startIndex..<upper at lowering; verified via a[..<2].
iOS allmacOS all
PartialRangeUpTo Codable
init(from:) throws / encode(to:) throws
Top-level JSONEncoder/JSONDecoder bridge supports PartialRangeUpTo<Int> as Swift-compatible [upper]; full Decoder/Encoder container semantics and generic Bound coverage remain unmodeled.
iOS allmacOS all
PartialRangeThrough (type)
@frozen struct PartialRangeThrough<Bound> where Bound : Comparable
Created by prefix ... ; used as a[...3] subscript.
iOS allmacOS all
PartialRangeThrough.init(_:)
init(_ upperBound: Bound)
Produced by prefix ... operator; stores upper bound.
iOS allmacOS all
PartialRangeThrough.upperBound
let upperBound: Bound
Stored field.
iOS allmacOS all
PartialRangeThrough.contains(_:)
func contains(_ element: Bound) -> Bool
Standalone inclusive upper-bound containment works; ...5 contains 5 and rejects 6.
iOS allmacOS all
PartialRangeThrough.relative(to:)
func relative<C>(to: C) -> Range<Bound>
Resolved to startIndex..<(upper+1) at lowering.
iOS allmacOS all
PartialRangeThrough Codable
init(from:) throws / encode(to:) throws
Top-level JSONEncoder/JSONDecoder bridge supports PartialRangeThrough<Int> as Swift-compatible [upper]; full Decoder/Encoder container semantics and generic Bound coverage remain unmodeled.
iOS allmacOS all
UnboundedRange (...)
postfix static func ... (_: UnboundedRange_) ; typealias UnboundedRange
a[...] whole-collection slice; commonly works via slice lowering, not a dedicated unbounded-range type.
iOS allmacOS all
operator ... (closed)
static func ... (minimum: Self, maximum: Self) -> ClosedRange<Self> (Comparable)
Builds ClosedRange; lowered to inclusive boundary pair; verified.
iOS allmacOS all
operator ..< (half-open)
static func ..< (minimum: Self, maximum: Self) -> Range<Self> (Comparable)
Builds Range; lowered to half-open boundary pair; verified.
iOS allmacOS all
prefix operator ..<
prefix static func ..< (maximum: Self) -> PartialRangeUpTo<Self>
Builds PartialRangeUpTo; used in slicing; verified.
iOS allmacOS all
prefix operator ...
prefix static func ... (maximum: Self) -> PartialRangeThrough<Self>
Builds PartialRangeThrough; used in slicing.
iOS allmacOS all
postfix operator ...
postfix static func ... (minimum: Self) -> PartialRangeFrom<Self>
Builds PartialRangeFrom; used in a[n...]; verified.
iOS allmacOS all
operator ~= (RangeExpression)
static func ~= (pattern: Self, value: Bound) -> Bool
Pattern match in case/if; verified (0..<10 ~= 7).
iOS allmacOS all
RangeExpression (protocol)
protocol RangeExpression<Bound>; func relative(to:); func contains(_:)
Concrete conformers lower for slicing; protocol not usable as a generic existential/runtime witness.
iOS allmacOS all
Strideable (protocol)
protocol Strideable<Stride>: Comparable; associatedtype Stride: Comparable & SignedNumeric
Accepted as a constraint and maps to native scalar ops; custom-type conformance witnesses not fully supported (coverage.md).
iOS allmacOS all
Strideable.distance(to:)
func distance(to other: Self) -> Self.Stride
Works for built-in numeric types via native subtraction; generic dispatch on user types limited.
iOS allmacOS all
Strideable.advanced(by:)
func advanced(by n: Self.Stride) -> Self
Built-in numerics via native add; generic user-conformer dispatch limited.
iOS allmacOS all
Strideable.< / == (default impls)
static func < / == (x: Self, y: Self) -> Bool
Comparable lowered to native CPU comparisons (coverage.md).
iOS allmacOS all
Strideable +/-/+=/-= (Pointer)
static func +,-,+=,-= where Self: _Pointer
Pointer/Unsafe APIs documented missing (gaps.md).
iOS allmacOS all
stride(from:to:by:)
func stride<T>(from: T, to: T, by: T.Stride) -> StrideTo<T> where T: Strideable
Compiled to register-level loop; verified (sum over stride(0,to:10,by:2)==20).
iOS allmacOS all
stride(from:through:by:)
func stride<T>(from: T, through: T, by: T.Stride) -> StrideThrough<T> where T: Strideable
Inclusive register-level loop; verified (stride(0,through:10,by:5) sums 0+5+10==15).
iOS allmacOS all
StrideTo (type)
@frozen struct StrideTo<Element: Strideable>: Sequence
Materialized only within for-in/stride loops; not exposed as a standalone reusable sequence object.
iOS allmacOS all
StrideTo.makeIterator() / underestimatedCount
func makeIterator() -> StrideToIterator; var underestimatedCount: Int
Iteration fused into the loop; explicit iterator object not generally materialized.
iOS allmacOS all
StrideToIterator.next()
mutating func next() -> Element?
Step logic inlined into loop; standalone iterator stepping limited.
iOS allmacOS all
StrideThrough (type)
@frozen struct StrideThrough<Element: Strideable>: Sequence
Materialized within stride(through:) loops; not a standalone reusable sequence.
iOS allmacOS all
StrideThrough.makeIterator() / underestimatedCount
func makeIterator() -> StrideThroughIterator; var underestimatedCount: Int
Iteration fused into loop; explicit iterator object not generally materialized.
iOS allmacOS all
StrideThroughIterator.next()
mutating func next() -> Element?
Step logic inlined; standalone iterator stepping limited.
iOS allmacOS all
CountableRange / CountableClosedRange / CountablePartialRangeFrom (typealias)
typealias Countable* = Range/ClosedRange/PartialRangeFrom<Bound> where Bound: Strideable, Stride: SignedInteger
Just typealiases to the integer-strideable range conformances already supported.
iOS allmacOS all
Range used as collection subscript
Collection.subscript(bounds: Range<Index>) -> SubSequence
a[1..<3] slicing + iteration verified correct on native (yields 20,30).
iOS allmacOS all
for-in over integer ranges
for i in a..<b / a...b { }
Desugared to flat counting loops in irgen/stmt/for.c; verified.
iOS allmacOS all

9. Sequence / Collection algorithms

59·35·0
IteratorProtocol.next()
mutating func next() -> Element?
next() works inside a concrete custom Sequence in a for-in loop; but protocol-extension algorithms (map/reduce) on a custom type emit unresolved per-type symbols (e.g. Countdown_map) and fail to link.
iOS allmacOS all
IteratorProtocol (associatedtype Element)
associatedtype Element
Accepted by sema; concrete iterator stubs only, no generic iterator model.
iOS allmacOS all
Sequence.makeIterator()
func makeIterator() -> Iterator
Builtins iterate via lowered loops; custom makeIterator supported for direct for-in, not for the generic Sequence extension algorithms.
iOS allmacOS all
Sequence (associatedtypes Element/Iterator)
associatedtype Element; associatedtype Iterator: IteratorProtocol
Structurally accepted; no full generic Sequence witness dispatch — concrete builtins (Array/Set/Dictionary/String) only.
iOS allmacOS all
Sequence.underestimatedCount
var underestimatedCount: Int { get }
Array.underestimatedCount works (== count); not a general witness for custom sequences.
iOS allmacOS all
Sequence.withContiguousStorageIfAvailable(_:)
func withContiguousStorageIfAvailable<R>(_ body: (UnsafeBufferPointer<Element>) throws -> R) rethrows -> R?
Array-backed compatibility lowering calls the body and returns .some(result); buffer is modeled as an Array-compatible view, not a real UnsafeBufferPointer/lifetime/ABI model.
iOS allmacOS all
Sequence.map(_:)
func map<T>(_ transform: (Element) throws -> T) rethrows -> [T]
Verified: array.map lowered to zero-alloc concrete loop; chains with filter.
iOS allmacOS all
Sequence.filter(_:)
func filter(_ isIncluded: (Element) throws -> Bool) rethrows -> [Element]
Verified on arrays; also Dictionary.filter, Set.filter, Substring.filter have dedicated lowerings.
iOS allmacOS all
Sequence.compactMap(_:)
func compactMap<R>(_ transform: (Element) throws -> R?) rethrows -> [R]
Verified: [3,1,2].compactMap{...} returns filtered non-nil array correctly.
iOS allmacOS all
Sequence.flatMap(_:) (sequence-returning)
func flatMap<S: Sequence>(_ transform: (Element) throws -> S) rethrows -> [S.Element]
flatMap{ $0 } over array-of-arrays mis-runs (rc=138/garbage); flatMap{ [$0,$0] } returning a fresh array fails codegen ('too many arguments to function call'). Identity/simple cases unstable.
iOS allmacOS all
Optional.flatMap(_:) / Sequence.flatMap(_:) (optional-returning, deprecated)
func flatMap<R>(_ transform: (Element) throws -> R?) rethrows -> [R]
Use compactMap instead; the optional-returning flatMap shares the unstable closure-return path.
iOS allmacOS all
Sequence.reduce(_:_:)
func reduce<R>(_ initial: R, _ next: (R, Element) throws -> R) rethrows -> R
Verified: [3,1,2].reduce(0,+) == 6; common accumulator types lowered to a loop.
iOS allmacOS all
Sequence.reduce(into:_:)
func reduce<R>(into initial: R, _ update: (inout R, Element) throws -> ()) rethrows -> R
Scalar accumulator works (reduce(into:0){$0+=$1}==6); collection accumulator with append segfaults (rc=139).
iOS allmacOS all
Sequence.forEach(_:)
func forEach(_ body: (Element) throws -> Void) rethrows
Concrete Array, Dictionary, Set, and String forEach paths lower to loops and run closure bodies; capture mutation verified.
iOS allmacOS all
Sequence.allSatisfy(_:)
func allSatisfy(_ predicate: (Element) throws -> Bool) rethrows -> Bool
Verified: [3,1,2].allSatisfy{$0>0}==true via lowered loop.
iOS allmacOS all
Sequence.contains(_:)
func contains(_ element: Element) -> Bool where Element: Equatable
Verified on array; Set/Range/String contains have dedicated lowerings.
iOS allmacOS all
Sequence.contains(where:)
func contains(where: (Element) throws -> Bool) rethrows -> Bool
Verified: [3,1,2].contains(where:{$0>2})==true.
iOS allmacOS all
Sequence.first(where:)
func first(where: (Element) throws -> Bool) rethrows -> Element?
Verified: returns Optional match; lowered loop with early exit.
iOS allmacOS all
Sequence.min() / max()
func min() -> Element? / func max() -> Element? where Element: Comparable
__array_min/__array_max runtime path verified native + WASM for Array/Sequence Int tests.
iOS allmacOS all
Sequence.min(by:) / max(by:)
func min(by: (Element, Element) throws -> Bool) rethrows -> Element?
WASM path is covered by array tests, but native still emits unresolved per-variable symbols such as _a_min for min(by:).
iOS allmacOS all
Sequence.sorted()
func sorted() -> [Element] where Element: Comparable
Verified: [3,1,2].sorted()==[1,2,3].
iOS allmacOS all
Sequence.sorted(by:)
func sorted(by: (Element, Element) throws -> Bool) rethrows -> [Element]
Verified: sorted(by:>)==[3,2,1].
iOS allmacOS all
Sequence.enumerated()
func enumerated() -> EnumeratedSequence<Self>
Works in direct for (i,v) in a.enumerated(); but a.enumerated().map{...} emits unresolved per-var symbol (a_enumerated). No real EnumeratedSequence value type — fused into for-loop lowering.
iOS allmacOS all
Sequence.reversed() (eager)
func reversed() -> [Element]
Verified: array reversed()==reversed array (eager [Element]).
iOS allmacOS all
BidirectionalCollection.reversed()
func reversed() -> ReversedCollection<Self>
Lowered to an eager reversed array; ReversedCollection is not a real lazy wrapper type.
iOS allmacOS all
Sequence.shuffled() / shuffled(using:)
func shuffled() -> [Element]
Verified: shuffled().count preserved; in-place shuffle()/shuffle(using:) also supported (MutableCollection).
iOS allmacOS all
Sequence.joined() (flatten)
func joined() -> FlattenSequence<Self>
String join path works; nested-sequence flatten via FlattenSequence value type is not a real type — only eager/string variants reliable.
iOS allmacOS all
Sequence.joined(separator:) — collection of sequences
func joined<S: Sequence>(separator: S) -> JoinedSequence<Self>
String-element joined(separator:) now works native + WASM; generic JoinedSequence/non-string sequence joining is still not a real value type.
iOS allmacOS all
Sequence.joined(separator:) — to String
func joined(separator: String = "") -> String
Array<String>.joined(separator:) works native + WASM via __str_join_array_sep; empty and non-empty separators verified.
iOS allmacOS all
Sequence.split(separator:maxSplits:omittingEmptySubsequences:)
func split(separator: Element, maxSplits: Int, omittingEmptySubsequences: Bool) -> [SubSequence]
Concrete Array/String separator split now honors maxSplits and omittingEmptySubsequences in native + WASM.
iOS allmacOS all
Sequence.split(maxSplits:omittingEmptySubsequences:whereSeparator:)
func split(maxSplits: Int, omittingEmptySubsequences: Bool, whereSeparator: (Element) throws -> Bool) rethrows -> [SubSequence]
Concrete Array predicate split now lowers through collected separator indices and honors maxSplits / omittingEmptySubsequences; native + WASM verified. String predicate path remains supported.
iOS allmacOS all
Sequence.prefix(_:)
func prefix(_ maxLength: Int) -> [Element] / SubSequence
Verified: [3,1,2].prefix(2)==[3,1].
iOS allmacOS all
Sequence.prefix(while:)
func prefix(while: (Element) throws -> Bool) rethrows -> [Element]
Concrete Array eager path now stops at the first false predicate; verified native + WASM.
iOS allmacOS all
Sequence.suffix(_:)
func suffix(_ maxLength: Int) -> [Element] / SubSequence
Concrete Array/String suffix works native + WASM and clamps counts; generic Sequence/lazy wrapper semantics remain simplified.
iOS allmacOS all
Sequence.dropFirst(_:)
func dropFirst(_ k: Int = 1) -> DropFirstSequence<Self> / SubSequence
Concrete Array/String dropFirst works native + WASM; DropFirstSequence is not materialized as a real wrapper type.
iOS allmacOS all
Sequence.dropLast(_:)
func dropLast(_ k: Int = 1) -> [Element] / SubSequence
Concrete Array/String dropLast works native + WASM and clamps counts; generic wrapper semantics remain simplified.
iOS allmacOS all
Sequence.drop(while:)
func drop(while: (Element) throws -> Bool) rethrows -> DropWhileSequence<Self> / SubSequence
Concrete Array path has limited smoke coverage, but DropWhileSequence is not a real lazy wrapper type.
iOS allmacOS all
Sequence.elementsEqual(_:) / elementsEqual(_:by:)
func elementsEqual<S: Sequence>(_ other: S) -> Bool
Verified: [3,1,2].elementsEqual([3,1,2])==true.
iOS allmacOS all
Sequence.starts(with:) / starts(with:by:)
func starts<P: Sequence>(with possiblePrefix: P) -> Bool
Verified: [3,1,2].starts(with:[3,1])==true.
iOS allmacOS all
Sequence.lexicographicallyPrecedes(_:) / (_:by:)
func lexicographicallyPrecedes<S: Sequence>(_ other: S) -> Bool where Element: Comparable
coverage.md lists lexicographicallyPrecedes among supported eager sequence algorithms.
iOS allmacOS all
Sequence.lazy
var lazy: LazySequence<Self> { get }
.lazy is mostly identity passthrough; lazy.map smoke path exists, but LazySequence/LazyMapSequence/LazyFilterSequence are not real lazy pipeline types (coverage.md/gaps.md).
iOS allmacOS all
Collection.startIndex / endIndex
var startIndex: Index { get }; var endIndex: Index { get }
Array/String use compiler-desugared integer indices; startIndex/endIndex are concrete offsets.
iOS allmacOS all
Collection.subscript(position:)
subscript(position: Index) -> Element { get }
Integer-index subscript get on arrays/strings lowered directly.
iOS allmacOS all
Collection.subscript(bounds:) (range slice)
subscript(bounds: Range<Index>) -> SubSequence { get }
Range/partial-range slicing lowered to flat offset slices; ArraySlice desugared to standard array.
iOS allmacOS all
Collection.count
var count: Int { get }
Verified: array/string/set/dict count via concrete length.
iOS allmacOS all
Collection.isEmpty
var isEmpty: Bool { get }
Verified: count==0 lowering.
iOS allmacOS all
Collection.first
var first: Element? { get }
Verified: array.first returns Optional first element.
iOS allmacOS all
BidirectionalCollection.last
var last: Element? { get }
Verified: array.last returns Optional last element.
iOS allmacOS all
Collection.indices
var indices: Indices { get }
Array.indices works as an integer Range; DefaultIndices generic type is stubbed (coverage.md).
iOS allmacOS all
Collection.index(after:) / formIndex(after:)
func index(after i: Index) -> Index
Array/String index(after:) lowered to integer +1.
iOS allmacOS all
BidirectionalCollection.index(before:) / formIndex(before:)
func index(before i: Index) -> Index
Lowered to integer -1 for arrays/strings.
iOS allmacOS all
Collection.index(_:offsetBy:) / (_:offsetBy:limitedBy:)
func index(_ i: Index, offsetBy d: Int, limitedBy: Index) -> Index?
Integer offset arithmetic for arrays/strings (coverage.md).
iOS allmacOS all
Collection.distance(from:to:)
func distance(from start: Index, to end: Index) -> Int
Integer subtraction lowering for arrays/strings.
iOS allmacOS all
Collection.randomElement() / randomElement(using:)
func randomElement() -> Element?
Verified path; array randomElement supported (coverage.md).
iOS allmacOS all
Collection.firstIndex(of:) / firstIndex(where:)
func firstIndex(of: Element) -> Index? where Element: Equatable
Verified: [3,1,2].firstIndex(of:1)==1; firstIndex(where:) also supported.
iOS allmacOS all
BidirectionalCollection.lastIndex(of:) / lastIndex(where:)
func lastIndex(of: Element) -> Index?
Listed in coverage.md array slicing/query as supported.
iOS allmacOS all
BidirectionalCollection.last(where:)
func last(where: (Element) throws -> Bool) rethrows -> Element?
Paired with lastIndex(where:); supported via reverse scan on arrays.
iOS allmacOS all
Collection.prefix(upTo:) / suffix(from:) / prefix(through:)
func prefix(upTo end: Index) -> SubSequence
coverage.md lists prefix(upTo:)/prefix(through:)/suffix(from:) as supported index-based slices.
iOS allmacOS all
MutableCollection.subscript set
subscript(position: Index) -> Element { get set }
Array element assignment via integer index lowered directly.
iOS allmacOS all
MutableCollection.swapAt(_:_:)
mutating func swapAt(_ i: Index, _ j: Index)
Array swapAt supported (coverage.md array mutation).
iOS allmacOS all
MutableCollection.partition(by:)
mutating func partition(by: (Element) throws -> Bool) rethrows -> Index
Array closure lowering exists and native returns the expected pivot for simple Int predicates. WASM predicate/pivot and true in-place partition semantics remain divergent.
iOS allmacOS all
MutableCollection.sort() / sort(by:) (in-place)
mutating func sort() / mutating func sort(by:)
In-place array sort/sort(by:) supported (coverage.md array algorithms).
iOS allmacOS all
MutableCollection.reverse() (in-place)
mutating func reverse()
In-place array reverse supported (coverage.md).
iOS allmacOS all
MutableCollection.shuffle() / shuffle(using:) (in-place)
mutating func shuffle()
In-place array shuffle supported (coverage.md).
iOS allmacOS all
RangeReplaceableCollection.init()
init()
Empty array literal/init supported.
iOS allmacOS all
RangeReplaceableCollection.init(repeating:count:)
init(repeating: Element, count: Int)
Array(repeating:count:) supported (coverage.md).
iOS allmacOS all
RangeReplaceableCollection.replaceSubrange(_:with:)
mutating func replaceSubrange<C: Collection>(_ subrange: Range<Index>, with: C)
Array.replaceSubrange supported (coverage.md array mutation).
iOS allmacOS all
RangeReplaceableCollection.reserveCapacity(_:)
mutating func reserveCapacity(_ n: Int)
Array.reserveCapacity supported; capacity paths are pragmatic.
iOS allmacOS all
RangeReplaceableCollection.append(_:)
mutating func append(_ newElement: Element)
Array.append supported and verified (used in reduce(into:) test closures).
iOS allmacOS all
RangeReplaceableCollection.append(contentsOf:)
mutating func append<S: Sequence>(contentsOf: S)
Array.append(contentsOf:) supported (coverage.md).
iOS allmacOS all
RangeReplaceableCollection.insert(_:at:) / insert(contentsOf:at:)
mutating func insert(_ newElement: Element, at i: Index)
Array insert/insert(contentsOf:at:) supported (coverage.md).
iOS allmacOS all
RangeReplaceableCollection.remove(at:) / removeSubrange(_:)
mutating func remove(at i: Index) -> Element
Array remove(at:) supported; removeSubrange via replaceSubrange path.
iOS allmacOS all
RangeReplaceableCollection.removeFirst() / removeFirst(_:)
mutating func removeFirst() -> Element
Array removeFirst/removeFirst(_:) supported (coverage.md).
iOS allmacOS all
RangeReplaceableCollection.removeAll(keepingCapacity:) / removeAll(where:)
mutating func removeAll(where: (Element) throws -> Bool) rethrows
Array removeAll/removeAll(where:)/removeAll(keepingCapacity:) supported (coverage.md).
iOS allmacOS all
zip(_:_:)
func zip<S1: Sequence, S2: Sequence>(_ s1: S1, _ s2: S2) -> Zip2Sequence<S1, S2>
Verified: for (x,y) in zip([1,2,3],["p","q"]) works; materializes fused tuple loop (coverage.md).
iOS allmacOS all
Zip2Sequence / Zip2Sequence.Iterator
struct Zip2Sequence<S1, S2>: Sequence
No real value type; zip is fused into for-loop lowering, not a standalone Zip2Sequence object.
iOS allmacOS all
EnumeratedSequence / .Iterator
struct EnumeratedSequence<Base>: Sequence
No real value type; enumerated() fused into for-loop; chaining .map off it fails to link.
iOS allmacOS all
stride(from:to:by:)
func stride<T: Strideable>(from: T, to: T, by: T.Stride) -> StrideTo<T>
Compiled to register-level loop for int/float (coverage.md).
iOS allmacOS all
stride(from:through:by:)
func stride<T: Strideable>(from: T, through: T, by: T.Stride) -> StrideThrough<T>
Compiled to register-level loop for int/float (coverage.md).
iOS allmacOS all
StrideTo / StrideThrough
struct StrideTo<Element: Strideable>: Sequence
Used only as a for-in loop driver; not a standalone materialized sequence value.
iOS allmacOS all
Repeated / repeatElement(_:count:)
struct Repeated<Element>: RandomAccessCollection
repeatElement materializes an eager array-backed collection with count/subscript/iteration support; a distinct stdlib Repeated value type is not modeled.
iOS allmacOS all
CollectionOfOne / EmptyCollection
struct CollectionOfOne<Element>; struct EmptyCollection<Element>
EmptyCollection and CollectionOfOne are verified native + WASM, including Int iteration.
iOS allmacOS all
IndexingIterator
struct IndexingIterator<Elements: Collection>: IteratorProtocol
Default Collection iterator; iteration lowered directly, not a materialized IndexingIterator value.
iOS allmacOS all
DefaultIndices
struct DefaultIndices<Elements: Collection>: Collection
coverage.md: DefaultIndices is stubbed; .indices returns an integer Range instead.
iOS allmacOS all
Slice
struct Slice<Base: Collection>: Collection
Slicing supported via flat integer offsets; the generic Slice<Base> view type is not a true stdlib-equivalent type (ArraySlice desugared to array).
iOS allmacOS all
FlattenSequence / JoinedSequence
struct FlattenSequence<Base>; struct JoinedSequence<Base>
joined()/joined(separator:) lazy types not modeled; only eager/string-join paths (array string-join even link-fails).
iOS allmacOS all
DropFirstSequence / DropWhileSequence / PrefixSequence
struct DropFirstSequence<Base>: Sequence (etc.)
Returned lazy wrapper types are not modeled; drop/prefix lower to eager forms rather than materialized sequence wrappers.
iOS allmacOS all
LazySequence / LazyMapSequence / LazyFilterSequence / LazyCollection
struct LazyMapSequence<Base, Element>: LazySequenceProtocol (etc.)
gaps.md/coverage.md: .lazy is identity passthrough with a lazy.map smoke path; full lazy pipeline wrappers stubbed.
iOS allmacOS all
ReversedCollection
struct ReversedCollection<Base: BidirectionalCollection>
reversed() returns an eager array; ReversedCollection lazy view type not modeled.
iOS allmacOS all
AnySequence / AnyIterator
struct AnySequence<Element>: Sequence; struct AnyIterator<Element>
coverage.md claims zero-overhead desugaring to standard arrays/passthrough constructors; not a real dynamic type-erasing box (gaps: no dynamic wrappers).
iOS allmacOS all
AnyCollection / AnyBidirectionalCollection / AnyRandomAccessCollection
struct AnyCollection<Element>: Collection (etc.)
Desugared to standard arrays at compile time; the dynamic existential collection wrapper is not modeled.
iOS allmacOS all
AnyIndex
struct AnyIndex: Comparable
Index erasure resolved structurally; no real boxed index identity.
iOS allmacOS all
min(_:_:) / min(_:_:_:rest:)
func min<T: Comparable>(_ x: T, _ y: T) -> T
Free min(a,b) lowered to native comparison (coverage.md numerics).
iOS allmacOS all
max(_:_:) / max(_:_:_:rest:)
func max<T: Comparable>(_ x: T, _ y: T) -> T
Free max(a,b) lowered to native comparison; variadic rest form also accepted.
iOS allmacOS all

10. Result / Error / error handling

12·14·1
Result
@frozen enum Result<Success, Failure> where Failure : Error, Success : ~Copyable, Success : ~Escapable
Recognized via type_is_result_inst; {tag,payload} layout. Core enum works; several methods broken (see rows).
iOS allmacOS all
Result.success
case success(Success)
Constructed and switch-matched; verified end-to-end.
iOS allmacOS all
Result.failure
case failure(Failure)
Constructed and switch-matched; verified end-to-end.
iOS allmacOS all
Result.init(catching:)
init(catching body: () throws(Failure) -> Success)
Compiles/runs only with an explicit Result<…> type annotation; result type isn't inferred so if case .success = Result(catching:) fails type-check.
iOS allmacOS all
Result.get()
consuming func get() throws(Failure) -> Success
Simple scalar success and failure paths are verified, including do/catch and try? nil on failure in native/WASM; richer typed-throws payload semantics remain pragmatic.
iOS allmacOS all
Result.map(_:)
func map<NewSuccess>(_ transform: (Success) -> NewSuccess) -> Result<NewSuccess, Failure>
Verified: .success(5).map{$0+1} → .success(6) at runtime.
iOS allmacOS all
Result.mapError(_:)
consuming func mapError<NewFailure>(_ transform: (Failure) -> NewFailure) -> Result<Success, NewFailure>
Simple failure-transform closures lower and success payloads are preserved; closure-context and richer generic failure-type cases remain shallow.
iOS allmacOS all
Result.flatMap(_:)
func flatMap<NewSuccess>(_ transform: (Success) -> Result<NewSuccess, Failure>) -> Result<NewSuccess, Failure>
Closure-arity codegen bug: emitted C calls the transform closure with too few args → clang build error. Does not compile.
iOS allmacOS all
Result.flatMapError(_:)
consuming func flatMapError<NewFailure>(_ transform: (Failure) -> Result<Success, NewFailure>) -> Result<Success, NewFailure>
Simple failure closures returning Result lower in wasm/native; generic specialization remains pragmatic.
iOS allmacOS all
Result.== (Equatable)
static func == (a: Result, b: Result) -> Bool where Success : Equatable, Failure : Equatable
Tag+payload equality now works for simple scalar success and enum failure payloads, including !=; richer generic Equatable witness routing remains shallow.
iOS allmacOS all
Result.hash(into:) / hashValue (Hashable)
func hash(into:) ; var hashValue: Int
hashValue lowers from Result tag/payload for simple payloads (stable and differentiates .success(5)/.success(6)); hash(into:) and full Hashable semantics remain shallow.
iOS allmacOS all
Result : Sendable / Copyable / Escapable
conditional conformances
Marker/ownership protocols not modeled; ~Copyable/~Escapable corners outside scope (gaps.md).
iOS allmacOS all
Error
protocol Error : Sendable
Custom error types conform and flow through throws/try/catch and Result; witness-table stubs (coverage.md Error ✅).
iOS allmacOS all
Error.localizedDescription
var localizedDescription: String { get }
Catch-scope error.localizedDescription returns the MiniSwift default message; Foundation/NSError bridging and custom localized errors are not modeled.
iOS allmacOS all
LocalizedError
protocol LocalizedError : Error { var errorDescription/failureReason/recoverySuggestion/helpText }
Foundation protocol name resolves and default errorDescription/failureReason/recoverySuggestion/helpAnchor lower to nil for enum LocalizedError values; custom property getters and NSError bridging remain unmodeled.
iOS allmacOS all
CustomNSError
protocol CustomNSError : Error { static var errorDomain; var errorCode; var errorUserInfo }
Foundation protocol name resolves and default errorDomain/errorCode/empty errorUserInfo lower for enum conformers; NSError bridging/custom overrides remain unmodeled.
iOS allmacOS all
RecoverableError
protocol RecoverableError : Error { var recoveryOptions; func attemptRecovery(...) }
Foundation protocol name resolves; concrete conformers can expose recoveryOptions and synchronous attemptRecovery(optionIndex:) on native/WASM. Protocol witness dispatch, NSError bridging, and default async handler forwarding remain unmodeled.
iOS allmacOS all
throw / try / catch
throw expr; try expr; do { } catch { }
Language core (coverage.md ✅): clean throws→catch mapping, native CFG try lowering (codegen/cfg/try_plain.c).
iOS allmacOS all
try? (optional-try)
try? expr → Optional
Lowered to malloc'd [tag,value] optional pair (literals.c AST_TRY_EXPR).
iOS allmacOS all
try! (force-try)
try! expr
Language core throws path; traps on error like other force operations.
iOS allmacOS all
throws / typed throws
func f() throws ; func f() throws(E)
throws supported; typed-throws (throws(E)) payload/propagation is pragmatic per coverage.md ('error payload/typed throws semantics are pragmatic').
iOS allmacOS all
rethrows
func f(_ body: () throws -> T) rethrows -> T
Accepted as a throws-forwarding annotation; no distinct rethrows checking — behaves like throws.
iOS allmacOS all
fatalError(_:file:line:)
func fatalError(_ message: @autoclosure () -> String = "", file: StaticString = #file, line: UInt = #line) -> Never
Direct C-runtime trap (coverage.md Reflection ✅); StaticString file/line via compile-time interning.
iOS allmacOS all
precondition(_:_:file:line:)
func precondition(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = "", file:line:)
Direct C-runtime branching trap (coverage.md ✅).
iOS allmacOS all
preconditionFailure(_:file:line:)
func preconditionFailure(_ message: @autoclosure () -> String = "", file:line:) -> Never
Unconditional trap; Never return (coverage.md ✅).
iOS allmacOS all
assert(_:_:file:line:)
func assert(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = "", file:line:)
Debug-build assertion trap (coverage.md Reflection ✅).
iOS allmacOS all
assertionFailure(_:file:line:)
@inlinable func assertionFailure(_ message: @autoclosure () -> String = "", file:line:)
Debug-only failure trap (coverage.md ✅).
iOS allmacOS all

11. Core protocols & conformance synthesis

28·31·4
Equatable
protocol Equatable { static func == (lhs: Self, rhs: Self) -> Bool }
Memberwise == synthesis for structs/enums in gen_decl.c (Ch23); verified end-to-end on native (a==b correct).
iOS allmacOS all
Equatable.==(_:_:)
static func == (lhs: Self, rhs: Self) -> Bool
Sole requirement; synthesized or user-supplied; lowered in unary_binary.c.
iOS allmacOS all
Equatable.!=(_:_:)
static func != (lhs: Self, rhs: Self) -> Bool
Default extension impl (negation of ==); works for all conformers.
iOS allmacOS all
Hashable
protocol Hashable : Equatable { var hashValue: Int { get }; func hash(into:) }
Synthesis hook exists (gen_decl.c Ch23) and builtin hashValue stubs (conformance.c); but custom struct used as Dict/Set key compiles yet returns WRONG results on native backend.
iOS allmacOS all
Hashable.hash(into:)
func hash(into hasher: inout Hasher)
Synthesized stub combining Int fields; native key-hashing for custom structs diverges (Set.contains returns false).
iOS allmacOS all
Hashable.hashValue
var hashValue: Int { get }
Builtin hashValue witnesses exist for Int/String/Bool/Double; custom-type hashValue synthesis present but native dict/set integration broken.
iOS allmacOS all
Hasher
@frozen struct Hasher
Type accepted by sema; standalone Hasher().combine/finalize now works for scalar payload smoke tests, but hashing is deterministic MiniSwift-only and not Swift-identical.
iOS allmacOS all
Hasher.init()
init()
Constructed in wasm/native; state is a small runtime box rather than Swift's real keyed hasher.
iOS allmacOS all
Hasher.combine(_:)
mutating func combine<H>(_ value: H) where H : Hashable
Scalar combine works in wasm/native smoke tests. Generic Hashable routing, string-content hashing, and stdlib-compatible seeding remain incomplete.
iOS allmacOS all
Hasher.combine(bytes:)
mutating func combine(bytes: UnsafeRawBufferPointer)
Depends on UnsafeRawBufferPointer (documented missing in gaps.md) plus no hasher runtime.
iOS allmacOS all
Hasher.finalize()
func finalize() -> Int
Returns a deterministic MiniSwift hash in wasm/native; not Swift-compatible and not connected to full generic Hashable witness routing.
iOS allmacOS all
Comparable
protocol Comparable : Equatable { static func < / <= / > / >= }
< synthesis (lexicographic) in gen_decl.c Ch23; verified a<b correct on native.
iOS allmacOS all
Comparable.<(_:_:)
static func < (lhs: Self, rhs: Self) -> Bool
Only true requirement; user or synthesized; native scalar/lexicographic compare.
iOS allmacOS all
Comparable.<=/>/>= (defaults)
static func <= / > / >= (lhs: Self, rhs: Self) -> Bool
Default extension impls derived from <; lowered via unary_binary.c.
iOS allmacOS all
CaseIterable
protocol CaseIterable { static var allCases: AllCases { get } }
Sema/conformance accepted; Color.allCases.count fails native C codegen (int64_t = void* boxing bug on enum allCases elements). WASM path claims full.
iOS allmacOS all
CaseIterable.allCases
static var allCases: Self.AllCases { get }
Synthesized array of cases; native lowering emits __ac_elem boxing that fails to compile for the practical print/iterate paths.
iOS allmacOS all
RawRepresentable
protocol RawRepresentable<RawValue> { init?(rawValue:); var rawValue }
init?(rawValue:) synthesis in enum_helpers.c (Ch14); but enum .rawValue (Int & String) hits native C codegen boxing bug (__rv_* void*→int64_t) for even let r = N.a.rawValue.
iOS allmacOS all
RawRepresentable.init?(rawValue:)
init?(rawValue: Self.RawValue)
Synthesized for raw-typed enums; if-let path also fails native codegen in current build.
iOS allmacOS all
RawRepresentable.rawValue
var rawValue: Self.RawValue { get }
Stored case value; native lowering of accessing rawValue triggers void*→int64_t conversion error; works on WASM per coverage.md.
iOS allmacOS all
Identifiable
protocol Identifiable<ID> { associatedtype ID: Hashable; var id: ID { get } }
@available(iOS 13/macOS 10.15). id property structurally bound/synthesized (computed getter); coverage.md Protocols row ✅.
iOS 13.0macOS 10.15
Identifiable.id
var id: Self.ID { get }
Ordinary stored/computed id wired via member access; AnyObject default (ObjectIdentifier) shallow.
iOS 13.0macOS 10.15
Identifiable.id (AnyObject default)
extension Identifiable where Self: AnyObject { var id: ObjectIdentifier }
ObjectIdentifier-based default identity not fully modeled; ObjectIdentifier runtime is shallow.
iOS 13.0macOS 10.15
CustomStringConvertible
protocol CustomStringConvertible { var description: String { get } }
description synthesis in gen_decl.c Ch23; user description verified printed correctly on native ('(1,2)').
iOS allmacOS all
CustomStringConvertible.description
var description: String { get }
Used by print()/String(describing:); computed-property witness honored; default returns type name.
iOS allmacOS all
CustomDebugStringConvertible
protocol CustomDebugStringConvertible { var debugDescription: String { get } }
Recognized; debugPrint/dump exist (coverage.md), but full String(reflecting:) routing to custom debugDescription is shallow.
iOS allmacOS all
CustomDebugStringConvertible.debugDescription
var debugDescription: String { get }
Honored where computed property is present; reflection-driven fallback not Apple-equivalent.
iOS allmacOS all
LosslessStringConvertible
protocol LosslessStringConvertible : CustomStringConvertible { init?(_ description: String) }
Int("123")/Double("2.5")/Bool("true") parsing init?(_:) work on builtins; generic user-type conformance witness not specially synthesized.
iOS allmacOS all
LosslessStringConvertible.init?(_:)
init?(_ description: String)
Built-in numeric/Bool string parsers implemented; arbitrary conformers rely on user code.
iOS allmacOS all
ExpressibleByIntegerLiteral
protocol { associatedtype IntegerLiteralType; init(integerLiteral:) }
Core language literal: integer literals lower to Int/Double directly; ubiquitous in tests.
iOS allmacOS all
ExpressibleByFloatLiteral
protocol { associatedtype FloatLiteralType; init(floatLiteral:) }
Float/Double literals lowered natively (let d: Double = 3.14 works).
iOS allmacOS all
ExpressibleByBooleanLiteral
protocol { associatedtype BooleanLiteralType; init(booleanLiteral:) }
true/false literals are core; Bool fully supported (coverage.md Bool ✅).
iOS allmacOS all
ExpressibleByStringLiteral
protocol : ExpressibleByExtendedGraphemeClusterLiteral { init(stringLiteral:) }
String literals core; String fully supported including interpolation.
iOS allmacOS all
ExpressibleByStringInterpolation
protocol : ExpressibleByStringLiteral { init(stringInterpolation:) }
String interpolation lowered (DefaultStringInterpolation); \(expr) works including closure-capture path (see combine-irgen).
iOS allmacOS all
ExpressibleByExtendedGraphemeClusterLiteral
protocol : ExpressibleByUnicodeScalarLiteral { init(extendedGraphemeClusterLiteral:) }
String/Character literal init paths work; full grapheme-cluster literal protocol surface for custom conformers not modeled.
iOS allmacOS all
ExpressibleByUnicodeScalarLiteral
protocol { init(unicodeScalarLiteral:) }
Character/Unicode.Scalar literal smoke paths only; deep Unicode.Scalar APIs missing (gaps/coverage).
iOS allmacOS all
ExpressibleByArrayLiteral
protocol { associatedtype ArrayLiteralElement; init(arrayLiteral:) }
Array/Set literals lowered to concrete collections ([1,2,3] works); custom conformers not synthesized but builtins full.
iOS allmacOS all
ExpressibleByDictionaryLiteral
protocol { associatedtypes Key,Value; init(dictionaryLiteral:) }
Dictionary literals (incl. [:]) lowered to runtime dict; KeyValuePairs supported (coverage.md).
iOS allmacOS all
ExpressibleByNilLiteral
protocol : ~Copyable, ~Escapable { init(nilLiteral: ()) }
nil literal core to Optional; Optional fully supported (let opt: Int? = nil).
iOS allmacOS all
AdditiveArithmetic
protocol : Equatable { static var zero; +; +=; -; -= }
Constraint accepted; maps straight to native scalar add/sub for Int/Double families (coverage.md numeric ✅).
iOS allmacOS all
AdditiveArithmetic.zero
static var zero: Self { get }
Resolves to 0 for built-in numerics; default impl for ExpressibleByIntegerLiteral conformers.
iOS allmacOS all
AdditiveArithmetic.+/-/+=/-=
static func +/-/+=/-= (...)
Lowered to CPU-native arithmetic in unary_binary.c; unary prefix + also present.
iOS allmacOS all
Numeric
protocol : AdditiveArithmetic, ExpressibleByIntegerLiteral { init?(exactly:); var magnitude; *; *= }
Constraint accepted; * and integer-literal init map to native ops; coverage.md numerics ✅.
iOS allmacOS all
Numeric.init?(exactly:)
init?<T>(exactly source: T) where T : BinaryInteger
Common fixed-width init(exactly:) conversions present; full overflow-reporting/exactness across all integer types limited (coverage.md caveat).
iOS allmacOS all
Numeric.magnitude
var magnitude: Self.Magnitude { get }
abs/magnitude for common numerics work; full Magnitude associatedtype modeling shallow.
iOS allmacOS all
Numeric.*/*=
static func * / *= (lhs: Self, rhs: Self)
Native multiply lowering.
iOS allmacOS all
SignedNumeric
protocol : Numeric { prefix static func -; mutating func negate() }
Unary minus lowered to native negate; constraint accepted for signed Int/Double.
iOS allmacOS all
SignedNumeric.-(prefix)
prefix static func - (operand: Self) -> Self
Native negation; default extension impl supplied.
iOS allmacOS all
SignedNumeric.negate()
mutating func negate()
In-place negation verified for Int and Double through numeric protocol tests.
iOS allmacOS all
Strideable
protocol<Stride> : Comparable { func distance(to:); func advanced(by:) }
Underpins stride()/ranges; stride(from:to/through:by:) lowered to flat loops (for.c); coverage.md ranges ✅.
iOS allmacOS all
Strideable.distance(to:)
func distance(to other: Self) -> Self.Stride
Used implicitly in range/stride lowering; generic user Strideable conformance witness shallow.
iOS allmacOS all
Strideable.advanced(by:)
func advanced(by n: Self.Stride) -> Self
Implicit in stride loops; explicit generic advanced(by:) on custom types not specially modeled.
iOS allmacOS all
Strideable.</== (defaults)
static func < / == (x: Self, y: Self) -> Bool
Default Comparable/Equatable impls via distance; native compare for numerics.
iOS allmacOS all
Encodable
protocol Encodable { func encode(to encoder: any Encoder) throws }
Synthesized encodeJSON hook (gen_decl.c Ch25) + JSONEncoder lowering (init.c), but native binary link fails (_JSONEncoder undefined). WASM/Foundation JSON bridge per coverage.md.
iOS allmacOS all
Encodable.encode(to:)
func encode(to encoder: any Encoder) throws
Synthesized to JSON-string emission, not a real Encoder/keyed-container model; native link incomplete.
iOS allmacOS all
Decodable
protocol Decodable { init(from decoder: any Decoder) throws }
Synthesized decodeJSON hook (gen_decl.c Ch25b) + JSONDecoder.decode lowering; native link fails (_JSONEncoder/JSONDecoder). Foundation/WASM-only practical path.
iOS allmacOS all
Decodable.init(from:)
init(from decoder: any Decoder) throws
Synthesized from JSON string, no real Decoder/container hierarchy; native link incomplete.
iOS allmacOS all
Codable
typealias Codable = Decodable & Encodable
Registered protocol (plugin.c/conformance_table.c); minimal JSON encode/decode synthesis exists but native roundtrip currently link-fails; bypasses full container model (coverage.md).
iOS allmacOS all
CodingKey
protocol : CustomDebug/StringConvertible, Sendable { var stringValue; init?(stringValue:); var intValue; init?(intValue:) }
Custom struct conformers compile and expose string-key smoke paths; synthesized CodingKeys enum routing, generic container lookup, and default description/debugDescription remain unmodeled.
iOS allmacOS all
CodingKey.stringValue / intValue
var stringValue: String { get }; var intValue: Int? { get }
Concrete custom CodingKey structs can read stringValue and nil intValue; enum raw-value backed CodingKeys and integer payload semantics remain shallow.
iOS allmacOS all
CodingKey.init?(stringValue:) / init?(intValue:)
init?(stringValue:); init?(intValue:)
Concrete custom CodingKey init?(stringValue:) works in native/WASM smoke tests; init?(intValue:) is accepted for conformance but non-nil integer-key payloads are not stable.
iOS allmacOS all
Encoder / Decoder
protocol Encoder { ... }; protocol Decoder { ... }
Container-based encoder/decoder protocols are declaration-only; miniswift synthesizes direct JSON strings instead of a real Encoder/Decoder model.
iOS allmacOS all
KeyedEncoding/DecodingContainer, SingleValue*Container, UnkeyedContainer
protocol KeyedEncodingContainerProtocol { ... } (+ decoding/single/unkeyed)
Coding container protocol family declaration-only; no native container runtime.
iOS allmacOS all
CodingUserInfoKey
struct CodingUserInfoKey : RawRepresentable, Hashable, Sendable { init?(rawValue: String) }
Declared in interface; no native model (userInfo not threaded through synthesized JSON path).
iOS allmacOS all

12. Concurrency

3·22·36
async (function decl)
func f() async -> T
Parsed + lowered as a SYNCHRONOUS call (single-thread model); async fns run inline, return value directly. No real suspension/scheduler. coverage.md Concurrency 🟡.
iOS all (lang; runtime types iOS 13.0)macOS all (lang; runtime types macOS 10.15)
await (expression)
await expr
AST_AWAIT_EXPR in irgen/expr/literals.c: emits a no-op __swift_task_await marker around a direct synchronous call; value flows through. Verified compiles+runs.
iOS all (lang)macOS all (lang)
async let
async let x = expr
var_decl.c is_async_let path: evaluated eagerly/synchronously at binding; later await x reads the value. No concurrent execution. Verified compiles+runs.
iOS all (lang)macOS all (lang)
async throws / try await
func f() async throws; try await f()
literals.c injects _error_out arg for async-throws callees and routes through normal throws lowering; synchronous. Verified path exists.
iOS all (lang)macOS all (lang)
actor (decl + isolation)
actor A { ... }
class/actor.c: reuses class model; isolated methods wrapped with __actor_acquire/__actor_release (recursive pthread mutex in actor_rt.c). init + nonisolated skip lock. No async hop/reentrancy/executor. Verified compiles+runs.
iOS 13.0macOS 10.15
nonisolated
nonisolated func m()
MOD_NONISOLATED recognized; such methods skip the actor lock (actor.c). Marker honored structurally only.
iOS all (lang)macOS all (lang)
await actor.method() / .property
await a.m()
Cross-isolation call: literals.c routes member call through normal dispatch; acquire/access/release via actor_rt lock. Verified compiles+runs (conc_actorcall).
iOS 13.0macOS 10.15
Task.init { }
init(priority:operation:)
closure.c Task{} → __swift_task_create(fn,env): runs the closure EAGERLY now, stores result in a bump/handle. priority ignored. Verified compiles+runs.
iOS 13.0macOS 10.15
Task.value
var value: Success { get async throws }
Maps to __swift_task_result on the handle holding the already-computed result. No real wait. Verified compiles+runs (conc_task).
iOS 13.0macOS 10.15
Task.result
var result: Result<Success,Failure> { get async }
No Result<> wrapping of task outcome; only raw .value via __swift_task_result. Not lowered.
iOS 13.0macOS 10.15
Task.detached { }
static func detached(priority:operation:) -> Task
closure.c is_detached → __swift_task_run (fire-and-forget) / __swift_task_create. name/priority/executor ignored. Verified compiles+runs (conc_detach).
iOS 13.0macOS 10.15
Task.sleep(nanoseconds:)
static func sleep(nanoseconds:) async throws
No-op runtime shim now links and runs in wasm/native; no real suspension, timing, or throwing cancellation semantics.
iOS 13.0macOS 10.15
Task.sleep(for:tolerance:clock:) / sleep(until:)
static func sleep<C:Clock>(for:tolerance:clock:) async throws
Clock/Duration unsupported; not lowered. Undefined symbol.
iOS 16.0macOS 13.0
Task.yield()
static func yield() async
No-op runtime shim now links and runs in wasm/native; no cooperative scheduler semantics.
iOS 13.0macOS 10.15
Task.cancel()
func cancel()
No-op runtime shim now links and runs in wasm/native; no cancellation state is tracked.
iOS 13.0macOS 10.15
Task.isCancelled (instance + static)
var isCancelled: Bool / static var isCancelled
Static Task.isCancelled lowers to false in wasm/native; instance cancellation state is still not tracked.
iOS 13.0macOS 10.15
Task.checkCancellation()
static func checkCancellation() throws
No-op runtime shim now links and runs in wasm/native; it never throws because cancellation state is not modeled.
iOS 13.0macOS 10.15
Task.currentPriority / basePriority
static var currentPriority: TaskPriority
Static priority query lowers to a fixed .medium raw-value code; real priority scheduling and instance priority remain unmodeled.
iOS 13.0macOS 10.15
TaskPriority
struct TaskPriority: RawRepresentable (.high/.medium/.low/.background/.utility/.userInitiated)
Static raw values lower for high/medium/low/background/utility/userInitiated and .rawValue reads back; initializer/equality and scheduling effects remain simplified.
iOS 13.0macOS 10.15
withTaskGroup(of:body:)
func withTaskGroup<C,R>(of:returning:body:) async -> R
closure.c handles withTaskGroup(of:){ group in } → __swift_taskgroup_create/await_all/free. But group.addTask + for await v in group does NOT lower → undefined symbol _withTaskGroup at link. Verified link failure for the practical pattern.
iOS 13.0macOS 10.15
withThrowingTaskGroup(of:body:)
func withThrowingTaskGroup<C,R>(...) async throws -> R
Not specially lowered; relies on same broken TaskGroup path. Undefined symbol.
iOS 13.0macOS 10.15
withDiscardingTaskGroup / withThrowingDiscardingTaskGroup
func withDiscardingTaskGroup<R>(...) async -> R
Not lowered.
iOS 17.0macOS 14.0
TaskGroup.addTask(_:) / addTaskUnlessCancelled
mutating func addTask(priority:operation:)
Not lowered (closure.c only handles the outer withTaskGroup shell, not addTask). Verified: pattern fails to link.
iOS 13.0macOS 10.15
TaskGroup.next() / for await in group
mutating func next() async -> ChildTaskResult?
TaskGroup AsyncSequence iteration not modeled. Verified link failure.
iOS 13.0macOS 10.15
TaskGroup.waitForAll() / cancelAll() / isCancelled
mutating func waitForAll() async
await_all is a no-op stub (tasks ran eagerly); cancelAll/isCancelled not modeled.
iOS 13.0macOS 10.15
AsyncSequence (protocol)
protocol AsyncSequence { associatedtype Element; func makeAsyncIterator() }
No AsyncSequence model/iteration. gaps.md: 'AsyncSequence algorithm families' unsupported.
iOS 13.0macOS 10.15
AsyncIteratorProtocol
protocol AsyncIteratorProtocol { mutating func next() async throws -> Element? }
Not modeled; for await over a custom async iterator not lowered.
iOS 13.0macOS 10.15
AsyncSequence.map(_:)
func map<T>(_ transform: @Sendable (Element) async -> T) -> AsyncMapSequence
Async algorithm families unsupported (coverage.md/gaps.md).
iOS 13.0macOS 10.15
AsyncSequence.filter(_:)
func filter(_ isIncluded: @Sendable (Element) async -> Bool) -> AsyncFilterSequence
Async algorithm families unsupported.
iOS 13.0macOS 10.15
AsyncSequence.compactMap(_:) / flatMap(_:)
func compactMap<T>(...) -> AsyncCompactMapSequence
Async algorithm families unsupported.
iOS 13.0macOS 10.15
AsyncSequence.reduce(_:_:) / reduce(into:_:)
func reduce<R>(_:_:) async rethrows -> R
Async algorithm families unsupported.
iOS 13.0macOS 10.15
AsyncSequence.contains / first(where:) / min / max
func contains(_:) async rethrows -> Bool, etc.
Async terminal algorithms unsupported.
iOS 13.0macOS 10.15
AsyncSequence.prefix / dropFirst / prefix(while:)
func prefix(_:) -> AsyncPrefixSequence
Async lazy adapters unsupported.
iOS 13.0macOS 10.15
for await ... in (language)
for await x in asyncSeq { }
Async for-in loop not lowered (needs AsyncSequence/AsyncIterator model).
iOS all (lang; types iOS 13.0)macOS all (lang; types macOS 10.15)
AsyncStream<Element>
struct AsyncStream<Element>
gaps.md: AsyncStream unsupported. Verified: init with continuation builder fails to link (undefined _AsyncStream).
iOS 13.0macOS 10.15
AsyncStream.init(_:bufferingPolicy:_:)
init(_:bufferingPolicy:_ build:(Continuation)->Void)
Not lowered. Verified link failure (conc_stream).
iOS 13.0macOS 10.15
AsyncStream.makeStream(of:bufferingPolicy:)
static func makeStream(...) -> (stream, continuation)
Not lowered.
iOS 13.0macOS 10.15
AsyncStream.Continuation.yield/finish/onTermination
func yield(_:) -> YieldResult; func finish()
Continuation type not modeled.
iOS 13.0macOS 10.15
AsyncThrowingStream<Element,Failure>
struct AsyncThrowingStream<Element,Failure:Error>
gaps.md: throwing async streams unsupported. Not lowered.
iOS 13.0macOS 10.15
withCheckedContinuation(_:)
func withCheckedContinuation<T>(isolation:_ body:(CheckedContinuation<T,Never>)->Void) async -> T
Not lowered — undefined symbol _withCheckedContinuation. Verified link failure (conc_cont).
iOS 13.0macOS 10.15
withCheckedThrowingContinuation(_:)
func withCheckedThrowingContinuation<T>(...) async throws -> T
Not lowered. Undefined symbol.
iOS 13.0macOS 10.15
withUnsafeContinuation / withUnsafeThrowingContinuation
func withUnsafeContinuation<T>(_ fn:(UnsafeContinuation<T,Never>)->Void) async -> T
Not lowered. coverage.md/gaps.md: continuations unsupported.
iOS 13.0macOS 10.15
CheckedContinuation / UnsafeContinuation
struct CheckedContinuation<T,E>: Sendable { func resume(returning:)/resume(throwing:) }
Continuation types + resume(returning:/throwing:/with:) not modeled.
iOS 13.0macOS 10.15
MainActor (global actor)
@globalActor final actor MainActor { static var shared }
MainActor.run { } lowered in gcd.c → __swift_main_actor_run (runs inline on calling thread, propagates value). As a global-actor annotation on a free func it has a codegen redefinition bug (verified: __main_actor_<name> redefinition error).
iOS 13.0macOS 10.15
MainActor.run(_:)
static func run<T>(resultType:_ body:@MainActor ()throws->T) async rethrows -> T
gcd.c: emit __swift_main_actor_run(fn,env); inline execution, return value flows through. Verified pattern lowered.
iOS 13.0macOS 10.15
@MainActor (isolation annotation)
@MainActor func/var/class
Accepted/parsed; on calls standard.c wraps in __swift_main_actor_run (H1.1). On a global func decl, codegen emits a name collision (verified redefinition error).
iOS all (lang)macOS all (lang)
GlobalActor (protocol)
protocol GlobalActor { associatedtype ActorType; static var shared }
Custom global actors not modeled beyond MainActor shell.
iOS 13.0macOS 10.15
Sendable (protocol)
protocol Sendable
coverage.md ✅: accepted + structurally verified at compile time; no runtime thread-safety overhead. Marker-only.
iOS allmacOS all
@Sendable (closure attribute)
@Sendable () -> Void
Parsed/accepted as a marker; no enforcement runtime. coverage.md ✅.
iOS all (lang)macOS all (lang)
@unchecked Sendable
class C: @unchecked Sendable
Accepted as marker conformance, no checking.
iOS all (lang)macOS all (lang)
Actor (protocol)
protocol Actor: AnyObject, Sendable { var unownedExecutor }
Actor reference semantics modeled (lock-based isolation); unownedExecutor/assumeIsolated not modeled.
iOS 13.0macOS 10.15
TaskLocal<Value>
final class TaskLocal<Value>: Sendable { init(wrappedValue:); func withValue(_:operation:) }
gaps.md/coverage.md: task locals unsupported. @TaskLocal property wrapper + withValue not lowered.
iOS 13.0macOS 10.15
Clock (protocol)
protocol Clock<Duration>: Sendable { var now; func sleep(until:tolerance:) }
coverage.md/gaps.md: Clock unsupported. Not modeled.
iOS 16.0macOS 13.0
ContinuousClock
struct ContinuousClock: Sendable { var now: Instant }
Not lowered — undefined symbol _ContinuousClock. Verified link failure (conc_clock).
iOS 16.0macOS 13.0
SuspendingClock
struct SuspendingClock: Sendable { var now: Instant }
Not modeled.
iOS 16.0macOS 13.0
InstantProtocol / Clock.Instant
protocol InstantProtocol<Duration>: Comparable,Hashable,Sendable { func advanced(by:); func duration(to:) }
Instant types not modeled.
iOS 16.0macOS 13.0
Duration
struct Duration: Sendable { static func seconds/milliseconds/microseconds/nanoseconds(_:) }
Concurrency Duration not modeled; static factories + +/-/comparison operators + components not lowered. (Note: a separate Foundation UnitDuration .nanoseconds path exists in irgen but is unrelated.)
iOS 16.0macOS 13.0
Duration arithmetic/components
static func + / - / * ; var components: (seconds,attoseconds)
Duration value type unsupported.
iOS 16.0macOS 13.0
CancellationError
struct CancellationError: Error
Thrown by cancellation APIs which are unmodeled; type not specially handled.
iOS 13.0macOS 10.15
UnsafeCurrentTask / withUnsafeCurrentTask
func withUnsafeCurrentTask<T>(body:(UnsafeCurrentTask?)->T) -> T
Current-task introspection not modeled.
iOS 13.0macOS 10.15
Executor / SerialExecutor / TaskExecutor
protocol Executor: AnyObject, Sendable { func enqueue(_:) }
coverage.md: no executor model. Custom executors not supported (actor uses fixed pthread-mutex isolation).
iOS 13.0 (TaskExecutor 18.0)macOS 10.15 (TaskExecutor 15.0)

13. KeyPaths / reflection / debugging / print

8·14·27
AnyKeyPath
public class AnyKeyPath : _AppendKeyPath
No type-erased key-path heap object/box; only \Root.prop subscript GEP is lowered, no AnyKeyPath value model
iOS allmacOS all
AnyKeyPath.rootType
static var rootType: any Any.Type { get }
No rootType runtime metadata attached to key-path values (gaps.md)
iOS allmacOS all
AnyKeyPath.valueType
static var valueType: any Any.Type { get }
No valueType runtime metadata (gaps.md)
iOS allmacOS all
AnyKeyPath.hashValue / hash(into:)
var hashValue: Int; func hash(into:)
No AnyKeyPath Hashable / hashing state (gaps.md)
iOS allmacOS all
AnyKeyPath.== (_:_:)
static func == (AnyKeyPath, AnyKeyPath) -> Bool
No key-path identity/equality; key paths aren't materialized as objects (gaps.md)
iOS allmacOS all
AnyKeyPath.debugDescription
var debugDescription: String { get }
No reflective key-path debug rendering
iOS 16.4macOS 13.3
PartialKeyPath
public class PartialKeyPath<Root> : AnyKeyPath
No type-erased root→any-value box (gaps.md)
iOS allmacOS all
KeyPath
public class KeyPath<Root, Value> : PartialKeyPath<Root>
\Root.prop parses; read-only subscript on single stored property lowers to GEP+load; no real KeyPath object
iOS allmacOS all
WritableKeyPath
public class WritableKeyPath<Root, Value> : KeyPath<Root, Value>
Writable subscript set lowers to GEP+store for a single stored struct/class property; no class-only validation
iOS allmacOS all
ReferenceWritableKeyPath
public class ReferenceWritableKeyPath<Root, Value> : WritableKeyPath<Root, Value>
No separate reference-writeability / class-only model (gaps.md)
iOS allmacOS all
\Root.path key-path literal
\Root.property / \.property
Parsed (parse_key_path); single stored-property path works; chained \Outer.inner.v gives wrong value (GEP offset bug, verified); optional/computed/subscript/collection/\.self unsupported (gaps.md)
iOS allmacOS all
subscript(keyPath:) get
subscript(keyPath: KeyPath<Self, V>) -> V { get }
obj[keyPath: kp] lowers to GEP(base, slot)+load; only flat stored-property keypaths (collections.c)
iOS allmacOS all
subscript(keyPath:) set
subscript(keyPath: WritableKeyPath<Self, V>) -> V { get set }
obj[keyPath: kp] = v lowers to GEP+store; flat stored properties only (assign.c); verified working
iOS allmacOS all
_AppendKeyPath.appending(path:)
func appending(path:) -> KeyPath<Root, AppendedValue>? (and overload family)
No key-path composition; whole _AppendKeyPath family unmodeled (gaps.md)
iOS allmacOS all
Mirror.init(reflecting:)
public init(reflecting subject: Any)
Lowered as passthrough returning the subject value; no real reflection structure (standard.c Mirror branch)
iOS allmacOS all
Mirror.init(_:children:displayStyle:ancestorRepresentation:)
init<Subject,C>(_:children:displayStyle:ancestorRepresentation:)
Custom-mirror constructors not lowered; only init(reflecting:) is intercepted
iOS allmacOS all
Mirror.init(_:unlabeledChildren:...)
init<Subject,C>(_:unlabeledChildren:displayStyle:...)
Not lowered
iOS allmacOS all
Mirror.init(_:children:KeyValuePairs...)
init<Subject>(_:children: KeyValuePairs<String,Any>,...)
Not lowered
iOS allmacOS all
Mirror.subjectType
let subjectType: any Any.Type
No type metadata on Mirror
iOS allmacOS all
Mirror.children
let children: Mirror.Children
Iterating m.children segfaults (verified); no AnyCollection<Child> reflection backing (gaps.md)
iOS allmacOS all
Mirror.displayStyle
let displayStyle: Mirror.DisplayStyle?
No display-style computation
iOS allmacOS all
Mirror.superclassMirror
var superclassMirror: Mirror? { get }
No class hierarchy reflection
iOS allmacOS all
Mirror.descendant(_:_:)
func descendant(_ first: MirrorPath, _ rest: MirrorPath...) -> Any?
MirrorPath not modeled (gaps.md full-reflection list)
iOS allmacOS all
Mirror.description
var description: String { get }
No CustomStringConvertible reflection rendering
iOS allmacOS all
Mirror.customMirror
var customMirror: Mirror { get }
CustomReflectable conformance not modeled
iOS allmacOS all
Mirror.DisplayStyle
enum DisplayStyle { case struct/class/enum/tuple/optional/collection/dictionary/set/foreignReference }
foreignReference @available iOS/macOS 26.0; enum not lowered (Equatable/Hashable absent)
iOS allmacOS all
Mirror.AncestorRepresentation
enum AncestorRepresentation { case generated / customized(()->Mirror) / suppressed }
Not lowered
iOS allmacOS all
Mirror.Child / Mirror.Children typealias
typealias Child=(label:String?,value:Any); typealias Children=AnyCollection<Child>
No real children collection model
iOS allmacOS all
type(of:)
func type<T,Metatype>(of value: T) -> Metatype
Compile-time type-name string for Int/Double/Bool/String/Array/Dictionary/Set/Optional/Function/named (conv.c); verified prints Int. Returns string, not a true metatype object
iOS allmacOS all
print(_:separator:terminator:)
func print(_ items: Any..., separator: String = " ", terminator: String = "\n")
Default, custom separator, and custom terminator paths verified.
iOS allmacOS all
print(_:separator:terminator:to:)
func print<Target>(..., to output: inout Target) where Target: TextOutputStream
to: is separated from variadic items and appends joined output + terminator to String sinks or nominal sinks with a String stored field; generic witness dispatch and arbitrary custom storage remain unmodeled.
iOS allmacOS all
debugPrint(_:separator:terminator:)
func debugPrint(_ items: Any..., separator: String = " ", terminator: String = "\n")
Variadic items are debug-stringified (String/Character quoted) and joined with separator/terminator in standard.c; scalar/string multi-item path verified.
iOS allmacOS all
debugPrint(_:...:to:)
func debugPrint<Target>(..., to output: inout Target) where Target: TextOutputStream
Variadic joined debug output + terminator appends to String sinks or nominal sinks with a String stored field; generic witness dispatch and arbitrary custom storage remain unmodeled.
iOS allmacOS all
dump(_:name:indent:maxDepth:maxItems:)
func dump<T>(_ value: T, name:..., indent:..., maxDepth:..., maxItems:...) -> T
Special-cased: array literals and TY_ARRAY emit ▿ N elements + indexed lines; scalars use debug stringify; name/indent/maxDepth/maxItems ignored; not Mirror-driven (standard.c)
iOS allmacOS all
dump(_:to:name:...)
func dump<T,TargetStream>(_ value: T, to target: inout TargetStream, ...) -> T
dump(..., to:) appends minimal dump text to String sinks or nominal sinks with a String stored field for scalar and array-literal smoke paths; full Mirror formatting, options, and witness-routed storage remain unmodeled.
iOS allmacOS all
assert(_:_:file:line:)
func assert(_ condition:@autoclosure ()->Bool, _ message:@autoclosure ()->String = "", file:..., line:...)
Lowers to runtime __swift_assert(cond,msg); file/line dropped; verified compiles/passes
iOS allmacOS all
assertionFailure(_:file:line:)
func assertionFailure(_ message:@autoclosure ()->String = "", file:..., line:...)
Unconditional __swift_assert(0,msg) (standard.c)
iOS allmacOS all
precondition(_:_:file:line:)
func precondition(_ condition:@autoclosure ()->Bool, _ message:@autoclosure ()->String = "", file:..., line:...)
Lowers to __swift_precondition(cond,msg); verified compiles
iOS allmacOS all
preconditionFailure(_:file:line:)
func preconditionFailure(_ message:@autoclosure ()->String = "", file:..., line:...) -> Never
__swift_precondition(0,msg); returns zero value as Never placeholder (standard.c)
iOS allmacOS all
fatalError(_:file:line:)
func fatalError(_ message:@autoclosure ()->String = "", file:..., line:...) -> Never
Lowers to __swift_fatalError(msg) C trap; file/line dropped (standard.c)
iOS allmacOS all
ObjectIdentifier.init(_:)
init(_ x: AnyObject) / init(_ x: Any.Type)
Undefined symbol _ObjectIdentifier at link time (verified); no struct/identity model
iOS allmacOS all
ObjectIdentifier.== / < / hash(into:) / debugDescription
Equatable, Comparable, Hashable, CustomDebugStringConvertible
Type not lowered; no identity backing
iOS allmacOS all
MemoryLayout<T>.size
static var size: Int { get }
Basic primitive layout constants now lower; MemoryLayout<Int>.size == 8 verified in wasm/native. Full ABI layout remains partial.
iOS allmacOS all
MemoryLayout<T>.stride
static var stride: Int { get }
Basic primitive stride constants now lower; complex nominal/unsafe layouts remain partial.
iOS allmacOS all
MemoryLayout<T>.alignment
static var alignment: Int { get }
Basic primitive alignment constants now lower; full target ABI alignment remains partial.
iOS allmacOS all
MemoryLayout.size/stride/alignment(ofValue:)
static func size/stride/alignment(ofValue value: T) -> Int
Basic ofValue primitive layout constants now lower; full generic ABI layout remains partial.
iOS allmacOS all
MemoryLayout.offset(of:)
static func offset(of key: PartialKeyPath<T>) -> Int?
Depends on key-path objects + layout; unmodeled
iOS allmacOS all
withoutActuallyEscaping(_:do:)
func withoutActuallyEscaping<C,R,F>(_ closure: C, do body: (C) throws(F) -> R) throws(F) -> R
No dedicated escaping-bridge lowering; closure escapability not modeled this way
iOS allmacOS all
autoreleasepool(invoking:)
func autoreleasepool<Result>(invoking body: () throws -> Result) rethrows -> Result
Not in Swift stdlib interface (Foundation/ObjectiveC); ARC/autorelease pools not modeled in native runtime
iOSmacOS

14. Unsafe / pointers / memory / SIMD / C interop

20·22·72
UnsafePointer
@frozen struct UnsafePointer<Pointee>
Core word-pointer lowering exists for init from mutable pointer, pointee get, indexed get, deallocate, advanced(by:), and distance(to:) on UnsafePointer<Int>; lifetime/rebind/keypath/raw-memory semantics still unmodeled.
iOS allmacOS all
UnsafePointer.pointee
var pointee: Pointee { get }
Word-sized indirect load lowering; verified immutable Int pointer reads in unsafe_pointer tests.
iOS allmacOS all
UnsafePointer.subscript(_:)
subscript(i: Int) -> Pointee { get }
Word-offset GEP plus indirect load; verified indexed immutable Int pointer reads.
iOS allmacOS all
UnsafePointer.deallocate()
func deallocate()
Lowers to free; verified deallocation through UnsafePointer<Int>.
iOS allmacOS all
UnsafePointer.withMemoryRebound(to:capacity:_:)
func withMemoryRebound<T,E,Result>(to: T.Type, capacity: Int, _ body: (UnsafePointer<T>) throws(E) -> Result) throws(E) -> Result
No memory-binding model.
iOS allmacOS all
UnsafePointer.pointer(to:)
func pointer<Property>(to: KeyPath<Pointee,Property>) -> UnsafePointer<Property>?
No pointer-to-stored-property; depends on keypath object model (also missing).
iOS allmacOS all
UnsafePointer.advanced/distance (Strideable)
func advanced(by: Int) -> Self; func distance(to: Self) -> Int
Explicit advanced(by:) and distance(to:) lower over the word-pointer model and are verified for Int pointers.
iOS allmacOS all
UnsafePointer: CVarArg/Equatable/Hashable/Comparable/Strideable
extension UnsafePointer : ...
Conformances declared, no runtime witnesses.
iOS allmacOS all
UnsafeMutablePointer
@frozen struct UnsafeMutablePointer<Pointee>
Core word-pointer lowering exists for allocate(capacity:), initialize(to:), pointee get/set, indexed get/set, deallocate, and advanced(by:) on UnsafeMutablePointer<Int>; lifetime/rebind/move/deinit/raw-memory semantics still unmodeled.
iOS allmacOS all
UnsafeMutablePointer.allocate(capacity:)
static func allocate(capacity: Int) -> UnsafeMutablePointer<Pointee>
Lowers to malloc(capacity * 8); verified mutable Int pointer allocation in unsafe_pointer tests.
iOS allmacOS all
UnsafeMutablePointer.deallocate()
func deallocate()
Lowers to free; verified in unsafe_pointer tests.
iOS allmacOS all
UnsafeMutablePointer.pointee
var pointee: Pointee { get nonmutating set }
Word-sized indirect load/store lowering; verified get/set for Int.
iOS allmacOS all
UnsafeMutablePointer.subscript(_:)
subscript(i: Int) -> Pointee { get nonmutating set }
Word-offset GEP plus indirect load/store; verified indexed Int pointer get/set.
iOS allmacOS all
UnsafeMutablePointer.init(mutating:) / init(_:)
init(mutating: UnsafePointer<Pointee>); init(_: UnsafeMutablePointer<Pointee>) (+ optional variants)
Typed pointer conversions lower as identity address casts; non-optional and optional nil/non-nil variants are verified for Int pointers.
iOS allmacOS all
UnsafeMutablePointer.initialize(to:)
func initialize(to: consuming Pointee)
Lowers to word-sized indirect store; verified with allocate/pointee.
iOS allmacOS all
UnsafeMutablePointer.initialize(repeating:count:)
func initialize(repeating: Pointee, count: Int)
No init-fill runtime.
iOS allmacOS all
UnsafeMutablePointer.initialize(from:count:)
func initialize(from: UnsafePointer<Pointee>, count: Int)
No memcpy-init runtime.
iOS allmacOS all
UnsafeMutablePointer.update(repeating:count:) / update(from:count:)
func update(repeating:count:); func update(from:count:)
Plus deprecated assign(...) aliases. No runtime.
iOS allmacOS all
UnsafeMutablePointer.move()
func move() -> Pointee
No move-out semantics.
iOS allmacOS all
UnsafeMutablePointer.moveInitialize(from:count:) / moveUpdate(from:count:)
func moveInitialize(from:count:); func moveUpdate(from:count:)
Plus deprecated moveAssign alias. No runtime.
iOS allmacOS all
UnsafeMutablePointer.deinitialize(count:)
@discardableResult func deinitialize(count: Int) -> UnsafeMutableRawPointer
No deinit runtime.
iOS allmacOS all
UnsafeMutablePointer.withMemoryRebound(to:capacity:_:)
func withMemoryRebound<T,E,Result>(to:capacity:_:) ...
No memory-binding model.
iOS allmacOS all
UnsafeMutablePointer.pointer(to:)
func pointer<Property>(to: KeyPath/WritableKeyPath<Pointee,Property>) -> Unsafe(Mutable)Pointer<Property>?
Needs keypath object addressing; not modeled.
iOS allmacOS all
UnsafeRawPointer
@frozen struct UnsafeRawPointer
Core raw identity, byte-offset advance, Int-sized load, and deallocate lower to native IR/C; binding/lifetime model still partial.
iOS allmacOS all
UnsafeRawPointer.init(_:) / init(bitPattern:)
init<T>(_: UnsafePointer<T>); init?(bitPattern: Int/UInt) (+ typed/optional family)
Typed/raw constructors and Int/UInt bitPattern paths lower as identity pointer conversions; optional nil/non-nil variants verified.
iOS allmacOS all
UnsafeRawPointer.load(fromByteOffset:as:)
func load<T>(fromByteOffset: Int = 0, as: T.Type) -> T
Byte-offset indirect load is verified for Int values; arbitrary typed loads and layout-sensitive generics remain partial.
iOS allmacOS all
UnsafeRawPointer.loadUnaligned(fromByteOffset:as:)
func loadUnaligned<T>(fromByteOffset: Int = 0, as: T.Type) -> T (BitwiseCopyable + generic overloads)
Lowers through raw byte-offset indirect load; verified for Int-sized unaligned offsets in wasm/native.
iOS allmacOS all
UnsafeRawPointer.bindMemory(to:capacity:) / assumingMemoryBound(to:)
func bindMemory<T>(to:capacity:) -> UnsafePointer<T>; func assumingMemoryBound<T>(to:) -> UnsafePointer<T>
Calls lower as identity typed-pointer conversions, but full memory-binding rules and local generic type propagation remain partial.
iOS allmacOS all
UnsafeRawPointer.withMemoryRebound(to:capacity:_:)
func withMemoryRebound<T,E,Result>(to:capacity:_:) ...
No binding model.
iOS allmacOS all
UnsafeRawPointer.deallocate()
func deallocate()
Lowers to free; verified after raw allocation/conversion.
iOS allmacOS all
UnsafeRawPointer.advanced(by:) (Strideable)
func advanced(by: Int) -> UnsafeRawPointer
Explicit byte-offset advance lowers to pointer arithmetic; full Strideable/Comparable conformance remains decl-only.
iOS allmacOS all
UnsafeRawPointer.alignedUp/alignedDown
func alignedUp/alignedDown(for: T.Type / toMultipleOf: Int) -> UnsafeRawPointer
Alignment helpers; no ABI layout computation.
iOS 15.0macOS 12.0
UnsafeMutableRawPointer
@frozen struct UnsafeMutableRawPointer
Core raw allocate/store/load/copy/deallocate and conversion lowering is verified; binding/lifetime model still partial.
iOS allmacOS all
UnsafeMutableRawPointer.allocate(byteCount:alignment:)
static func allocate(byteCount: Int, alignment: Int) -> UnsafeMutableRawPointer
Lowers to malloc(byteCount); alignment parameter is accepted but not separately enforced.
iOS allmacOS all
UnsafeMutableRawPointer.deallocate()
func deallocate()
Lowers to free; verified through mutable raw pointer aliases.
iOS allmacOS all
UnsafeMutableRawPointer.init(_:) / init(mutating:)
init<T>(_: UnsafeMutablePointer<T>); init(mutating: UnsafeRawPointer) (+ optional/typed family)
Raw/typed and mutating conversions lower as identity pointer casts; optional nil/non-nil and Int/UInt bitPattern paths verified.
iOS allmacOS all
UnsafeMutableRawPointer.load / loadUnaligned
func load<T>(fromByteOffset:as:) -> T; func loadUnaligned<T>(fromByteOffset:as:) -> T
Byte-offset direct and unaligned indirect loads are verified for Int-sized values; arbitrary generic layout remains partial.
iOS allmacOS all
UnsafeMutableRawPointer.storeBytes(of:toByteOffset:as:)
func storeBytes<T>(of: T, toByteOffset: Int = 0, as: T.Type)
Byte-offset indirect store is verified for Int values; arbitrary value layout and binding semantics remain partial.
iOS allmacOS all
UnsafeMutableRawPointer.copyMemory(from:byteCount:)
func copyMemory(from: UnsafeRawPointer, byteCount: Int)
Lowers to memcpy(dst, src, byteCount) and is verified with raw loads after copy.
iOS allmacOS all
UnsafeMutableRawPointer.bindMemory(to:capacity:) / assumingMemoryBound(to:)
func bindMemory<T>(to:capacity:) -> UnsafeMutablePointer<T>; func assumingMemoryBound<T>(to:)
Calls lower as identity typed-pointer conversions, but full memory-binding rules and local generic type propagation remain partial.
iOS allmacOS all
UnsafeMutableRawPointer.initializeMemory(as:...)
func initializeMemory<T>(as:to:); (as:repeating:count:); (as:from:count:) -> UnsafeMutablePointer<T>
No init-via-raw runtime.
iOS allmacOS all
UnsafeMutableRawPointer.moveInitializeMemory(as:from:count:)
func moveInitializeMemory<T>(as:from:count:) -> UnsafeMutablePointer<T>
No move-init runtime.
iOS allmacOS all
UnsafeMutableRawPointer.withMemoryRebound / advanced / alignedUp/Down
func withMemoryRebound(...); func advanced(by:); func alignedUp/alignedDown(...)
advanced(by:) lowers as byte-offset pointer arithmetic; withMemoryRebound and alignedUp/Down remain missing.
iOS allmacOS all
UnsafeBufferPointer
@frozen struct UnsafeBufferPointer<Element>
gaps.md §3: no Collection conformance, iteration, subscript, or lifetimes.
iOS allmacOS all
UnsafeBufferPointer.init(start:count:) / init(_:) / init(rebasing:)
init(start: UnsafePointer<Element>?, count: Int); init(_: UnsafeMutableBufferPointer<Element>); init(rebasing: Slice<...>)
Construction stubs.
iOS allmacOS all
UnsafeBufferPointer.baseAddress / count / isEmpty
var baseAddress: UnsafePointer<Element>? { get }; var count/isEmpty
No backing storage model.
iOS allmacOS all
UnsafeBufferPointer.subscript / Collection members
subscript(i: Int) -> Element; startIndex/endIndex/indices/index(after:)/distance(...)
Collection conformance is decl-only; not lowered.
iOS allmacOS all
UnsafeBufferPointer.makeIterator()
func makeIterator() -> UnsafeBufferPointer<Element>.Iterator
No iterator runtime.
iOS allmacOS all
UnsafeBufferPointer.withMemoryRebound(to:_:)
func withMemoryRebound<T,E,Result>(to:_:) ...
No binding model.
iOS allmacOS all
UnsafeBufferPointer.extracting(_:) / span
func extracting(_: Range<Int>) -> UnsafeBufferPointer<Element>; var span: Span<Element>
extracting (iOS 18/macOS 15), span (iOS 26/macOS 26). Spans not modeled.
iOS 18.0+ / 26.0macOS 15.0+ / 26.0
UnsafeBufferPointer.deallocate()
func deallocate()
No allocator runtime.
iOS allmacOS all
UnsafeMutableBufferPointer
@frozen struct UnsafeMutableBufferPointer<Element>
gaps.md §3: no Collection/MutableCollection, iteration, subscript, lifetimes.
iOS allmacOS all
UnsafeMutableBufferPointer.allocate(capacity:)
static func allocate(capacity: Int) -> UnsafeMutableBufferPointer<Element>
No allocator runtime.
iOS allmacOS all
UnsafeMutableBufferPointer.init(start:count:) / mutable get-set subscript
init(start:count:); subscript(i: Int) -> Element { get nonmutating set }
Construction + mutable subscript stubs.
iOS allmacOS all
UnsafeMutableBufferPointer.initialize/update/move family
func initialize(repeating:); initialize(from:); update(repeating:); moveInitialize(fromContentsOf:); deinitialize()
Buffer init/update/move runtime absent.
iOS allmacOS all
UnsafeMutableBufferPointer.baseAddress / withMemoryRebound / extracting / span
var baseAddress; func withMemoryRebound(...); func extracting(_:); var span
Same gating as immutable buffer; all stubs.
iOS all / 18.0 / 26.0macOS all / 15.0 / 26.0
UnsafeRawBufferPointer
@frozen struct UnsafeRawBufferPointer
gaps.md §3: no collection conformance/iteration/subscripts/lifetimes.
iOS allmacOS all
UnsafeRawBufferPointer.init(start:count:) / init(_:) / init(rebasing:)
init(start: UnsafeRawPointer?, count: Int); init(UnsafeMutableRawBufferPointer); init(rebasing:)
Construction stubs.
iOS allmacOS all
UnsafeRawBufferPointer.baseAddress/count + byte Collection
var baseAddress: UnsafeRawPointer?; var count; subscript(i: Int) -> UInt8 { get }
Byte-view collection decl-only.
iOS allmacOS all
UnsafeRawBufferPointer.load / loadUnaligned
func load<T>(fromByteOffset:as:) -> T; func loadUnaligned<T>(fromByteOffset:as:) -> T
No raw load lowering.
iOS allmacOS all
UnsafeRawBufferPointer.bindMemory(to:) / withMemoryRebound
func bindMemory<T>(to:) -> UnsafeBufferPointer<T>; func withMemoryRebound(...)
No binding model.
iOS allmacOS all
UnsafeRawBufferPointer.deallocate()
func deallocate()
No allocator runtime.
iOS allmacOS all
UnsafeMutableRawBufferPointer
@frozen struct UnsafeMutableRawBufferPointer
gaps.md §3: no collection conformance/iteration/subscript/lifetimes.
iOS allmacOS all
UnsafeMutableRawBufferPointer.allocate(byteCount:alignment:)
static func allocate(byteCount: Int, alignment: Int) -> UnsafeMutableRawBufferPointer
No raw allocator runtime.
iOS allmacOS all
UnsafeMutableRawBufferPointer.storeBytes / copyMemory / copyBytes
func storeBytes<T>(of:toByteOffset:as:); func copyMemory(from:); func copyBytes(from:)
No raw store/copy runtime.
iOS allmacOS all
UnsafeMutableRawBufferPointer.initializeMemory(as:...) / bindMemory
func initializeMemory<T>(as:repeating:); func bindMemory<T>(to:)
No init/bind runtime.
iOS allmacOS all
UnsafeMutableRawBufferPointer.load / subscript get-set / deallocate
func load<T>(...); subscript(i: Int) -> UInt8 { get nonmutating set }; func deallocate()
All stubs.
iOS allmacOS all
withUnsafePointer(to:_:)
func withUnsafePointer<T,E,Result>(to: borrowing/inout T, _: (UnsafePointer<T>) throws(E) -> Result) throws(E) -> Result
No scoped pointer-to-value runtime; pointer model absent.
iOS allmacOS all
withUnsafeMutablePointer(to:_:)
func withUnsafeMutablePointer<T,E,Result>(to: inout T, _: (UnsafeMutablePointer<T>) throws(E) -> Result) throws(E) -> Result
No scoped mutable-pointer runtime.
iOS allmacOS all
withUnsafeBytes(of:_:)
func withUnsafeBytes<T,E,Result>(of: borrowing/inout T, _: (UnsafeRawBufferPointer) throws(E) -> Result) throws(E) -> Result
No raw byte view of a value.
iOS allmacOS all
withUnsafeMutableBytes(of:_:)
func withUnsafeMutableBytes<T,E,Result>(of: inout T, _: (UnsafeMutableRawBufferPointer) throws(E) -> Result) throws(E) -> Result
No mutable raw byte view.
iOS allmacOS all
withUnsafeTemporaryAllocation(...)
func withUnsafeTemporaryAllocation<R,E>(byteCount:alignment:_:); (of:capacity:_:)
No temporary stack allocation runtime.
iOS allmacOS all
unsafeBitCast(_:to:)
func unsafeBitCast<T,U>(_: T, to: U.Type) -> U
Lowers to IR cast and is verified for supported pointer/opaque pointer conversions; full Swift layout/ABI bitcast semantics remain partial.
iOS allmacOS all
unsafeDowncast(_:to:)
func unsafeDowncast<T>(_: AnyObject, to: T.Type) -> T
Lowers as an unchecked IR cast for supported class/reference-like values; full AnyObject bridge/runtime type semantics remain partial.
iOS allmacOS all
swap(_:_:)
func swap<T>(_: inout T, _: inout T)
Value swap lowers through a temporary and works for supported scalar/reference-like values; Int and String swap verified.
iOS allmacOS all
withExtendedLifetime(_:_:)
func withExtendedLifetime<T,E,Result>(_: borrowing T, _: () throws(E) -> Result) throws(E) -> Result (+ borrowing-arg overload)
No real ARC lifetime extension; closure runs but lifetime semantics are not enforced.
iOS allmacOS all
MemoryLayout
@frozen enum MemoryLayout<T>
Basic primitive layout constants are lowered; complete target-ABI layout model remains partial.
iOS allmacOS all
MemoryLayout.size / stride / alignment
static var size/stride/alignment: Int { get }
Basic primitive constants verified (MemoryLayout<Int> returns 8/8/8); complex layouts remain partial.
iOS allmacOS all
MemoryLayout.size(ofValue:) / stride(ofValue:) / alignment(ofValue:)
static func size/stride/alignment(ofValue: borrowing T) -> Int
Basic primitive ofValue constants verified; complete generic layout remains partial.
iOS allmacOS all
MemoryLayout.offset(of:)
static func offset(of key: PartialKeyPath<T>) -> Int?
Needs keypath object + field-offset model; not present.
iOS allmacOS all
ManagedBuffer
open class ManagedBuffer<Header, Element>
gaps.md §3: managed storage retain/release/CF bridging unsupported.
iOS allmacOS all
ManagedBuffer.create(minimumCapacity:makingHeaderWith:)
static func create(minimumCapacity: Int, makingHeaderWith: ...) -> ManagedBuffer<Header,Element>
No managed-buffer allocation runtime.
iOS allmacOS all
ManagedBuffer.header / capacity / withUnsafeMutablePointers...
var header; var capacity; func withUnsafeMutablePointerToHeader/Elements/Pointers(_:)
No tail-allocated storage model.
iOS allmacOS all
ManagedBufferPointer
@frozen struct ManagedBufferPointer<Header, Element>
gaps.md §3: managed storage primitive; not implemented.
iOS allmacOS all
ManagedBufferPointer.init / header / capacity / withUnsafeMutablePointers...
init(bufferClass:minimumCapacity:makingHeaderWith:); init(unsafeBufferObject:); var header/buffer/capacity; func withUnsafeMutablePointers...
All decl-only stubs; no runtime.
iOS allmacOS all
Unmanaged
@frozen struct Unmanaged<Instance: AnyObject>
gaps.md §3: retain/release & CoreFoundation bridging not supported.
iOS allmacOS all
Unmanaged.fromOpaque(_:) / toOpaque()
static func fromOpaque(_: UnsafeRawPointer) -> Unmanaged<Instance>; func toOpaque() -> UnsafeMutableRawPointer
No opaque object pointer model.
iOS allmacOS all
Unmanaged.passRetained/passUnretained
static func passRetained/passUnretained(_: Instance) -> Unmanaged<Instance>
No ARC bridging runtime.
iOS allmacOS all
Unmanaged.takeRetainedValue/takeUnretainedValue
func takeRetainedValue() -> Instance; func takeUnretainedValue() -> Instance
No ARC bridging runtime.
iOS allmacOS all
Unmanaged.retain/release/autorelease
func retain() -> Unmanaged<Instance>; func release(); func autorelease() -> Unmanaged<Instance>
No manual refcount runtime.
iOS allmacOS all
OpaquePointer
@frozen struct OpaquePointer
Opaque/raw identity, equality, hashValue, debugDescription, casts, and optional constructors are verified; hash(into:) remains partial.
iOS allmacOS all
OpaquePointer.init(bitPattern:) / init(_:)
init?(bitPattern: Int/UInt); init<T>(_: UnsafePointer<T>) (+ raw/mutable/optional family)
Raw/typed constructors and Int/UInt bitPattern paths lower as identity pointer conversions; optional nil/non-nil variants verified.
iOS allmacOS all
AutoreleasingUnsafeMutablePointer
@frozen struct AutoreleasingUnsafeMutablePointer<Pointee>
Treated as a mutable typed pointer alias for MiniSwift pointer lowering; ObjC autoreleasing bridge semantics remain absent.
iOS allmacOS all
AutoreleasingUnsafeMutablePointer.pointee / subscript / init
var pointee: Pointee; subscript(i: Int) -> Pointee; init(_: UnsafeMutablePointer<Pointee>)
Non-optional init, pointee get/set, and indexed get/set lower through existing mutable pointer GEP/load/store; verified for Int.
iOS allmacOS all
CVarArg
protocol CVarArg
gaps.md §3: no CVarArg encoding / C ABI fidelity.
iOS allmacOS all
CVaListPointer
@frozen struct CVaListPointer
No va_list model.
iOS allmacOS all
withVaList(_:_:)
func withVaList<R>(_: [any CVarArg], _: (CVaListPointer) -> R) -> R
No varargs marshalling runtime.
iOS allmacOS all
C integer typealiases (CInt/CChar/CLong/CShort/CLongLong/CSignedChar...)
typealias CInt = Int32; CChar = Int8; CLong = Int; CShort = Int16; CLongLong = Int64; CSignedChar = Int8
Pure typealiases to native Int types; the underlying Int types work, but full C ABI/import semantics (gaps.md §3) do not.
iOS allmacOS all
C unsigned typealiases (CUnsignedInt/CUnsignedChar/CUnsignedLong/CUnsignedShort/CUnsignedLongLong)
typealias CUnsignedInt = UInt32; CUnsignedChar = UInt8; CUnsignedLong = UInt; CUnsignedShort = UInt16; CUnsignedLongLong = UInt64
Aliases to native UInt types resolve; no C interop/import.
iOS allmacOS all
C float/bool/char typealiases (CFloat/CDouble/CLongDouble/CBool/CChar16/CChar32/CWideChar/CSignedChar)
typealias CFloat = Float; CDouble = Double; CLongDouble = Double; CBool = Bool; CChar16 = UInt16; CChar32/CWideChar = Unicode.Scalar
Aliases resolve to supported scalar types; CChar32/CWideChar depend on Unicode.Scalar (partial); no C import.
iOS allmacOS all
SIMD
protocol SIMD<Scalar> : SIMDStorage, Hashable, Codable, ExpressibleByArrayLiteral, CustomStringConvertible
gaps.md §3: SIMD types are stubs; no WASM/LLVM vector lowering.
iOS allmacOS all
SIMDScalar / SIMDStorage
protocol SIMDScalar : BitwiseCopyable; protocol SIMDStorage
Vector-storage protocol stubs; no associated vector type lowering.
iOS allmacOS all
SIMD2 / SIMD3 / SIMD4 / SIMD8 / SIMD16 / SIMD32 / SIMD64
@frozen struct SIMDn<Scalar: SIMDScalar> : SIMD
gaps.md §3: vector structs are stubs; no arithmetic/swizzle/vector lowering.
iOS allmacOS all
SIMDn.init / init(repeating:) / init(arrayLiteral:) / init(_: Sequence)
init(); init(_ v0:_ v1:...); init(repeating: Scalar); init(arrayLiteral: Scalar...)
No vector storage; construction not lowered.
iOS allmacOS all
SIMDn.scalarCount / subscript / x,y,z,w lanes
var scalarCount: Int; subscript(index: Int) -> Scalar; var x/y/z/w: Scalar
No lane storage model.
iOS allmacOS all
SIMD arithmetic operators (+ - * / &+ &- &* etc.)
static func +/-/*//(a: Self, b: Self) -> Self; &+/&-/&* wrapping; addingProduct; squareRoot; rounded
No vector arithmetic lowering.
iOS allmacOS all
SIMD bitwise/shift operators (& ^ | &<< &>>)
static func &/^/|/&<</&>>(a: Self, b: Self) -> Self (+ scalar-mixed overloads)
Integer-vector ops; not lowered.
iOS allmacOS all
SIMD pointwise comparisons (.== .!= .< .<= .> .>=)
static func .==/.!=/.</.<=/.>/.>=(a: Self, b: Self/Scalar) -> SIMDMask<Self.MaskStorage>
No mask-producing comparison lowering.
iOS allmacOS all
SIMD swizzle subscript
subscript<Index: FixedWidthInteger & SIMDScalar>(index: SIMDn<Index>) -> SIMDn<Scalar>
gaps.md §3: no swizzling.
iOS allmacOS all
SIMD reductions (min/max/sum/wrappedSum)
func min() -> Scalar; func max() -> Scalar; func sum() -> Scalar; func wrappedSum() -> Scalar
No horizontal reduction lowering.
iOS allmacOS all
SIMD.replacing(with:where:) / clamped(lowerBound:upperBound:)
func replacing(with: Self/Scalar, where: SIMDMask) -> Self; func clamped(lowerBound:upperBound:) -> Self
Masked-select/clamp not lowered.
iOS allmacOS all
SIMD.zero / one / random(in:)
static var zero/one: Self; static func random(in: Range/ClosedRange<Scalar>[, using:]) -> Self
No vector constants/RNG lowering.
iOS allmacOS all
SIMDMask
@frozen struct SIMDMask<Storage: SIMD> : SIMD
gaps.md §3: mask vector stub; no boolean-vector lowering.
iOS allmacOS all
SIMDMask operators (.& .| .^ .! any/all)
static func .&/.| /.^(a: Self, b: Self) -> Self; prefix .!; func any()/all() via reductions
No mask logic / reductions lowered.
iOS allmacOS all

15. Global functions & misc types

43·29·2
print(_:separator:terminator:)
func print(_ items: Any..., separator: String = " ", terminator: String = "\n")
Lowered in compiler/irgen/expr/call/standard.c (is_print_fn); variadic items joined to a print runtime call.
iOS allmacOS all
print(_:separator:terminator:to:)
func print<Target>(_ items: Any..., separator: String, terminator: String, to output: inout Target) where Target : TextOutputStream
to: appends joined output + terminator to String sinks or nominal sinks with a String stored field; generic TextOutputStream witness dispatch and arbitrary custom storage remain unmodeled.
iOS allmacOS all
debugPrint(_:separator:terminator:)
func debugPrint(_ items: Any..., separator: String = " ", terminator: String = "\n")
Lowered in standard.c; variadic items are debug-stringified, String/Character values are quoted, and separator/terminator handling is verified.
iOS allmacOS all
debugPrint(_:separator:terminator:to:)
func debugPrint<Target>(_ items: Any..., to output: inout Target) where Target : TextOutputStream
Variadic joined debug output + terminator appends to String sinks or nominal sinks with a String stored field; generic witness dispatch and arbitrary custom storage remain unmodeled.
iOS allmacOS all
dump(_:name:indent:maxDepth:maxItems:)
func dump<T>(_ value: T, name: String? = nil, indent: Int = 0, maxDepth: Int = .max, maxItems: Int = .max) -> T
Lowered at standard.c:895 with a print loop; array dump emits index-prefixed - 0: 1 lines, diverging from Swift's - 1 element rows; uses minimal Mirror.
iOS allmacOS all
dump(_:to:name:indent:maxDepth:maxItems:)
func dump<T, TargetStream>(_ value: T, to target: inout TargetStream, ...) -> T where TargetStream : TextOutputStream
dump(..., to:) appends minimal dump text to String sinks or nominal sinks with a String stored field for scalar and array-literal smoke paths; full Mirror formatting, options, and witness-routed storage remain unmodeled.
iOS allmacOS all
type(of:)
func type<T, Metatype>(of value: borrowing T) -> Metatype
Compile-time resolved to a static type-name string/metatype; verified type(of: 42) prints Int matching swift.
iOS allmacOS all
swap(_:_:)
func swap<T>(_ a: inout T, _ b: inout T) where T : ~Copyable
Lowered in modules/stdlib/ir_lowering/init.c:2593; verified swap(&a,&b) works.
iOS allmacOS all
min(_:_:)
func min<T>(_ x: T, _ y: T) -> T where T : Comparable
2-arg form lowered to native compare/select (init.c); verified min(3,1)=1.
iOS allmacOS all
max(_:_:)
func max<T>(_ x: T, _ y: T) -> T where T : Comparable
2-arg form lowered to native compare/select; verified max(3,7)=7.
iOS allmacOS all
min(_:_:_:_:) / max(_:_:_:_:) (variadic 3+)
func min<T>(_ x: T, _ y: T, _ z: T, _ rest: T...) -> T where T : Comparable
Variadic min/max now fold all arguments for Int and Double; min(3,1,2), max(3,1,7,5), and Double variants verified.
iOS allmacOS all
abs(_:)
func abs<T>(_ x: T) -> T where T : Comparable, T : SignedNumeric
Lowered to native abs (init.c referenced); verified abs(-9)=9.
iOS allmacOS all
numericCast(_:)
func numericCast<T, U>(_ x: T) -> U where T : BinaryInteger, U : BinaryInteger
Lowered at standard.c:1058 to integer convert; verified numericCast(UInt8(200)) as Int == 200.
iOS allmacOS all
zip(_:_:)
func zip<S1, S2>(_ s1: S1, _ s2: S2) -> Zip2Sequence<S1, S2> where S1 : Sequence, S2 : Sequence
Lowered (init.c:3500 + for.c) by materializing fused tuple pairs for for-in/value use; per coverage.md zip ✅.
iOS allmacOS all
stride(from:to:by:)
func stride<T>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> where T : Strideable
Works inline in for-in header (for.c:150 emits flat loop); but stored to a variable / used as a StrideTo value emits undefined _stride symbol (no real StrideTo type).
iOS allmacOS all
stride(from:through:by:)
func stride<T>(from start: T, through end: T, by stride: T.Stride) -> StrideThrough<T> where T : Strideable
Same as stride(to:): inline for-in loop only; no materialized StrideThrough value.
iOS allmacOS all
sequence(first:next:)
func sequence<T>(first: T, next: @escaping (T) -> T?) -> UnfoldFirstSequence<T>
Inline for-in, stored nil-terminating Int sequences, and manual next() consumption work on native and WASM via eager array materialization; generic element types, valid 0 elements, and lazy identity remain unmodeled.
iOS allmacOS all
sequence(state:next:)
func sequence<T, State>(state: State, next: @escaping (inout State) -> T?) -> UnfoldSequence<T, State>
Inline for-in, stored nil-terminating Int state sequences, and manual next() consumption work on native and WASM via eager array materialization; generic state/element types, valid 0 elements, and lazy identity remain unmodeled.
iOS allmacOS all
repeatElement(_:count:)
func repeatElement<T>(_ element: T, count n: Int) -> Repeated<T>
Lowers to an eager repeated array-backed collection; verified standalone count/subscript/for-in plus Array(repeatElement(...)) on native and WASM.
iOS allmacOS all
assert(_:_:file:line:)
func assert(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line)
Lowered at standard.c:1107 to a conditional trap; debug-only semantics per coverage reflection row ✅.
iOS allmacOS all
assertionFailure(_:file:line:)
func assertionFailure(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line)
Lowered at standard.c:1137 to unconditional debug trap.
iOS allmacOS all
precondition(_:_:file:line:)
func precondition(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line)
Lowered at standard.c:1155; runtime helper in string_rt.c:807 always-on trap.
iOS allmacOS all
preconditionFailure(_:file:line:)
func preconditionFailure(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) -> Never
Lowered at standard.c:1176 to unconditional trap; returns Never.
iOS allmacOS all
fatalError(_:file:line:)
func fatalError(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) -> Never
Lowered at standard.c:1197; runtime trap in string_rt.c:818; returns Never.
iOS allmacOS all
withExtendedLifetime(_:_:)
func withExtendedLifetime<T, E, R>(_ x: borrowing T, _ body: () throws(E) -> R) throws(E) -> R
Closure body lowers and runs; no real ARC/ownership lifetime extension semantics.
iOS allmacOS all
withExtendedLifetime(_:_:) (borrowing-arg body)
func withExtendedLifetime<T, E, R>(_ x: borrowing T, _ body: (borrowing T) throws(E) -> R) throws(E) -> R
Borrowing-arg body receives the value; no real ARC/ownership lifetime extension semantics.
iOS allmacOS all
readLine(strippingNewline:)
func readLine(strippingNewline: Bool = true) -> String?
Not found in stdlib lowering paths; no dedicated runtime hook observed — stdin reading not in the verified native surface.
iOS allmacOS all
DefaultStringInterpolation
@frozen struct DefaultStringInterpolation : StringInterpolationProtocol, Sendable
String interpolation is a core supported path (string builtins + interpolation closure-capture); type itself is compiler-internal.
iOS allmacOS all
DefaultStringInterpolation.init(literalCapacity:interpolationCount:)
init(literalCapacity: Int, interpolationCount: Int)
Compiler-driven during interpolation lowering; users don't call directly.
iOS allmacOS all
DefaultStringInterpolation.appendLiteral(_:)
mutating func appendLiteral(_ literal: String)
Implicit in interpolation lowering to concatenation; literal segments appended.
iOS allmacOS all
DefaultStringInterpolation.appendInterpolation(_:)
mutating func appendInterpolation<T>(_ value: T) [+ CustomStringConvertible / TextOutputStreamable constrained family]
All \(value) segments lowered to description/concat at compile time; constrained overload family collapses to one path.
iOS allmacOS all
DefaultStringInterpolation.appendInterpolation(_:default:)
mutating func appendInterpolation<T>(_ value: T?, default: @autoclosure () -> some StringProtocol)
Optional-with-default interpolation segment not a verified lowering path; basic interpolation is full.
iOS allmacOS all
StringInterpolationProtocol
protocol StringInterpolationProtocol { init(literalCapacity:interpolationCount:); mutating func appendLiteral(_:) }
DefaultStringInterpolation path is built-in; custom user conformances + appendInterpolation overloads are not a modeled witness path.
iOS allmacOS all
StringInterpolationProtocol.appendLiteral(_:)
mutating func appendLiteral(_ literal: Self.StringLiteralType)
Honored for the default type only; arbitrary conforming types not lowered.
iOS allmacOS all
ExpressibleByStringInterpolation
protocol ExpressibleByStringInterpolation : ExpressibleByStringLiteral
String/Substring interpolation supported; custom-type conformance via init(stringInterpolation:) not a modeled path.
iOS allmacOS all
TextOutputStream
protocol TextOutputStream { mutating func write(_ string: String) }
User conforming sink types compile and print/debugPrint/dump/write(to:) target String sinks or nominal sinks with a String stored field; true protocol witness dispatch remains unmodeled.
iOS allmacOS all
TextOutputStreamable
protocol TextOutputStreamable { func write<Target>(to target: inout Target) where Target : TextOutputStream }
String literal write(to:) appends to String sinks or nominal sinks with a String stored field; arbitrary conforming values and generic witness dispatch remain unmodeled.
iOS allmacOS all
StaticString
@frozen struct StaticString : Sendable, ExpressibleByStringLiteral
Compile-time interned; used by #file/#function/assert/fatalError default args (coverage.md StaticString ✅).
iOS allmacOS all
StaticString.init()
init()
Empty static string; interned literal path.
iOS allmacOS all
StaticString.utf8Start
var utf8Start: UnsafePointer<UInt8> { get }
Pointer-representation property stubbed (coverage notes direct pointer API stubs); UnsafePointer family unmodeled per gaps.md.
iOS allmacOS all
StaticString.utf8CodeUnitCount
var utf8CodeUnitCount: Int { get }
Resolved from interned literal length at compile time.
iOS allmacOS all
StaticString.hasPointerRepresentation / isASCII / unicodeScalar
var hasPointerRepresentation: Bool { get }; var isASCII: Bool { get }; var unicodeScalar: Unicode.Scalar { get }
Classification props are compile-time-resolved stubs; deep Unicode.Scalar surface limited (gaps.md Unicode internals ❌).
iOS allmacOS all
StaticString.withUTF8Buffer(_:)
func withUTF8Buffer<R>(_ body: (UnsafeBufferPointer<UInt8>) -> R) -> R
Depends on UnsafeBufferPointer (gaps.md: buffer pointers are stubs with no iteration/subscripts).
iOS allmacOS all
StaticString.description / debugDescription
var description: String { get }; var debugDescription: String { get }
Maps to interned literal string for printing.
iOS allmacOS all
KeyValuePairs
@frozen struct KeyValuePairs<Key, Value> : ExpressibleByDictionaryLiteral, RandomAccessCollection
Lowered to an ordered array of (key,value) pairs (init.c:2986); for-in over pairs verified to match swift.
iOS allmacOS all
KeyValuePairs.init(dictionaryLiteral:)
init(dictionaryLiteral elements: (Key, Value)...)
Dictionary-literal lowered to ordered pair array preserving order.
iOS allmacOS all
KeyValuePairs subscript/startIndex/endIndex/count
subscript(position: Int) -> (key: Key, value: Value) { get }; var startIndex/endIndex: Int
Backed by array mapping with flat Int indices; RandomAccessCollection surface via array lowering.
iOS allmacOS all
KeyValuePairs.description / debugDescription
var description: String { get }; var debugDescription: String { get }
Inferred KeyValuePairs description/debugDescription print verified with ordered key-value pairs.
iOS allmacOS all
KeyValuePairs.span
var span: Span<Element> { get }
Span type not modeled (gaps.md ownership/spans ❌); @available(iOS 12.2, macOS 10.14.4).
iOS 12.2macOS 10.14.4
ContiguousArray
@frozen struct ContiguousArray<Element>
Desugared to the optimized TY_ARRAY mapping (coverage.md: zero-overhead to standard array); not a distinct storage type.
iOS allmacOS all
ContiguousArray init/append/subscript/count (Array-equivalent surface)
init(); init(_ s: S); mutating func append(_:); subscript(_ i: Int) -> Element; var count: Int
Inherits the full Array lowering/runtime; COW/storage semantics pragmatic per coverage caveat.
iOS allmacOS all
ContiguousArray Codable (encode(to:)/init(from:))
func encode(to:) throws where Element : Encodable; init(from:) throws where Element : Decodable
Codable bridge exists for arrays (minimal JSON/plist) but typed/generic Codable hierarchy is limited per coverage.
iOS allmacOS all
CollectionOfOne
@frozen struct CollectionOfOne<Element> : RandomAccessCollection, MutableCollection
Lowered to a single-element array; native + WASM CollectionOfOne suite verifies Int and String paths.
iOS allmacOS all
CollectionOfOne.init(_:)
init(_ element: Element)
Constructs a one-element array; Int and String elements verified.
iOS allmacOS all
CollectionOfOne.startIndex/endIndex/index(after:)/index(before:)/subscript/count
var startIndex: Int {0}; var endIndex: Int {1}; subscript(_:) -> Element
startIndex/endIndex/count/subscript/iteration verified through CollectionOfOne tests.
iOS allmacOS all
EmptyCollection
@frozen struct EmptyCollection<Element> : RandomAccessCollection, MutableCollection
Lowered to count-0 array (init.c:2926); verified EmptyCollection<Int>().count == 0.
iOS allmacOS all
EmptyCollection.init() / makeIterator() / startIndex / endIndex / count
init(); func makeIterator() -> Iterator; var startIndex/endIndex: Int {0}
Empty-array mapping; iteration produces no elements.
iOS allmacOS all
EmptyCollection.Iterator.next()
mutating func next() -> Element?
Always returns nil via empty-array iteration.
iOS allmacOS all
Repeated
@frozen struct Repeated<Element> : RandomAccessCollection
Standalone expressions work through an eager array-backed value, including for-in/subscript; no distinct stdlib Repeated type identity or lazy wrapper is modeled.
iOS allmacOS all
Repeated.count / repeatedValue / startIndex / endIndex / subscript
let count: Int; let repeatedValue: Element; subscript(position: Int) -> Element { get }
Array-backed count/startIndex/endIndex/isEmpty/subscript work; repeatedValue is backed by the first stored element, so the zero-count source-value semantic is not represented.
iOS allmacOS all
UnfoldSequence
@frozen struct UnfoldSequence<Element, State> : Sequence, IteratorProtocol
sequence(first:) and sequence(state:) can materialize stored nil-terminating Int streams as eager arrays for for-in and manual next() consumption; lazy identity, generic element/state, valid 0 elements, and iterator identity are not modeled.
iOS allmacOS all
UnfoldSequence.next()
mutating func next() -> Element?
Array-backed unfold sequences consume the first stored Int element and return nil when empty; true lazy state machine identity, generic element/state, and valid 0 payload semantics remain unmodeled.
iOS allmacOS all
UnfoldFirstSequence (typealias)
typealias UnfoldFirstSequence<T> = UnfoldSequence<T, (T?, Bool)>
Alias name is accepted, and sequence(first:) can materialize stored nil-terminating Int streams as eager arrays for for-in; true alias/value identity and iterator state are not modeled.
iOS allmacOS all
Zip2Sequence
@frozen struct Zip2Sequence<S1, S2> : Sequence where S1 : Sequence, S2 : Sequence
zip(...) lowering fuses paired tuples for for-in/value use (init.c:3500); per coverage.md zip ✅. Not a heap iterator object.
iOS allmacOS all
Zip2Sequence.makeIterator() / underestimatedCount
func makeIterator() -> Iterator; var underestimatedCount: Int { get }
Iteration via fused tuple array works; explicit Iterator/underestimatedCount surface not separately exposed.
iOS allmacOS all
Zip2Sequence.Iterator.next()
mutating func next() -> (S1.Element, S2.Element)?
for-in over zip works via compile-time fusion; manual iterator.next() not a verified path.
iOS allmacOS all
StrideTo / StrideToIterator
@frozen struct StrideTo<Element : Strideable> : Sequence; struct StrideToIterator<Element>
stride(from:to:by:) only lowers inline in for-in (flat loop); StrideTo not materialized as a stored value (undefined _stride symbol when assigned).
iOS allmacOS all
StrideThrough / StrideThroughIterator
@frozen struct StrideThrough<Element : Strideable> : Sequence; struct StrideThroughIterator<Element>
stride(from:through:by:) inline-loop only; no materialized StrideThrough value type.
iOS allmacOS all
Comparable.> (default)
static func > (lhs: Self, rhs: Self) -> Bool
Derived from <; comparison lowered to native instructions (coverage Comparable ✅).
iOS allmacOS all
Comparable.<= (default)
static func <= (lhs: Self, rhs: Self) -> Bool
Default impl via <; native compare.
iOS allmacOS all
Comparable.>= (default)
static func >= (lhs: Self, rhs: Self) -> Bool
Default impl via <; native compare.
iOS allmacOS all
Comparable.... (range operator)
static func ... (minimum: Self, maximum: Self) -> ClosedRange<Self>
ClosedRange construction supported (coverage ranges ✅); common integer/char ranges lowered.
iOS allmacOS all
Comparable...< (range operator)
static func ..< (minimum: Self, maximum: Self) -> Range<Self>
Range construction supported; half-open ranges lowered to flat loops/contains.
iOS allmacOS all
Equatable.!= (default)
static func != (lhs: Self, rhs: Self) -> Bool
Default inverse of ==; Equatable synthesis/witness paths exist (coverage ✅).
iOS allmacOS all