Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ struct EnvironmentalViewChild<V>: StatefulRule, AsyncAttribute, CustomStringConv
} else if envChanged, tracker.hasDifferentUsedValues(env.plist) {
shouldReset = true
} else {
// TODO: Optimize this API call
let outputValue: UnsafePointer<V.EnvironmentBody>? = Graph.outputValue()
shouldReset = outputValue == nil
shouldReset = !hasValue
}
guard shouldReset else { return }
tracker.reset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@ extension _GraphInputs {
}

package mutating func pushStableType(_ type: any Any.Type) {
#if OPENSWIFTUI_SUPPORT_2024_API
guard options.contains(.needsStableDisplayListIDs) else {
return
}
pushScope(id: makeStableTypeData(type))
#endif
}

package var stableIDScope: WeakAttribute<DisplayList.StableIdentityScope>? {
Expand All @@ -143,10 +145,11 @@ extension _GraphInputs {
}
}

#if OPENSWIFTUI_SUPPORT_2024_API
package func makeStableTypeData(_ type: any Any.Type) -> StrongHash {
// OGTypeGetSignature
preconditionFailure("TODO")
unsafeBitCast(Metadata(type).signature, to: StrongHash.self)
}
#endif

package func makeStableIDData<ID>(from id: ID) -> StrongHash? {
guard let encodable = id as? Encodable else {
Expand Down
Loading
Loading