@@ -139,3 +139,56 @@ extension _ViewModifier_Content {
139139 }
140140 }
141141}
142+
143+ // MARK: - BodyInput
144+
145+ // FIXME
146+ private struct BodyInput < Input> { }
147+
148+ private enum BodyInputElement : GraphReusable , Equatable {
149+ typealias MakeViewBody = ( _Graph , _ViewInputs ) -> _ViewOutputs
150+ typealias MakeViewListBody = ( _Graph , _ViewListInputs ) -> _ViewListOutputs
151+
152+ case view( MakeViewBody )
153+ case list( MakeViewListBody )
154+
155+ static func == ( lhs: BodyInputElement , rhs: BodyInputElement ) -> Bool {
156+ if case let . view( lhsBody) = lhs, case let . view( rhsBody) = rhs {
157+ compareValues ( lhsBody, rhsBody, options: . init( rawValue: 0x103 ) )
158+ } else if case let . list( lhsBody) = lhs, case let . list( rhsBody) = rhs{
159+ compareValues ( lhsBody, rhsBody, options: . init( rawValue: 0x103 ) )
160+ } else {
161+ false
162+ }
163+ }
164+
165+ static var isTriviallyReusable : Bool {
166+ _SemanticFeature_v5. isEnabled
167+ }
168+
169+ func makeReusable( indirectMap: IndirectAttributeMap ) {
170+ return
171+ }
172+
173+ func tryToReuse( by other: BodyInputElement , indirectMap: IndirectAttributeMap , testOnly: Bool ) -> Bool {
174+ switch self {
175+ case let . view( makeViewBody) :
176+ guard case let . view( otherMakeViewBody) = other else {
177+ ReuseTrace . traceReuseInternalFailure ( )
178+ return false
179+ }
180+ return Self . isTriviallyReusable || compareValues ( makeViewBody, otherMakeViewBody, options: . init( rawValue: 0x103 ) )
181+ case let . list( makeViewListBody) :
182+ guard case let . list( otherMakeViewListBody) = other else {
183+ ReuseTrace . traceReuseInternalFailure ( )
184+ return false
185+ }
186+ return Self . isTriviallyReusable || compareValues ( makeViewListBody, otherMakeViewListBody, options: . init( rawValue: 0x103 ) )
187+ }
188+ }
189+ }
190+
191+
192+ private struct BodyCountInput < V> : ViewInput {
193+ static var defaultValue : Stack < _ViewListCountInputs > { . init( ) }
194+ }
0 commit comments