diff --git a/.github/actions/build-example/action.yml b/.github/actions/build-example/action.yml index a1bdbb5..5f237c9 100644 --- a/.github/actions/build-example/action.yml +++ b/.github/actions/build-example/action.yml @@ -11,7 +11,7 @@ inputs: xcode-version: description: Xcode version to use required: false - default: "16.4" + default: "26.3" runs: using: composite diff --git a/.github/workflows/ag_example.yml b/.github/workflows/ag_example.yml index a096688..009b8e2 100644 --- a/.github/workflows/ag_example.yml +++ b/.github/workflows/ag_example.yml @@ -10,7 +10,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/ag_example.yml' @@ -23,7 +23,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/ag_example.yml' @@ -48,4 +48,4 @@ jobs: with: scheme: AGExample destination: ${{ matrix.destination }} - xcode-version: "16.4" + xcode-version: "26.3" diff --git a/.github/workflows/bls_example.yml b/.github/workflows/bls_example.yml index 4c31cad..a66fcdd 100644 --- a/.github/workflows/bls_example.yml +++ b/.github/workflows/bls_example.yml @@ -10,7 +10,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/bls_example.yml' @@ -23,7 +23,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/bls_example.yml' @@ -46,4 +46,4 @@ jobs: with: scheme: BLSExample destination: ${{ matrix.destination }} - xcode-version: "16.4" + xcode-version: "26.3" diff --git a/.github/workflows/coresvg_example.yml b/.github/workflows/coresvg_example.yml index 7650eb2..7ee0a73 100644 --- a/.github/workflows/coresvg_example.yml +++ b/.github/workflows/coresvg_example.yml @@ -10,7 +10,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/coresvg_example.yml' @@ -23,7 +23,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/coresvg_example.yml' @@ -48,4 +48,4 @@ jobs: with: scheme: CoreSVGExample destination: ${{ matrix.destination }} - xcode-version: "16.4" + xcode-version: "26.3" diff --git a/.github/workflows/coreui_example.yml b/.github/workflows/coreui_example.yml index 05cb39d..9ee9a0d 100644 --- a/.github/workflows/coreui_example.yml +++ b/.github/workflows/coreui_example.yml @@ -10,7 +10,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/coreui_example.yml' @@ -23,7 +23,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/coreui_example.yml' @@ -48,4 +48,4 @@ jobs: with: scheme: CoreUIExample destination: ${{ matrix.destination }} - xcode-version: "16.4" + xcode-version: "26.3" diff --git a/.github/workflows/gf_example.yml b/.github/workflows/gf_example.yml index 10d88ce..243f02f 100644 --- a/.github/workflows/gf_example.yml +++ b/.github/workflows/gf_example.yml @@ -10,7 +10,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/gf_example.yml' @@ -23,7 +23,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/gf_example.yml' diff --git a/.github/workflows/rb_example.yml b/.github/workflows/rb_example.yml index 0579c61..2f49901 100644 --- a/.github/workflows/rb_example.yml +++ b/.github/workflows/rb_example.yml @@ -10,7 +10,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/rb_example.yml' @@ -23,7 +23,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/rb_example.yml' @@ -48,4 +48,4 @@ jobs: with: scheme: RBExample destination: ${{ matrix.destination }} - xcode-version: "16.4" + xcode-version: "26.3" diff --git a/.github/workflows/sfsymbols_example.yml b/.github/workflows/sfsymbols_example.yml index defac9e..ad81754 100644 --- a/.github/workflows/sfsymbols_example.yml +++ b/.github/workflows/sfsymbols_example.yml @@ -10,7 +10,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/sfsymbols_example.yml' @@ -23,7 +23,7 @@ on: - 'Example/Project.swift' - 'Example/Tuist.swift' - 'Example/Tuist/**' - - 'Example/.mise.toml' + - 'Example/mise.toml' - 'Package.swift' - '.github/actions/build-example/**' - '.github/workflows/sfsymbols_example.yml' @@ -48,4 +48,4 @@ jobs: with: scheme: SFSymbolsExample destination: ${{ matrix.destination }} - xcode-version: "16.4" + xcode-version: "26.3" diff --git a/AG/2021/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface b/AG/2021/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface index 38f0230..dac6eda 100644 --- a/AG/2021/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface +++ b/AG/2021/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface @@ -1,232 +1,303 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target arm64-apple-ios15.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +312,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,445 +336,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } + public var _bodyPointer: Swift.UnsafeRawPointer { + get + } + public var valueType: any Any.Type { + get + } + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { get + nonmutating set } - public var description: Swift.String { + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { get + nonmutating set } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool -} -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2021/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/AG/2021/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface index 67da68f..773afd6 100644 --- a/AG/2021/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +++ b/AG/2021/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -1,232 +1,303 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target x86_64-apple-ios15.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +312,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,445 +336,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } + public var _bodyPointer: Swift.UnsafeRawPointer { + get + } + public var valueType: any Any.Type { + get + } + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { get + nonmutating set } - public var description: Swift.String { + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { get + nonmutating set } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool -} -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface b/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface index 42b8031..7c5f3f1 100644 --- a/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface +++ b/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface @@ -1,232 +1,303 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target arm64-apple-macos12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +312,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,445 +336,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } + public var _bodyPointer: Swift.UnsafeRawPointer { + get + } + public var valueType: any Any.Type { + get + } + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { get + nonmutating set } - public var description: Swift.String { + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { get + nonmutating set } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool -} -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface b/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface index 5fd74ef..886801e 100644 --- a/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface +++ b/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface @@ -1,232 +1,303 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target arm64e-apple-macos12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +312,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,445 +336,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } + public var _bodyPointer: Swift.UnsafeRawPointer { + get + } + public var valueType: any Any.Type { + get + } + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { get + nonmutating set } - public var description: Swift.String { + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { get + nonmutating set } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool -} -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface b/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface index f56afd3..c4ec315 100644 --- a/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface +++ b/AG/2021/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface @@ -1,232 +1,303 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target x86_64-apple-macos12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +312,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,445 +336,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } + public var _bodyPointer: Swift.UnsafeRawPointer { + get + } + public var valueType: any Any.Type { + get + } + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { get + nonmutating set } - public var description: Swift.String { + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { get + nonmutating set } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool -} -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2024/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface b/AG/2024/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface index 57bcc37..32011cf 100644 --- a/AG/2024/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface +++ b/AG/2024/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-ios-simulator.swiftinterface @@ -1,232 +1,306 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target arm64-apple-ios18.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.Signature : Swift.Equatable { + public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +} +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +315,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,448 +339,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } -} -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) -} -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { + public var _bodyPointer: Swift.UnsafeRawPointer { get } - public var description: Swift.String { + public var valueType: any Any.Type { get } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Signature : Swift.Equatable { - public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { + get + nonmutating set } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { + get + nonmutating set } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify + } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify + } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2024/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/AG/2024/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface index 1d676ea..eea2588 100644 --- a/AG/2024/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +++ b/AG/2024/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -1,232 +1,306 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target x86_64-apple-ios18.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.Signature : Swift.Equatable { + public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +} +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +315,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,448 +339,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } -} -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) -} -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { + public var _bodyPointer: Swift.UnsafeRawPointer { get } - public var description: Swift.String { + public var valueType: any Any.Type { get } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Signature : Swift.Equatable { - public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { + get + nonmutating set } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { + get + nonmutating set } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify + } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify + } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface b/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface index 14a5c95..b8fa3f5 100644 --- a/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface +++ b/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64-apple-macos.swiftinterface @@ -1,232 +1,306 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target arm64-apple-macos15.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.Signature : Swift.Equatable { + public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +} +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +315,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,448 +339,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } -} -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) -} -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { + public var _bodyPointer: Swift.UnsafeRawPointer { get } - public var description: Swift.String { + public var valueType: any Any.Type { get } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Signature : Swift.Equatable { - public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { + get + nonmutating set } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { + get + nonmutating set } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify + } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify + } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface b/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface index 6ad368a..8ff8ac9 100644 --- a/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface +++ b/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/arm64e-apple-macos.swiftinterface @@ -1,232 +1,306 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target arm64e-apple-macos15.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.Signature : Swift.Equatable { + public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +} +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +315,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,448 +339,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } -} -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) -} -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { + public var _bodyPointer: Swift.UnsafeRawPointer { get } - public var description: Swift.String { + public var valueType: any Any.Type { get } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Signature : Swift.Equatable { - public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { + get + nonmutating set } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { + get + nonmutating set } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify + } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify + } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface b/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface index 0092755..5235188 100644 --- a/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface +++ b/AG/2024/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/AttributeGraph.framework/Versions/A/Modules/AttributeGraph.swiftmodule/x86_64-apple-macos.swiftinterface @@ -1,232 +1,306 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target x86_64-apple-macos15.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.Signature : Swift.Equatable { + public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +} +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +315,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,448 +339,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } -} -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) -} -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { + public var _bodyPointer: Swift.UnsafeRawPointer { get } - public var description: Swift.String { + public var valueType: any Any.Type { get } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Signature : Swift.Equatable { - public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { + get + nonmutating set } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { + get + nonmutating set } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify + } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify + } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2024/AttributeGraph.xcframework/xros-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-xros-simulator.swiftinterface b/AG/2024/AttributeGraph.xcframework/xros-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-xros-simulator.swiftinterface index 81471d5..1c2d78f 100644 --- a/AG/2024/AttributeGraph.xcframework/xros-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-xros-simulator.swiftinterface +++ b/AG/2024/AttributeGraph.xcframework/xros-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/arm64-apple-xros-simulator.swiftinterface @@ -1,232 +1,306 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target arm64-apple-xros2.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.Signature : Swift.Equatable { + public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +} +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +315,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,448 +339,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } -} -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) -} -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { + public var _bodyPointer: Swift.UnsafeRawPointer { get } - public var description: Swift.String { + public var valueType: any Any.Type { get } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Signature : Swift.Equatable { - public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { + get + nonmutating set } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { + get + nonmutating set } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify + } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify + } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/2024/AttributeGraph.xcframework/xros-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-xros-simulator.swiftinterface b/AG/2024/AttributeGraph.xcframework/xros-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-xros-simulator.swiftinterface index ce9a25b..4ad4dc9 100644 --- a/AG/2024/AttributeGraph.xcframework/xros-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-xros-simulator.swiftinterface +++ b/AG/2024/AttributeGraph.xcframework/xros-arm64-x86_64-simulator/AttributeGraph.framework/Modules/AttributeGraph.swiftmodule/x86_64-apple-xros-simulator.swiftinterface @@ -1,232 +1,306 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) +// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29) // swift-module-flags: -target x86_64-apple-xros2.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph -// swift-module-flags-ignorable: -interface-compiler-version 6.1 +// swift-module-flags-ignorable: -interface-compiler-version 6.2 @_exported public import AttributeGraph public import Swift public import _Concurrency public import _StringProcessing public import _SwiftConcurrencyShims -extension AttributeGraph.AnyAttribute { - public init(_ attribute: AttributeGraph.Attribute) - public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute - public static var current: AttributeGraph.AnyAttribute? { - get - } - public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute - public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) - public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var _bodyType: any Any.Type { - get - } - public var _bodyPointer: Swift.UnsafeRawPointer { - get - } - public var valueType: any Any.Type { - get - } - public var indirectDependency: AttributeGraph.AnyAttribute? { - get - nonmutating set - } +extension AttributeGraph.Graph { + public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int } -extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { - @inlinable public var description: Swift.String { - get { "#\(rawValue)" } +extension AttributeGraph.Graph { + public static func withoutUpdate(_ body: () -> V) -> V + public func withoutSubgraphInvalidation(_ body: () -> V) -> V + public func withDeadline(_: Swift.UInt64, _: () -> V) -> V + public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) + public func onUpdate(_ callback: @escaping () -> Swift.Void) + public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +} +extension AttributeGraph.Graph { + @_transparent public func startProfiling() { + __AGGraphStartProfiling(self) + } + @_transparent public func stopProfiling() { + __AGGraphStopProfiling(self) + } + @_transparent public func resetProfile() { + __AGGraphResetProfile(self) + } + public static func startProfiling() + public static func stopProfiling() + public static func resetProfile() +} +extension AttributeGraph.Graph { + @_transparent public var mainUpdates: Swift.Int { + @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } } } -public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void -@frozen public struct PointerOffset { - public var byteOffset: Swift.Int - public init(byteOffset: Swift.Int) +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + @_silgen_name("AGGraphGetOutputValue") + @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? + #endif + @_silgen_name("AGGraphSetOutputValue") + @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) } -extension AttributeGraph.PointerOffset { - public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { + return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) + } } -extension AttributeGraph.PointerOffset { - public static func invalidScenePointer() -> Swift.UnsafeMutablePointer - public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset - public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset +extension AttributeGraph.Graph { + #if compiler(>=5.3) && $NonescapableTypes + public func archiveJSON(name: Swift.String?) + #endif } -extension AttributeGraph.PointerOffset where Base == Member { - public init() +extension AttributeGraph.Subgraph { + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags } -extension Swift.UnsafePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - } - public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer +extension AttributeGraph.Subgraph { + public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int + public func apply(_ body: () -> Value) -> Value + public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) } -extension Swift.UnsafeMutablePointer { - public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { - unsafeAddress - nonmutating unsafeMutableAddress - } - public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer +extension AttributeGraph.Subgraph { + public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) + public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) + public static func endTreeElement(value: AttributeGraph.Attribute) } -@frozen public struct External { - public init() +public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool +public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool +extension AttributeGraph.ComparisonOptions { + public init(mode: AttributeGraph.ComparisonMode) } -extension AttributeGraph.External : AttributeGraph._AttributeBody { - public static var comparisonMode: AttributeGraph.ComparisonMode { - get - } - public static var flags: AttributeGraph.External.Flags { +public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) +extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { + public init(_ type: any Any.Type) + public var type: any Any.Type { get } - public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) -} -extension AttributeGraph.External : Swift.CustomStringConvertible { public var description: Swift.String { get } + public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool } -@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { - public var identifier: AttributeGraph.AnyAttribute - public init(identifier: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(value: Value) - public init(type _: Value.Type) - public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody - public var wrappedValue: Value { - unsafeAddress - nonmutating set +extension AttributeGraph.Signature : Swift.Equatable { + public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +} +extension AttributeGraph.TupleType { + @_transparent public init(_ types: [any Any.Type]) { + self.init(count: types.count, elements: types.map(Metadata.init)) + } + @_transparent public init(_ type: any Any.Type) { + self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) + } + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { count == 0 } } - public var projectedValue: AttributeGraph.Attribute { - get - set + @_transparent public var indices: Swift.Range { + @_transparent get { 0 ..< count } } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public var type: any Any.Type { + @_transparent get { + unsafeBitCast(rawValue, to: Any.Type.self) + } } - public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { - get + @_transparent public func type(at index: Swift.Int) -> any Any.Type { + elementType(at: index).type + } + @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { + elementOffset(at: index, type: Metadata(type)) + } + @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) + } + @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { + __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) + } +} +@_silgen_name("AGTupleWithBuffer") +public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) +extension AttributeGraph.UnsafeTuple { + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute - public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute - public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute - public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor - public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) - public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool - public var graph: AttributeGraph.Graph { - get + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public var subgraph: AttributeGraph.Subgraph { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { address(as: T.self) } } - public var value: Value { - unsafeAddress - nonmutating set + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { address(of: index, as: T.self) } } - public var valueState: AttributeGraph.ValueState { - get +} +extension AttributeGraph.UnsafeMutableTuple { + @_transparent public init(with tupleType: AttributeGraph.TupleType) { + self.init( + type: tupleType, + value: UnsafeMutableRawPointer.allocate( + byteCount: tupleType.size, + alignment: -1 + ) + ) + } + @_transparent public func initialize(at index: Swift.Int, to element: T) { + withUnsafePointer(to: element) { elementPointer in + type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) + } + } + @_transparent public func deinitialize() { + type.destroy(value) + } + @_transparent public func deinitialize(at index: Swift.Int) { + type.destroy(value, at: index) + } + @_transparent public func deallocate(initialized: Swift.Bool) { + if initialized { + deinitialize() + } + value.deallocate() + } + @_transparent public var count: Swift.Int { + @_transparent get { type.count } } - public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public func setValue(_ value: Value) -> Swift.Bool - public var hasValue: Swift.Bool { - get + @_transparent public var isEmpty: Swift.Bool { + @_transparent get { type.isEmpty } } - public func updateValue() - public func prefetchValue() - public func invalidateValue() - public func validate() - public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public var flags: AttributeGraph.Attribute.Flags { - get - nonmutating set + @_transparent public var indices: Swift.Range { + @_transparent get { type.indices } } - public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) -} -extension AttributeGraph.Attribute : Swift.Hashable { - public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { - get + @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + guard type.type == T.self else { + preconditionFailure() + } + return value.assumingMemoryBound(to: T.self) + } + @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { + value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) + .assumingMemoryBound(to: T.self) + } + public subscript() -> T { + @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + } + public subscript(index: Swift.Int) -> T { + @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } + @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } } } -extension AttributeGraph.Attribute : Swift.CustomStringConvertible { - public var description: Swift.String { +@discardableResult +public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool +@discardableResult +public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool +@frozen public struct AnyRuleContext : Swift.Equatable { + public var attribute: AttributeGraph.AnyAttribute + public init(attribute: AttributeGraph.AnyAttribute) + public init(_ context: AttributeGraph.RuleContext) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } -} -extension AttributeGraph.Attribute { - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule - public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule -} -@_silgen_name("AGGraphCreateAttribute") -@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute -@_silgen_name("AGGraphGetValue") -@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphSetValue") -@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool -public protocol AttributeBodyVisitor { - mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody -} -public protocol ObservedAttribute : AttributeGraph._AttributeBody { - mutating func destroy() -} -extension AttributeGraph.ObservedAttribute { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } + #endif + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext + public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -public protocol _AttributeBody { - static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - static var _hasDestroySelf: Swift.Bool { get } - static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - static var comparisonMode: AttributeGraph.ComparisonMode { get } - typealias Flags = AttributeGraph._AttributeType.Flags - static var flags: Self.Flags { get } -} -extension AttributeGraph._AttributeBody { - public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) - public static var _hasDestroySelf: Swift.Bool { +@frozen public struct RuleContext : Swift.Equatable { + public var attribute: AttributeGraph.Attribute + public init(attribute: AttributeGraph.Attribute) + public subscript(attribute: AttributeGraph.Attribute) -> V { + unsafeAddress + } + #if compiler(>=5.3) && $NonescapableTypes + public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { get } - public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) - public static var comparisonMode: AttributeGraph.ComparisonMode { + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { get } - public static var flags: Self.Flags { + #endif + public var value: Value { + unsafeAddress + nonmutating set + } + public var hasValue: Swift.Bool { get } + public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) + public func update(body: () -> Swift.Void) + public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } +@_silgen_name("AGGraphGetInputValue") +@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphWithUpdate") +@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) @frozen @propertyWrapper @dynamicMemberLookup public struct WeakAttribute { internal var base: AttributeGraph.AnyWeakAttribute public init(base: AttributeGraph.AnyWeakAttribute) public init() public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.Attribute?) + #endif + #if compiler(>=5.3) && $NonescapableTypes public var wrappedValue: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var projectedValue: AttributeGraph.Attribute? { get set _modify } + #endif + #if compiler(>=5.3) && $NonescapableTypes public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.Attribute? { get set } + #endif + #if compiler(>=5.3) && $NonescapableTypes public var value: Value? { get } + #endif + #if compiler(>=5.3) && $NonescapableTypes public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif } extension AttributeGraph.WeakAttribute : Swift.Hashable { public static func == (a: AttributeGraph.WeakAttribute, b: AttributeGraph.WeakAttribute) -> Swift.Bool @@ -241,13 +315,17 @@ extension AttributeGraph.WeakAttribute : Swift.CustomStringConvertible { } } extension AttributeGraph.AnyWeakAttribute { + #if compiler(>=5.3) && $NonescapableTypes public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif public init(_ weakAttribute: AttributeGraph.WeakAttribute) public func unsafeCast(to _: Value.Type) -> AttributeGraph.WeakAttribute + #if compiler(>=5.3) && $NonescapableTypes public var attribute: AttributeGraph.AnyAttribute? { get set } + #endif } extension AttributeGraph.AnyWeakAttribute : Swift.Hashable { public static func == (lhs: AttributeGraph.AnyWeakAttribute, rhs: AttributeGraph.AnyWeakAttribute) -> Swift.Bool @@ -261,448 +339,446 @@ extension AttributeGraph.AnyWeakAttribute : Swift.CustomStringConvertible { get { attribute?.description ?? "nil" } } } -public protocol Rule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - var value: Self.Value { get } +public protocol _AttributeBody { + static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + static var _hasDestroySelf: Swift.Bool { get } + static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + static var comparisonMode: AttributeGraph.ComparisonMode { get } + typealias Flags = AttributeGraph._AttributeType.Flags + static var flags: Self.Flags { get } } -extension AttributeGraph.Rule { - public static var initialValue: Self.Value? { +extension AttributeGraph._AttributeBody { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) -} -extension AttributeGraph.Rule { - public var attribute: AttributeGraph.Attribute { + public static func _updateDefault(_ pointer: Swift.UnsafeMutableRawPointer) + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public var context: AttributeGraph.RuleContext { + public static var flags: Self.Flags { get } } -extension AttributeGraph.Rule where Self : Swift.Hashable { - public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value - public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? - public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer +public protocol ObservedAttribute : AttributeGraph._AttributeBody { + mutating func destroy() } -@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var arg: AttributeGraph.Attribute - public let body: (Source) -> Value - public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) - public var value: Value { - get - } - public static var flags: AttributeGraph.Map.Flags { - get - } - public var description: Swift.String { +extension AttributeGraph.ObservedAttribute { + public static func _destroySelf(_ pointer: Swift.UnsafeMutableRawPointer) + public static var _hasDestroySelf: Swift.Bool { get } } -public protocol StatefulRule : AttributeGraph._AttributeBody { - associatedtype Value - static var initialValue: Self.Value? { get } - mutating func updateValue() -} -extension AttributeGraph.StatefulRule { - public static var initialValue: Self.Value? { - get - } - public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) - public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +public protocol AttributeBodyVisitor { + mutating func visit(body: Swift.UnsafePointer) where Body : AttributeGraph._AttributeBody } -extension AttributeGraph.StatefulRule { - public var attribute: AttributeGraph.Attribute { +@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var root: AttributeGraph.Attribute + public var keyPath: Swift.KeyPath + public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) + public var value: Value { get } - public var context: AttributeGraph.RuleContext { + public static var flags: AttributeGraph.Focus.Flags { get } - public var value: Self.Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public var description: Swift.String { get } } -@frozen public struct Focus : AttributeGraph.Rule, Swift.CustomStringConvertible { - public var root: AttributeGraph.Attribute - public var keyPath: Swift.KeyPath - public init(root: AttributeGraph.Attribute, keyPath: Swift.KeyPath) +@frozen public struct Map : AttributeGraph.Rule, Swift.CustomStringConvertible { + public var arg: AttributeGraph.Attribute + public let body: (Source) -> Value + public init(_ arg: AttributeGraph.Attribute, _ body: @escaping (Source) -> Value) public var value: Value { get } - public static var flags: AttributeGraph.Focus.Flags { + public static var flags: AttributeGraph.Map.Flags { get } public var description: Swift.String { get } } -@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { - public var base: AttributeGraph.AnyOptionalAttribute - public init() - public init(base: AttributeGraph.AnyOptionalAttribute) - public init(_ attribute: AttributeGraph.Attribute) - public init(_ attribute: AttributeGraph.Attribute?) - public init(_ weakAttribute: AttributeGraph.WeakAttribute) - public var attribute: AttributeGraph.Attribute? { +public protocol StatefulRule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + mutating func updateValue() +} +extension AttributeGraph.StatefulRule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get - set } - public var value: Value? { + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) +} +extension AttributeGraph.StatefulRule { + public var attribute: AttributeGraph.Attribute { get } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? - public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? - public var wrappedValue: Value? { + public var context: AttributeGraph.RuleContext { get } - public var projectedValue: AttributeGraph.Attribute? { - get - set - _modify + public var value: Self.Value { + unsafeAddress + nonmutating set } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + public var hasValue: Swift.Bool { get } } -extension AttributeGraph.OptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { +public protocol Rule : AttributeGraph._AttributeBody { + associatedtype Value + #if compiler(>=5.3) && $NonescapableTypes + static var initialValue: Self.Value? { get } + #endif + var value: Self.Value { get } +} +extension AttributeGraph.Rule { + #if compiler(>=5.3) && $NonescapableTypes + public static var initialValue: Self.Value? { get } + #endif + public static func _update(_ pointer: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) + public static func _updateDefault(_: Swift.UnsafeMutableRawPointer) } -extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { +extension AttributeGraph.Rule { + public var attribute: AttributeGraph.Attribute { + get + } + public var context: AttributeGraph.RuleContext { get } } -@frozen public struct AnyOptionalAttribute { +extension AttributeGraph.Rule where Self : Swift.Hashable { + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func cachedValueIfExists(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?) -> Self.Value? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public static func _cachedValue(options: AttributeGraph.AGCachedValueOptions = [], owner: AttributeGraph.AnyAttribute?, hashValue: Swift.Int, bodyPtr: Swift.UnsafeRawPointer, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.UnsafePointer + #endif +} +@frozen @propertyWrapper @dynamicMemberLookup public struct Attribute { public var identifier: AttributeGraph.AnyAttribute - public init() - public init(_ attribute: AttributeGraph.AnyAttribute) - public init(_ attribute: AttributeGraph.AnyAttribute?) - public init(_ attribute: AttributeGraph.OptionalAttribute) - public static var current: AttributeGraph.AnyOptionalAttribute { - get + public init(identifier: AttributeGraph.AnyAttribute) + public init(_ attribute: AttributeGraph.Attribute) + public init(value: Value) + public init(type _: Value.Type) + #if compiler(>=5.3) && $NonescapableTypes + public init(body: Swift.UnsafePointer, value: Swift.UnsafePointer?, flags: AttributeGraph._AttributeType.Flags = [], update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) where Body : AttributeGraph._AttributeBody + #endif + public var wrappedValue: Value { + unsafeAddress + nonmutating set } - public var attribute: AttributeGraph.AnyAttribute? { + public var projectedValue: AttributeGraph.Attribute { get set } - public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? - public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute -} -extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool - public func hash(into hasher: inout Swift.Hasher) - public var hashValue: Swift.Int { + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { - public var description: Swift.String { + public subscript(keyPath keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { get } -} -@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { - public let identifier: AttributeGraph.AnyAttribute - public init(source: AttributeGraph.Attribute) - public var source: AttributeGraph.Attribute { + public subscript(offset body: (inout Value) -> AttributeGraph.PointerOffset) -> AttributeGraph.Attribute { get - nonmutating set } - public var dependency: AttributeGraph.AnyAttribute? { + public func unsafeCast(to type: V.Type) -> AttributeGraph.Attribute + public func unsafeOffset(at offset: Swift.Int, as _: Member.Type) -> AttributeGraph.Attribute + public func applying(offset: AttributeGraph.PointerOffset) -> AttributeGraph.Attribute + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: V.Type, invalidating: Swift.Bool, _ body: (inout V) -> Swift.Void) + public func breadthFirstSearch(options: AttributeGraph.SearchOptions = [], _ body: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var graph: AttributeGraph.Graph { get - nonmutating set } - public var value: Value { + public var subgraph: AttributeGraph.Subgraph { get + } + public var value: Value { + unsafeAddress nonmutating set - nonmutating _modify } - public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) - public var wrappedValue: Value { + public var valueState: AttributeGraph.ValueState { get - nonmutating set - nonmutating _modify } - public var projectedValue: AttributeGraph.Attribute { + public func valueAndFlags(options: AttributeGraph.AGValueOptions = []) -> (value: Value, flags: AttributeGraph.AGChangedValueFlags) + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public func setValue(_ value: Value) -> Swift.Bool + public var hasValue: Swift.Bool { get } - public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + public func updateValue() + public func prefetchValue() + public func invalidateValue() + public func validate() + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public typealias Flags = AttributeGraph.AnyAttribute.Flags + public var flags: AttributeGraph.Attribute.Flags { get + nonmutating set } + public func setFlags(_ newFlags: AttributeGraph.Attribute.Flags, mask: AttributeGraph.Attribute.Flags) } -extension AttributeGraph.IndirectAttribute : Swift.Hashable { - public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool +extension AttributeGraph.Attribute : Swift.Hashable { + public static func == (a: AttributeGraph.Attribute, b: AttributeGraph.Attribute) -> Swift.Bool public func hash(into hasher: inout Swift.Hasher) public var hashValue: Swift.Int { get } } -@frozen public struct AnyRuleContext : Swift.Equatable { - public var attribute: AttributeGraph.AnyAttribute - public init(attribute: AttributeGraph.AnyAttribute) - public init(_ context: AttributeGraph.RuleContext) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { - get - } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { +extension AttributeGraph.Attribute : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public func unsafeCast(to _: V.Type) -> AttributeGraph.RuleContext - public static func == (a: AttributeGraph.AnyRuleContext, b: AttributeGraph.AnyRuleContext) -> Swift.Bool } -@frozen public struct RuleContext : Swift.Equatable { - public var attribute: AttributeGraph.Attribute - public init(attribute: AttributeGraph.Attribute) - public subscript(attribute: AttributeGraph.Attribute) -> V { - unsafeAddress - } - public subscript(weakAttribute: AttributeGraph.WeakAttribute) -> V? { +extension AttributeGraph.Attribute { + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.Rule + public init(_ rule: R) where Value == R.Value, R : AttributeGraph.StatefulRule +} +#if compiler(>=5.3) && $NonescapableTypes +@_silgen_name("AGGraphCreateAttribute") +@inline(__always) @inlinable internal func AGGraphCreateAttribute(index: Swift.Int, body: Swift.UnsafeRawPointer, value: Swift.UnsafeRawPointer?) -> AttributeGraph.AnyAttribute +#endif +@_silgen_name("AGGraphGetValue") +@inline(__always) @inlinable internal func AGGraphGetValue(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue +@_silgen_name("AGGraphSetValue") +@inline(__always) @inlinable internal func AGGraphSetValue(_ attribute: AttributeGraph.AnyAttribute, valuePointer: Swift.UnsafePointer) -> Swift.Bool +@frozen public struct External { + public init() +} +extension AttributeGraph.External : AttributeGraph._AttributeBody { + public static var comparisonMode: AttributeGraph.ComparisonMode { get } - public subscript(optionalAttribute: AttributeGraph.OptionalAttribute) -> V? { + public static var flags: AttributeGraph.External.Flags { get } - public var value: Value { - unsafeAddress - nonmutating set - } - public var hasValue: Swift.Bool { + public static func _update(_: Swift.UnsafeMutableRawPointer, attribute _: AttributeGraph.AnyAttribute) +} +extension AttributeGraph.External : Swift.CustomStringConvertible { + public var description: Swift.String { get } - public func valueAndFlags(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, flags: AttributeGraph.AGChangedValueFlags) - public func changedValue(of input: AttributeGraph.Attribute, options: AttributeGraph.AGValueOptions = []) -> (value: V, changed: Swift.Bool) - public func update(body: () -> Swift.Void) - public static func == (a: AttributeGraph.RuleContext, b: AttributeGraph.RuleContext) -> Swift.Bool } -@_silgen_name("AGGraphGetInputValue") -@inline(__always) @inlinable internal func AGGraphGetInputValue(_ attribute: AttributeGraph.AnyAttribute, input: AttributeGraph.AnyAttribute, options: AttributeGraph.AGValueOptions = [], type: Value.Type = Value.self) -> AttributeGraph.AGValue -@_silgen_name("AGGraphWithUpdate") -@inline(__always) @inlinable internal func AGGraphWithUpdate(_ attribute: AttributeGraph.AnyAttribute, body: () -> Swift.Void) -extension AttributeGraph.Subgraph { - public typealias Flags = AttributeGraph.AnyAttribute.Flags - public typealias ChildFlags = AttributeGraph.AnyAttribute.Flags +@frozen public struct PointerOffset { + public var byteOffset: Swift.Int + public init(byteOffset: Swift.Int) } -extension AttributeGraph.Subgraph { - public func addObserver(_ observer: @escaping () -> Swift.Void) -> Swift.Int - public func apply(_ body: () -> Value) -> Value - public func forEach(_ flags: AttributeGraph.Subgraph.Flags, _ callback: (AttributeGraph.AnyAttribute) -> Swift.Void) +extension AttributeGraph.PointerOffset { + public static func + (lhs: AttributeGraph.PointerOffset, rhs: AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Subgraph { - public static func beginTreeElement(value: AttributeGraph.Attribute, flags: Swift.UInt32) - public static func addTreeValue(_ value: AttributeGraph.Attribute, forKey key: Swift.UnsafePointer, flags: Swift.UInt32) - public static func endTreeElement(value: AttributeGraph.Attribute) +extension AttributeGraph.PointerOffset { + public static func invalidScenePointer() -> Swift.UnsafeMutablePointer + public static func of(_ member: inout Member) -> AttributeGraph.PointerOffset + public static func offset(_ body: (inout Base) -> AttributeGraph.PointerOffset) -> AttributeGraph.PointerOffset } -extension AttributeGraph.Graph { - public static func typeIndex(ctx: AttributeGraph.GraphContext, body: any AttributeGraph._AttributeBody.Type, valueType: AttributeGraph.Metadata, flags: AttributeGraph._AttributeType.Flags, update: () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void) -> Swift.Int +extension AttributeGraph.PointerOffset where Base == Member { + public init() } -extension AttributeGraph.Graph { - public static func withoutUpdate(_ body: () -> V) -> V - public func withoutSubgraphInvalidation(_ body: () -> V) -> V - public func withDeadline(_: Swift.UInt64, _: () -> V) -> V - public func onInvalidation(_ callback: @escaping (AttributeGraph.AnyAttribute) -> Swift.Void) - public func onUpdate(_ callback: @escaping () -> Swift.Void) - public func withMainThreadHandler(_: (() -> Swift.Void) -> Swift.Void, do: () -> Swift.Void) +extension Swift.UnsafePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + } + public static func + (lhs: Swift.UnsafePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafePointer } -extension AttributeGraph.Graph { - @_transparent public func startProfiling() { - __AGGraphStartProfiling(self) - } - @_transparent public func stopProfiling() { - __AGGraphStopProfiling(self) - } - @_transparent public func resetProfile() { - __AGGraphResetProfile(self) - } - public static func startProfiling() - public static func stopProfiling() - public static func resetProfile() +extension Swift.UnsafeMutablePointer { + public subscript(offset offset: AttributeGraph.PointerOffset) -> Member { + unsafeAddress + nonmutating unsafeMutableAddress + } + public static func + (lhs: Swift.UnsafeMutablePointer, rhs: AttributeGraph.PointerOffset) -> Swift.UnsafeMutablePointer } -extension AttributeGraph.Graph { - @_transparent public var mainUpdates: Swift.Int { - @_transparent get { numericCast(counter(for: .mainThreadUpdates)) } +extension AttributeGraph.AnyAttribute { + public init(_ attribute: AttributeGraph.Attribute) + public func unsafeCast(to _: Value.Type) -> AttributeGraph.Attribute + #if compiler(>=5.3) && $NonescapableTypes + public static var current: AttributeGraph.AnyAttribute? { + get + } + #endif + public func unsafeOffset(at offset: Swift.Int) -> AttributeGraph.AnyAttribute + public func setFlags(_ newFlags: AttributeGraph.AnyAttribute.Flags, mask: AttributeGraph.AnyAttribute.Flags) + public func addInput(_ attribute: AttributeGraph.AnyAttribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func addInput(_ attribute: AttributeGraph.Attribute, options: AttributeGraph.AGInputOptions = [], token: Swift.Int) + public func visitBody(_ visitor: inout Body) where Body : AttributeGraph.AttributeBodyVisitor + public func mutateBody(as type: Value.Type, invalidating: Swift.Bool, _ body: (inout Value) -> Swift.Void) + public func breadthFirstSearch(options _: AttributeGraph.SearchOptions = [], _: (AttributeGraph.AnyAttribute) -> Swift.Bool) -> Swift.Bool + public var _bodyType: any Any.Type { + get } -} -extension AttributeGraph.Graph { - @_silgen_name("AGGraphGetOutputValue") - @inline(__always) @inlinable public static func outputValue() -> Swift.UnsafePointer? - @_silgen_name("AGGraphSetOutputValue") - @inline(__always) @inlinable public static func setOutputValue(_ value: Swift.UnsafePointer) -} -extension AttributeGraph.Graph { - @_transparent public static func anyInputsChanged(excluding excludedInputs: [AttributeGraph.AnyAttribute]) -> Swift.Bool { - return __AGGraphAnyInputsChanged(excludedInputs, excludedInputs.count) - } -} -extension AttributeGraph.Graph { - public func archiveJSON(name: Swift.String?) -} -public func forEachField(of type: any Any.Type, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Void) -extension AttributeGraph.Metadata : Swift.Hashable, Swift.CustomStringConvertible { - public init(_ type: any Any.Type) - public var type: any Any.Type { + public var _bodyPointer: Swift.UnsafeRawPointer { get } - public var description: Swift.String { + public var valueType: any Any.Type { get } - public func forEachField(options: AttributeGraph.Metadata.ApplyOptions, do body: (Swift.UnsafePointer, Swift.Int, any Any.Type) -> Swift.Bool) -> Swift.Bool + #if compiler(>=5.3) && $NonescapableTypes + public var indirectDependency: AttributeGraph.AnyAttribute? { + get + nonmutating set + } + #endif } -extension AttributeGraph.Signature : Swift.Equatable { - public static func == (lhs: AttributeGraph.Signature, rhs: AttributeGraph.Signature) -> Swift.Bool +extension AttributeGraph.AnyAttribute : Swift.CustomStringConvertible { + @inlinable public var description: Swift.String { + get { "#\(rawValue)" } + } } -extension AttributeGraph.TupleType { - @_transparent public init(_ types: [any Any.Type]) { - self.init(count: types.count, elements: types.map(Metadata.init)) - } - @_transparent public init(_ type: any Any.Type) { - self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self)) - } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { count == 0 } +public typealias AttributeUpdateBlock = () -> (Swift.UnsafeMutableRawPointer, AttributeGraph.AnyAttribute) -> Swift.Void +@frozen @propertyWrapper @dynamicMemberLookup public struct IndirectAttribute { + public let identifier: AttributeGraph.AnyAttribute + public init(source: AttributeGraph.Attribute) + public var source: AttributeGraph.Attribute { + get + nonmutating set } - @_transparent public var indices: Swift.Range { - @_transparent get { 0 ..< count } + #if compiler(>=5.3) && $NonescapableTypes + public var dependency: AttributeGraph.AnyAttribute? { + get + nonmutating set } - @_transparent public var type: any Any.Type { - @_transparent get { - unsafeBitCast(rawValue, to: Any.Type.self) - } + #endif + public var value: Value { + get + nonmutating set + nonmutating _modify + } + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool) + public var wrappedValue: Value { + get + nonmutating set + nonmutating _modify + } + public var projectedValue: AttributeGraph.Attribute { + get + } + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute { + get } - @_transparent public func type(at index: Swift.Int) -> any Any.Type { - elementType(at: index).type - } - @_transparent public func offset(at index: Swift.Int, as type: T.Type) -> Swift.Int { - elementOffset(at: index, type: Metadata(type)) - } - @_transparent public func setElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, from srcValue: Swift.UnsafePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleSetElement(self, tupleValue, index, srcValue, Metadata(T.self), options) - } - @_transparent public func getElement(in tupleValue: Swift.UnsafeMutableRawPointer, at index: Swift.Int, to dstValue: Swift.UnsafeMutablePointer, options: AttributeGraph.TupleType.CopyOptions) { - __AGTupleGetElement(self, tupleValue, index, dstValue, Metadata(T.self), options) - } } -@_silgen_name("AGTupleWithBuffer") -public func withUnsafeTuple(of type: AttributeGraph.TupleType, count: Swift.Int, _ body: (AttributeGraph.UnsafeMutableTuple) -> Swift.Void) -extension AttributeGraph.UnsafeTuple { - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +extension AttributeGraph.IndirectAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.IndirectAttribute, b: AttributeGraph.IndirectAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } +} +@frozen public struct AnyOptionalAttribute { + public var identifier: AttributeGraph.AnyAttribute + public init() + public init(_ attribute: AttributeGraph.AnyAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.AnyAttribute?) + #endif + public init(_ attribute: AttributeGraph.OptionalAttribute) + public static var current: AttributeGraph.AnyOptionalAttribute { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.AnyAttribute? { + get + set } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.AnyAttribute) -> Value) -> Value? + #endif + public func unsafeCast(to _: Value.Type) -> AttributeGraph.OptionalAttribute +} +extension AttributeGraph.AnyOptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.AnyOptionalAttribute, b: AttributeGraph.AnyOptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { address(of: index, as: T.self) } +} +extension AttributeGraph.AnyOptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get } } -extension AttributeGraph.UnsafeMutableTuple { - @_transparent public init(with tupleType: AttributeGraph.TupleType) { - self.init( - type: tupleType, - value: UnsafeMutableRawPointer.allocate( - byteCount: tupleType.size, - alignment: -1 - ) - ) - } - @_transparent public func initialize(at index: Swift.Int, to element: T) { - withUnsafePointer(to: element) { elementPointer in - type.setElement(in: value, at: index, from: elementPointer, options: .initCopy) - } - } - @_transparent public func deinitialize() { - type.destroy(value) - } - @_transparent public func deinitialize(at index: Swift.Int) { - type.destroy(value, at: index) - } - @_transparent public func deallocate(initialized: Swift.Bool) { - if initialized { - deinitialize() - } - value.deallocate() - } - @_transparent public var count: Swift.Int { - @_transparent get { type.count } +@frozen @propertyWrapper @dynamicMemberLookup public struct OptionalAttribute { + public var base: AttributeGraph.AnyOptionalAttribute + public init() + public init(base: AttributeGraph.AnyOptionalAttribute) + public init(_ attribute: AttributeGraph.Attribute) + #if compiler(>=5.3) && $NonescapableTypes + public init(_ attribute: AttributeGraph.Attribute?) + #endif + public init(_ weakAttribute: AttributeGraph.WeakAttribute) + #if compiler(>=5.3) && $NonescapableTypes + public var attribute: AttributeGraph.Attribute? { + get + set } - @_transparent public var isEmpty: Swift.Bool { - @_transparent get { type.isEmpty } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var value: Value? { + get } - @_transparent public var indices: Swift.Range { - @_transparent get { type.indices } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func changedValue(options: AttributeGraph.AGValueOptions = []) -> (value: Value, changed: Swift.Bool)? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public func map(_ body: (AttributeGraph.Attribute) -> V) -> V? + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var wrappedValue: Value? { + get } - @_transparent public func address(as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - guard type.type == T.self else { - preconditionFailure() - } - return value.assumingMemoryBound(to: T.self) - } - @_transparent public func address(of index: Swift.Int, as _: T.Type = T.self) -> Swift.UnsafeMutablePointer { - value.advanced(by: type.elementOffset(at: index, type: Metadata(T.self))) - .assumingMemoryBound(to: T.self) - } - public subscript() -> T { - @_transparent unsafeAddress { UnsafePointer(address(as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public var projectedValue: AttributeGraph.Attribute? { + get + set + _modify } - public subscript(index: Swift.Int) -> T { - @_transparent unsafeAddress { UnsafePointer(address(of: index, as: T.self)) } - @_transparent nonmutating unsafeMutableAddress { address(of: index, as: T.self) } + #endif + #if compiler(>=5.3) && $NonescapableTypes + public subscript(dynamicMember keyPath: Swift.KeyPath) -> AttributeGraph.Attribute? { + get } + #endif } -@discardableResult -public func withUnsafePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeRawPointer) -> ()) -> Swift.Bool -@discardableResult -public func withUnsafeMutablePointerToEnumCase(of value: Swift.UnsafeMutablePointer, do body: (Swift.Int, any Any.Type, Swift.UnsafeMutableRawPointer) -> ()) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, mode: AttributeGraph.ComparisonMode = .equatableAlways) -> Swift.Bool -public func compareValues(_ lhs: Value, _ rhs: Value, options: AttributeGraph.ComparisonOptions) -> Swift.Bool -extension AttributeGraph.ComparisonOptions { - public init(mode: AttributeGraph.ComparisonMode) +extension AttributeGraph.OptionalAttribute : Swift.Hashable { + public static func == (a: AttributeGraph.OptionalAttribute, b: AttributeGraph.OptionalAttribute) -> Swift.Bool + public func hash(into hasher: inout Swift.Hasher) + public var hashValue: Swift.Int { + get + } +} +extension AttributeGraph.OptionalAttribute : Swift.CustomStringConvertible { + public var description: Swift.String { + get + } } -extension AttributeGraph.PointerOffset : Swift.Sendable {} -extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} -extension AttributeGraph.External : Swift.Sendable {} -extension AttributeGraph.External : Swift.BitwiseCopyable {} -extension AttributeGraph.Attribute : Swift.Sendable {} -extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} -extension AttributeGraph.WeakAttribute : Swift.Sendable {} -extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.OptionalAttribute : Swift.Sendable {} -extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} -extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} -extension AttributeGraph.IndirectAttribute : Swift.Sendable {} -extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} extension AttributeGraph.AnyRuleContext : Swift.Sendable {} extension AttributeGraph.AnyRuleContext : Swift.BitwiseCopyable {} extension AttributeGraph.RuleContext : Swift.Sendable {} extension AttributeGraph.RuleContext : Swift.BitwiseCopyable {} +extension AttributeGraph.WeakAttribute : Swift.Sendable {} +extension AttributeGraph.WeakAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.Attribute : Swift.Sendable {} +extension AttributeGraph.Attribute : Swift.BitwiseCopyable {} +extension AttributeGraph.External : Swift.Sendable {} +extension AttributeGraph.External : Swift.BitwiseCopyable {} +extension AttributeGraph.PointerOffset : Swift.Sendable {} +extension AttributeGraph.PointerOffset : Swift.BitwiseCopyable {} +extension AttributeGraph.IndirectAttribute : Swift.Sendable {} +extension AttributeGraph.IndirectAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.Sendable {} +extension AttributeGraph.AnyOptionalAttribute : Swift.BitwiseCopyable {} +extension AttributeGraph.OptionalAttribute : Swift.Sendable {} +extension AttributeGraph.OptionalAttribute : Swift.BitwiseCopyable {} diff --git a/AG/generate_swiftinterface.sh b/AG/generate_swiftinterface.sh index 2f8d465..61b72b5 100755 --- a/AG/generate_swiftinterface.sh +++ b/AG/generate_swiftinterface.sh @@ -40,7 +40,7 @@ cleanup() { trap cleanup EXIT # Verify Swift compiler version matches the expected version for this framework -EXPECTED_SWIFT_VERSION="6.1" # 2024 -> 6.1, 2025 -> 6.2 +EXPECTED_SWIFT_VERSION="6.2" SWIFT_VERSION=$(xcrun swiftc --version 2>&1 | grep -o 'Swift version [0-9]*\.[0-9]*' | head -1 | awk '{print $3}') if [ "${SWIFT_VERSION}" != "${EXPECTED_SWIFT_VERSION}" ]; then echo "Error: expected Swift ${EXPECTED_SWIFT_VERSION} but found Swift ${SWIFT_VERSION}" diff --git a/AG/update.sh b/AG/update.sh index 59722b6..3ecd9ee 100755 --- a/AG/update.sh +++ b/AG/update.sh @@ -33,9 +33,9 @@ generate_swiftinterface_header() { local target="$1" local result="" result+="// swift-interface-format-version: 1.0\n" - result+="// swift-compiler-version: Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)\n" + result+="// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.16.112 clang-1800.1.29)\n" result+="// swift-module-flags: -target $target -enable-objc-interop -enable-library-evolution -swift-version 5 -Osize -enable-upcoming-feature InternalImportsByDefault -enable-experimental-feature Extern -module-name AttributeGraph\n" - result+="// swift-module-flags-ignorable: -interface-compiler-version 6.1" + result+="// swift-module-flags-ignorable: -interface-compiler-version 6.2" echo -e $result } diff --git a/Example/.mise.toml b/Example/.mise.toml deleted file mode 100644 index 54b06a4..0000000 --- a/Example/.mise.toml +++ /dev/null @@ -1,2 +0,0 @@ -[tools] -tuist = "4.174.2" diff --git a/Example/Tuist.swift b/Example/Tuist.swift index abf9ffd..d8a8406 100644 --- a/Example/Tuist.swift +++ b/Example/Tuist.swift @@ -1,5 +1,11 @@ import ProjectDescription let tuist = Tuist( - project: .tuist() + project: .tuist( + generationOptions: .options( + manifestEnvironment: [ + "DARWINPRIVATEFRAMEWORKS_*", + ] + ) + ) ) diff --git a/Example/Tuist/Package.resolved b/Example/Tuist/Package.resolved index b9ecdb5..ce722f5 100644 --- a/Example/Tuist/Package.resolved +++ b/Example/Tuist/Package.resolved @@ -1,13 +1,13 @@ { - "originHash" : "53ebba4f824ac9815194bdfc84ac7b2eee75974f916545881c9f478ec9c8a278", + "originHash" : "7866d60ad2f4815a011f3cf7861bd2655f5c3bcf38fd586b2147856e73f85c3d", "pins" : [ { "identity" : "swift-collections", "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-collections", "state" : { - "revision" : "6675bc0ff86e61436e615df6fc5174e043e57924", - "version" : "1.4.1" + "revision" : "fea17c02d767f46b23070fdfdacc28a03a39232a", + "version" : "1.5.1" } } ], diff --git a/Example/Tuist/Package.swift b/Example/Tuist/Package.swift index 4723307..477bc5c 100644 --- a/Example/Tuist/Package.swift +++ b/Example/Tuist/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 6.1 +// swift-tools-version: 6.2 import PackageDescription diff --git a/Example/mise.toml b/Example/mise.toml new file mode 100644 index 0000000..8885d3b --- /dev/null +++ b/Example/mise.toml @@ -0,0 +1,5 @@ +[tools] +tuist = "4.193.0" + +[env] +DARWINPRIVATEFRAMEWORKS_TARGET_RELEASE = "2025" diff --git a/Package.resolved b/Package.resolved index 9de163b..60c0f5a 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,13 +1,13 @@ { - "originHash" : "31b5019e0eac13edfcab62ebfe5a9ca86b1dedbea493b32012797066b92f79b6", + "originHash" : "ce3e67860b6ba2ab599e3e5c4b7dc203c68b79aa7c5477ab4509b3f13dd02d33", "pins" : [ { "identity" : "swift-collections", "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-collections", "state" : { - "revision" : "6675bc0ff86e61436e615df6fc5174e043e57924", - "version" : "1.4.1" + "revision" : "fea17c02d767f46b23070fdfdacc28a03a39232a", + "version" : "1.5.1" } } ], diff --git a/Package.swift b/Package.swift index e7900ed..b914b73 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 6.1 +// swift-tools-version: 6.2 import PackageDescription @@ -144,28 +144,35 @@ if libraryEvolutionCondition { } let platforms: [SupportedPlatform] = switch releaseVersion { + case 2025: [.iOS(.v26), .macOS(.v26), .macCatalyst(.v26), .tvOS(.v26), .watchOS(.v26), .visionOS(.v26)] case 2024: [.iOS(.v18), .macOS(.v15), .macCatalyst(.v18), .tvOS(.v18), .watchOS(.v10), .visionOS(.v2)] - case 2021: [.iOS(.v15), .macOS(.v12), .macCatalyst(.v15), .tvOS(.v15), .watchOS(.v7)] default: [] } +var products: [PackageDescription.Product] = [ + .library(name: "AttributeGraph", targets: ["AttributeGraph", "_AttributeGraphDeviceSwiftShims"]), + .library(name: "RenderBox", targets: ["RenderBox"]), + .library(name: "CoreUI", targets: ["CoreUI"]), + .library(name: "BacklightServices", targets: ["BacklightServices"]), + .library(name: "SFSymbols", targets: ["SFSymbols"]), + .library(name: "CoreSVG", targets: ["CoreSVG"]), +] + +if releaseVersion >= 2025 { + products.append( + .library(name: "Gestures", targets: ["Gestures", "_GesturesDeviceSwiftShims"]) + ) +} + let package = Package( name: "DarwinPrivateFrameworks", platforms: platforms, - products: [ - .library(name: "AttributeGraph", targets: ["AttributeGraph", "_AttributeGraphDeviceSwiftShims"]), - .library(name: "RenderBox", targets: ["RenderBox"]), - .library(name: "CoreUI", targets: ["CoreUI"]), - .library(name: "BacklightServices", targets: ["BacklightServices"]), - .library(name: "SFSymbols", targets: ["SFSymbols"]), - .library(name: "CoreSVG", targets: ["CoreSVG"]), - .library(name: "Gestures", targets: ["Gestures", "_GesturesDeviceSwiftShims"]), - ], + products: products, dependencies: [ - .package(url: "https://github.com/apple/swift-collections", from: "1.1.0"), + .package(url: "https://github.com/apple/swift-collections", from: "1.5.1"), ], targets: [ - .binaryTarget(name: "AttributeGraph", path: "AG/\(releaseVersion)/AttributeGraph.xcframework"), + .binaryTarget(name: "AttributeGraph", path: "AG/2024/AttributeGraph.xcframework"), .target( name: "_AttributeGraphDeviceSwiftShims", dependencies: ["AttributeGraph"], diff --git a/Package@swift-6.2.swift b/Package@swift-6.2.swift deleted file mode 100644 index 4936b69..0000000 --- a/Package@swift-6.2.swift +++ /dev/null @@ -1,200 +0,0 @@ -// swift-tools-version: 6.2 - -import PackageDescription - -/* GENERATED BY SPMManifestTool BEGIN */ -/* DO NOT EDIT */ - -public protocol EnvironmentProvider { - func value(forKey key: String) -> String? -} - -import PackageDescription -public struct PackageContextEnvironmentProvider: EnvironmentProvider { - public init() {} - - public func value(forKey key: String) -> String? { - Context.environment[key] - } -} - -public final class EnvManager { - nonisolated(unsafe) public static let shared = EnvManager() - - private var domains: [String] = [] - private var environmentProvider: EnvironmentProvider - - /// When true, append raw key as fallback when searching in domains - public var includeFallbackToRawKey: Bool = false - - private init() { - self.environmentProvider = PackageContextEnvironmentProvider() - } - - /// Set a custom environment provider (useful for testing) - public func setEnvironmentProvider(_ provider: EnvironmentProvider) { - self.environmentProvider = provider - } - - /// Reset domains and environment provider (useful for testing) - public func reset() { - domains.removeAll() - includeFallbackToRawKey = false - self.environmentProvider = PackageContextEnvironmentProvider() - } - - public func register(domain: String) { - domains.append(domain) - } - - public func withDomain(_ domain: String, perform: () throws -> T) rethrows -> T { - domains.append(domain) - defer { domains.removeAll { $0 == domain } } - return try perform() - } - - private func envValue(rawKey: String, default defaultValue: T?, searchInDomain: Bool, parser: (String) -> T?) -> T? { - func parseEnvValue(_ key: String) -> (String, T)? { - guard let value = environmentProvider.value(forKey: key), - let result = parser(value) else { return nil } - return (value, result) - } - var keys: [String] = searchInDomain ? domains.map { "\($0.uppercased())_\(rawKey)" } : [] - if !searchInDomain || includeFallbackToRawKey { - keys.append(rawKey) - } - for key in keys { - if let (value, result) = parseEnvValue(key) { - print("[Env] \(key)=\(value) -> \(result)") - return result - } - } - let primaryKey = keys.first ?? rawKey - if let defaultValue { - print("[Env] \(primaryKey) not set -> \(defaultValue)(default)") - } - return defaultValue - } - - public func envBoolValue(rawKey: String, default defaultValue: Bool? = nil, searchInDomain: Bool) -> Bool? { - envValue(rawKey: rawKey, default: defaultValue, searchInDomain: searchInDomain) { value in - switch value { - case "1": true - case "0": false - default: nil - } - } - } - - public func envIntValue(rawKey: String, default defaultValue: Int? = nil, searchInDomain: Bool) -> Int? { - envValue(rawKey: rawKey, default: defaultValue, searchInDomain: searchInDomain) { Int($0) } - } - - public func envStringValue(rawKey: String, default defaultValue: String? = nil, searchInDomain: Bool) -> String? { - envValue(rawKey: rawKey, default: defaultValue, searchInDomain: searchInDomain) { $0 } - } -} - -public func envBoolValue(_ key: String, default defaultValue: Bool = false, searchInDomain: Bool = true) -> Bool { - EnvManager.shared.envBoolValue(rawKey: key, default: defaultValue, searchInDomain: searchInDomain)! -} - -public func envIntValue(_ key: String, default defaultValue: Int = 0, searchInDomain: Bool = true) -> Int { - EnvManager.shared.envIntValue(rawKey: key, default: defaultValue, searchInDomain: searchInDomain)! -} - -public func envStringValue(_ key: String, default defaultValue: String, searchInDomain: Bool = true) -> String { - EnvManager.shared.envStringValue(rawKey: key, default: defaultValue, searchInDomain: searchInDomain)! -} - -public func envStringValue(_ key: String, searchInDomain: Bool = true) -> String? { - EnvManager.shared.envStringValue(rawKey: key, searchInDomain: searchInDomain) -} - -/* GENERATED BY SPMManifestTool END */ -EnvManager.shared.register(domain: "DarwinPrivateFrameworks") -EnvManager.shared.register(domain: "OpenSwiftUI") - -// MARK: - Env and config - -#if os(macOS) -// NOTE: #if os(macOS) check is not accurate if we are cross compiling for Linux platform. So we add an env key to specify it. -let buildForDarwinPlatform = envBoolValue("BUILD_FOR_DARWIN_PLATFORM", default: true) -#else -let buildForDarwinPlatform = envBoolValue("BUILD_FOR_DARWIN_PLATFORM") -#endif - -let releaseVersion = envIntValue("TARGET_RELEASE", default: 2024) -let libraryEvolutionCondition = envBoolValue("LIBRARY_EVOLUTION", default: buildForDarwinPlatform) - - -// MARK: - Shared Settings - -var sharedSwiftSettings: [SwiftSetting] = [ - .enableUpcomingFeature("InternalImportsByDefault"), - .enableExperimentalFeature("Extern"), - .swiftLanguageMode(.v5), - .define("ATTRIBUTEGRAPH_RELEASE_\(releaseVersion)"), -] - -if libraryEvolutionCondition { - // NOTE: -enable-library-evolution will cause module verify failure for `swift build`. - // Either set OPENATTRIBUTEGRAPH_LIBRARY_EVOLUTION=0 or add `-Xswiftc -no-verify-emitted-module-interface` after `swift build` - sharedSwiftSettings.append(.unsafeFlags(["-enable-library-evolution", "-no-verify-emitted-module-interface"])) -} - -let platforms: [SupportedPlatform] = switch releaseVersion { - case 2025: [.iOS(.v26), .macOS(.v26), .macCatalyst(.v26), .tvOS(.v26), .watchOS(.v26), .visionOS(.v26)] - case 2024: [.iOS(.v18), .macOS(.v15), .macCatalyst(.v18), .tvOS(.v18), .watchOS(.v10), .visionOS(.v2)] - case 2021: [.iOS(.v15), .macOS(.v12), .macCatalyst(.v15), .tvOS(.v15), .watchOS(.v7)] - default: [] -} - -let package = Package( - name: "DarwinPrivateFrameworks", - platforms: platforms, - products: [ - .library(name: "AttributeGraph", targets: ["AttributeGraph", "_AttributeGraphDeviceSwiftShims"]), - .library(name: "RenderBox", targets: ["RenderBox"]), - .library(name: "CoreUI", targets: ["CoreUI"]), - .library(name: "BacklightServices", targets: ["BacklightServices"]), - .library(name: "SFSymbols", targets: ["SFSymbols"]), - .library(name: "CoreSVG", targets: ["CoreSVG"]), - .library(name: "Gestures", targets: ["Gestures", "_GesturesDeviceSwiftShims"]), - ], - dependencies: [ - .package(url: "https://github.com/apple/swift-collections", from: "1.1.0"), - ], - targets: [ - .binaryTarget(name: "AttributeGraph", path: "AG/2024/AttributeGraph.xcframework"), - .target( - name: "_AttributeGraphDeviceSwiftShims", - dependencies: ["AttributeGraph"], - path: "AG/DeviceSwiftShims", - swiftSettings: sharedSwiftSettings - ), - .binaryTarget(name: "RenderBox", path: "RB/2024/RenderBox.xcframework"), - .binaryTarget(name: "CoreUI", path: "CoreUI/2024/CoreUI.xcframework"), - .binaryTarget(name: "BacklightServices", path: "BLS/2024/BacklightServices.xcframework"), - .binaryTarget(name: "SFSymbols", path: "SFSymbols/2024/SFSymbols.xcframework"), - .binaryTarget(name: "CoreSVG", path: "CoreSVG/2024/CoreSVG.xcframework"), - .binaryTarget(name: "Gestures", path: "GF/2025/Gestures.xcframework"), - .target( - name: "_GesturesDeviceSwiftShims", - dependencies: [ - "Gestures", - .product(name: "OrderedCollections", package: "swift-collections"), - ], - path: "GF/DeviceSwiftShims", - swiftSettings: sharedSwiftSettings - ), - .plugin( - name: "UpdateXCFrameworks", - capability: .command( - intent: .custom(verb: "update-xcframeworks", description: "Update xcframeworks"), - permissions: [.writeToPackageDirectory(reason: "Update xcframeworks")] - ) - ), - ], - cxxLanguageStandard: .cxx20 -)