Avatar
swiftNightly BOT 7/11/2019 8:48 AM
sil_stage canonical import Builtin import Swift import SwiftShims protocol Observable { associatedtype Element func subscribe(_ f: @escaping (Self.Element) -> ()) } struct Just<T> : Observable { typealias Element = T @_hasStorage let value: T { get } func subscribe(_ f: @escaping (T) -> ()) init(value: T) } struct Map<Source, U> : Observable where Source : Observable { typealias Element = U @_hasStorage let source: Source { get } @_hasStorage let transformer: (Source.Element) -> U { get } func subscribe(_ f: @escaping (U) -> ()) init(source: Source, transformer: @escaping (Source.Element) -> U) } extension Observable { func map<U>(_ f: @escaping (Self.Element) -> U) -> Map<Self, U> } // _swiftEmptyArrayStorage sil_global @_swiftEmptyArrayStorage : $_SwiftEmptyArrayStorage // main sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 { bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>): %2 = integer_literal $Builtin.Int64, 122 // user: %3 %3 = struct $Int (%2 : $Builtin.Int64) // users: %6, %4 debug_value %3 : $Int, let, name "$0", argno 1 // id: %4 %5 = alloc_stack $Int // users: %9, %8, %6 store %3 to %5 : $*Int // id: %6 // function_ref BinaryInteger.description.getter %7 = function_ref @$sSzsE11descriptionSSvg : $@convention(method) <τ_0_0 where τ_0_0 : BinaryInteger> (@in_guaranteed τ_0_0) -> @owned String // users: %32, %8 %8 = apply %7<Int>(%5) : $@convention(method) <τ_0_0 where τ_0_0 : BinaryInteger> (@in_guaranteed τ_0_0) -> @owned String // users: %51, %10, %11, %12, %14 dealloc_stack %5 : $*Int // id: %9 debug_value %8 : $String, let, name "element", argno 1 // id: %10 debug_value %8 : $String, let, name "element", argno 1 // id: %11 debug_value %8 : $String, let, name "$0", argno 1 // id: %12 // function_ref String.count