Skip to content

Revert "URLSession: Fix redirection response handling" #2746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2020

Conversation

compnerd
Copy link
Member

Reverts #2744

@compnerd
Copy link
Member Author

sigh more SIL issues:

SIL verification failed: return with stack allocs that haven't been deallocated: state.Stack.empty()
Verifying instruction:
     %71 = tuple ()                               // user: %72
->   return %71 : $()                             // id: %72
In function:
// NSDictionary.enumerateKeysAndObjects(options:using:)
sil @$s10Foundation12NSDictionaryC23enumerateKeysAndObjects7options5usingyAA20NSEnumerationOptionsV_yyp_ypSpyAA8ObjCBoolVGtXEtF : $@convention(method) (NSEnumerationOptions, @noescape @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> (), @guaranteed NSDictionary) -> () {
// %0                                             // users: %37, %15, %3
// %1                                             // users: %148, %12, %4
// %2                                             // users: %308, %309, %281, %197, %6, %280, %5
bb0(%0 : $NSEnumerationOptions, %1 : $@noescape @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> (), %2 : $NSDictionary):
  debug_value %0 : $NSEnumerationOptions, let, name "opts", argno 1 // id: %3
  debug_value %1 : $@noescape @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> (), let, name "block", argno 2 // id: %4
  debug_value %2 : $NSDictionary, let, name "self", argno 3 // id: %5
  checked_cast_br [exact] %2 : $NSDictionary to NSDictionary, bb15, bb16 // id: %6
// %7                                             // users: %52, %47, %16
// %8                                             // users: %62, %68, %63, %69, %27, %23, %22, %21, %18, %18, %106
// %9                                             // users: %60, %67, %29, %25, %18, %82
// %10                                            // users: %103, %58, %49, %66, %28, %24, %14, %18, %75, %77, %78, %85, %91, %158, %163
bb1(%7 : $Int, %8 : ${ var Array<Any> }, %9 : ${ var ObjCBool }, %10 : $NSLock): // Preds: bb15 bb21 bb23
  // function_ref thunk for @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, @unowned UnsafeMutablePointer<ObjCBool>) -> ()
  %11 = function_ref @$sypypSpy10Foundation8ObjCBoolVGIgnny_ypypADIegnny_TR : $@convention(thin) (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>, @noescape @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> ()) -> () // user: %12
  %12 = partial_apply [callee_guaranteed] %11(%1) : $@convention(thin) (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>, @noescape @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> ()) -> () // users: %61, %65, %30, %26, %76, %18, %13, %64
  debug_value %12 : $@callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> (), let, name "closure", argno 1 // id: %13
  debug_value %10 : $NSLock, let, name "lock", argno 2 // id: %14
  debug_value %0 : $NSEnumerationOptions, let, name "opts", argno 6 // id: %15
  debug_value %7 : $Int, let, name "count", argno 7 // id: %16
  // function_ref closure #1 in closure #1 in NSDictionary.enumerateKeysAndObjects(options:using:)
  %17 = function_ref @$s10Foundation12NSDictionaryC23enumerateKeysAndObjects7options5usingyAA20NSEnumerationOptionsV_yyp_ypSpyAA8ObjCBoolVGtXEtFyyyp_ypAKtcXEfU_ySicfU_ : $@convention(thin) (Int, @guaranteed NSLock, @guaranteed { var ObjCBool }, @guaranteed @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> (), @guaranteed { var Array<Any> }, @guaranteed { var Array<Any> }) -> () // user: %18
  %18 = partial_apply [callee_guaranteed] %17(%10, %9, %12, %8, %8) : $@convention(thin) (Int, @guaranteed NSLock, @guaranteed { var ObjCBool }, @guaranteed @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> (), @guaranteed { var Array<Any> }, @guaranteed { var Array<Any> }) -> () // users: %57, %102, %48, %45, %19
  debug_value %18 : $@callee_guaranteed (Int) -> (), let, name "iteration" // id: %19
  // function_ref NSEnumerationOptions.concurrent.unsafeMutableAddressor
  %20 = function_ref @$s10Foundation20NSEnumerationOptionsV10concurrentACvau : $@convention(thin) () -> Builtin.RawPointer // user: %31
  strong_retain %8 : ${ var Array<Any> }          // id: %21
  strong_retain %8 : ${ var Array<Any> }          // id: %22
  strong_retain %8 : ${ var Array<Any> }          // id: %23
  strong_retain %10 : $NSLock                     // id: %24
  strong_retain %9 : ${ var ObjCBool }            // id: %25
  strong_retain %12 : $@callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> () // id: %26
  strong_retain %8 : ${ var Array<Any> }          // id: %27
  strong_retain %10 : $NSLock                     // id: %28
  strong_retain %9 : ${ var ObjCBool }            // id: %29
  strong_retain %12 : $@callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> () // id: %30
  %31 = apply %20() : $@convention(thin) () -> Builtin.RawPointer // user: %32
  %32 = pointer_to_address %31 : $Builtin.RawPointer to [strict] $*NSEnumerationOptions // user: %33
  %33 = load %32 : $*NSEnumerationOptions         // user: %35
  %34 = alloc_stack $NSEnumerationOptions         // users: %41, %39, %35
  store %33 to %34 : $*NSEnumerationOptions       // id: %35
  %36 = alloc_stack $NSEnumerationOptions         // users: %40, %39, %37
  store %0 to %36 : $*NSEnumerationOptions        // id: %37
  %38 = witness_method $NSEnumerationOptions, #SetAlgebra.isSuperset : <Self where Self : SetAlgebra> (Self) -> (Self) -> Bool : $@convention(witness_method: SetAlgebra) <τ_0_0 where τ_0_0 : SetAlgebra> (@in_guaranteed τ_0_0, @in_guaranteed τ_0_0) -> Bool // user: %39
  %39 = apply %38<NSEnumerationOptions>(%34, %36) : $@convention(witness_method: SetAlgebra) <τ_0_0 where τ_0_0 : SetAlgebra> (@in_guaranteed τ_0_0, @in_guaranteed τ_0_0) -> Bool // user: %42
  dealloc_stack %36 : $*NSEnumerationOptions      // id: %40
  dealloc_stack %34 : $*NSEnumerationOptions      // id: %41
  %42 = struct_extract %39 : $Bool, #Bool._value  // user: %43
  cond_br %42, bb2, bb3                           // id: %43
bb2:                                              // Preds: bb1
  %44 = metatype $@thick DispatchQueue.Type       // user: %47
  %45 = convert_escape_to_noescape %18 : $@callee_guaranteed (Int) -> () to $@noescape @callee_guaranteed (Int) -> () // user: %47
  // function_ref static DispatchQueue.concurrentPerform(iterations:execute:)
  %46 = function_ref @$s8Dispatch0A5QueueC17concurrentPerform10iterations7executeySi_ySiXEtFZ : $@convention(method) (Int, @noescape @callee_guaranteed (Int) -> (), @thick DispatchQueue.Type) -> () // user: %47
  %47 = apply %46(%7, %45, %44) : $@convention(method) (Int, @noescape @callee_guaranteed (Int) -> (), @thick DispatchQueue.Type) -> ()
  strong_release %18 : $@callee_guaranteed (Int) -> () // id: %48
  strong_release %10 : $NSLock                    // id: %49
  br bb5                                          // id: %50
bb3:                                              // Preds: bb1
  %51 = integer_literal $Builtin.Int64, 0         // users: %112, %83, %80, %55, %53
  %52 = struct_extract %7 : $Int, #Int._value     // users: %100, %80, %55, %53
  %53 = builtin "cmp_slt_Int64"(%52 : $Builtin.Int64, %51 : $Builtin.Int64) : $Builtin.Int1 // user: %54
  cond_fail %53 : $Builtin.Int1, "Can't form Range with upperBound < lowerBound" // id: %54
  %55 = builtin "cmp_eq_Int64"(%52 : $Builtin.Int64, %51 : $Builtin.Int64) : $Builtin.Int1 // user: %56
  cond_br %55, bb4, bb6                           // id: %56
bb4:                                              // Preds: bb3
  strong_release %18 : $@callee_guaranteed (Int) -> () // id: %57
  strong_release %10 : $NSLock                    // id: %58
  br bb5                                          // id: %59
bb5:                                              // Preds: bb10 bb4 bb2
  strong_release %9 : ${ var ObjCBool }           // id: %60
  strong_release %12 : $@callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> () // id: %61
  strong_release %8 : ${ var Array<Any> }         // id: %62
  strong_release %8 : ${ var Array<Any> }         // id: %63
  %64 = is_escaping_closure %12 : $@callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> () // user: %70
  strong_release %12 : $@callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> () // id: %65
  strong_release %10 : $NSLock                    // id: %66
  strong_release %9 : ${ var ObjCBool }           // id: %67
  strong_release %8 : ${ var Array<Any> }         // id: %68
  strong_release %8 : ${ var Array<Any> }         // id: %69
  cond_fail %64 : $Builtin.Int1, "non-escaping closure has escaped" // id: %70
  %71 = tuple ()                                  // user: %72
  return %71 : $()                                // id: %72
bb6:                                              // Preds: bb3
  %73 = integer_literal $Builtin.Int1, -1         // users: %140, %120, %97
  %74 = integer_literal $Builtin.Int64, 1         // user: %97
  debug_value %10 : $NSLock, let, name "lock", argno 2 // id: %75
  debug_value %12 : $@callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> (), let, name "closure", argno 4 // id: %76
  %77 = class_method %10 : $NSLock, #NSLock.lock : (NSLock) -> () -> (), $@convention(method) (@guaranteed NSLock) -> () // users: %158, %85
  %78 = class_method %10 : $NSLock, #NSLock.unlock : (NSLock) -> () -> (), $@convention(method) (@guaranteed NSLock) -> () // users: %163, %91
  // function_ref ObjCBool.boolValue.getter
  %79 = function_ref @$s10Foundation8ObjCBoolV9boolValueSbvg : $@convention(method) (ObjCBool) -> Bool // users: %154, %93
  %80 = builtin "cmp_sge_Int64"(%51 : $Builtin.Int64, %52 : $Builtin.Int64) : $Builtin.Int1 // user: %81
  cond_fail %80 : $Builtin.Int1, "loop induction variable overflowed" // id: %81
  %82 = project_box %9 : ${ var ObjCBool }, 0     // users: %160, %87
  br bb7(%51 : $Builtin.Int64)                    // id: %83
// %84                                            // users: %124, %112, %119, %139, %97
bb7(%84 : $Builtin.Int64):                        // Preds: bb11 bb6
  %85 = apply %77(%10) : $@convention(method) (@guaranteed NSLock) -> ()
  %86 = alloc_stack $ObjCBool, var, name "stop"   // users: %159, %153, %146, %99, %92, %89
  %87 = begin_access [read] [dynamic] [no_nested_conflict] %82 : $*ObjCBool // users: %90, %88
  %88 = load %87 : $*ObjCBool                     // user: %89
  store %88 to %86 : $*ObjCBool                   // id: %89
  end_access %87 : $*ObjCBool                     // id: %90
  %91 = apply %78(%10) : $@convention(method) (@guaranteed NSLock) -> ()
  %92 = load %86 : $*ObjCBool                     // user: %93
  %93 = apply %79(%92) : $@convention(method) (ObjCBool) -> Bool // user: %94
  %94 = struct_extract %93 : $Bool, #Bool._value  // user: %95
  cond_br %94, bb8, bb12                          // id: %95
bb8:                                              // Preds: bb7
  br bb9                                          // id: %96
bb9:                                              // Preds: bb13 bb8 bb14
  %97 = builtin "sadd_with_overflow_Int64"(%84 : $Builtin.Int64, %74 : $Builtin.Int64, %73 : $Builtin.Int1) : $(Builtin.Int64, Builtin.Int1) // user: %98
  %98 = tuple_extract %97 : $(Builtin.Int64, Builtin.Int1), 0 // users: %105, %100
  dealloc_stack %86 : $*ObjCBool                  // id: %99
  %100 = builtin "cmp_eq_Int64"(%98 : $Builtin.Int64, %52 : $Builtin.Int64) : $Builtin.Int1 // user: %101
  cond_br %100, bb10, bb11                        // id: %101
bb10:                                             // Preds: bb9
  strong_release %18 : $@callee_guaranteed (Int) -> () // id: %102
  strong_release %10 : $NSLock                    // id: %103
  br bb5                                          // id: %104
bb11:                                             // Preds: bb9
  br bb7(%98 : $Builtin.Int64)                    // id: %105
bb12:                                             // Preds: bb7
  %106 = project_box %8 : ${ var Array<Any> }, 0  // users: %128, %107
  %107 = begin_access [read] [dynamic] [no_nested_conflict] %106 : $*Array<Any> // users: %108, %127
  %108 = struct_element_addr %107 : $*Array<Any>, #Array._buffer // user: %109
  %109 = struct_element_addr %108 : $*_ContiguousArrayBuffer<Any>, #_ContiguousArrayBuffer._storage // user: %110
  %110 = load %109 : $*__ContiguousArrayStorageBase // users: %113, %123
  %111 = alloc_stack $Any                         // users: %126, %148, %152, %149
  %112 = builtin "cmp_slt_Int64"(%84 : $Builtin.Int64, %51 : $Builtin.Int64) : $Builtin.Int1 // user: %121
  %113 = ref_element_addr %110 : $__ContiguousArrayStorageBase, #__ContiguousArrayStorageBase.countAndCapacity // user: %114
  %114 = struct_element_addr %113 : $*_ArrayBody, #_ArrayBody._storage // user: %115
  %115 = struct_element_addr %114 : $*_SwiftArrayBodyStorage, #_SwiftArrayBodyStorage.count // user: %116
  %116 = struct_element_addr %115 : $*Int, #Int._value // user: %117
  %117 = load %116 : $*Builtin.Int64              // user: %118
  %118 = builtin "assumeNonNegative_Int64"(%117 : $Builtin.Int64) : $Builtin.Int64 // user: %119
  %119 = builtin "cmp_slt_Int64"(%84 : $Builtin.Int64, %118 : $Builtin.Int64) : $Builtin.Int1 // user: %120
  %120 = builtin "xor_Int1"(%119 : $Builtin.Int1, %73 : $Builtin.Int1) : $Builtin.Int1 // user: %121
  %121 = builtin "or_Int1"(%112 : $Builtin.Int1, %120 : $Builtin.Int1) : $Builtin.Int1 // user: %122
  cond_fail %121 : $Builtin.Int1, "Index out of range" // id: %122
  %123 = ref_tail_addr %110 : $__ContiguousArrayStorageBase, $Any // user: %125
  %124 = builtin "truncOrBitCast_Int64_Word"(%84 : $Builtin.Int64) : $Builtin.Word // users: %143, %125
  %125 = index_addr %123 : $*Any, %124 : $Builtin.Word // user: %126
  copy_addr %125 to [initialization] %111 : $*Any // id: %126
  end_access %107 : $*Array<Any>                  // id: %127
  %128 = begin_access [read] [dynamic] [no_nested_conflict] %106 : $*Array<Any> // users: %129, %145
  %129 = struct_element_addr %128 : $*Array<Any>, #Array._buffer // user: %130
  %130 = struct_element_addr %129 : $*_ContiguousArrayBuffer<Any>, #_ContiguousArrayBuffer._storage // user: %131
  %131 = load %130 : $*__ContiguousArrayStorageBase // users: %133, %142
  %132 = alloc_stack $Any                         // users: %144, %148, %151, %150
  %133 = ref_element_addr %131 : $__ContiguousArrayStorageBase, #__ContiguousArrayStorageBase.countAndCapacity // user: %134
  %134 = struct_element_addr %133 : $*_ArrayBody, #_ArrayBody._storage // user: %135
  %135 = struct_element_addr %134 : $*_SwiftArrayBodyStorage, #_SwiftArrayBodyStorage.count // user: %136
  %136 = struct_element_addr %135 : $*Int, #Int._value // user: %137
  %137 = load %136 : $*Builtin.Int64              // user: %138
  %138 = builtin "assumeNonNegative_Int64"(%137 : $Builtin.Int64) : $Builtin.Int64 // user: %139
  %139 = builtin "cmp_slt_Int64"(%84 : $Builtin.Int64, %138 : $Builtin.Int64) : $Builtin.Int1 // user: %140
  %140 = builtin "xor_Int1"(%139 : $Builtin.Int1, %73 : $Builtin.Int1) : $Builtin.Int1 // user: %141
  cond_fail %140 : $Builtin.Int1, "Index out of range" // id: %141
  %142 = ref_tail_addr %131 : $__ContiguousArrayStorageBase, $Any // user: %143
  %143 = index_addr %142 : $*Any, %124 : $Builtin.Word // user: %144
  copy_addr %143 to [initialization] %132 : $*Any // id: %144
  end_access %128 : $*Array<Any>                  // id: %145
  %146 = address_to_pointer %86 : $*ObjCBool to $Builtin.RawPointer // user: %147
  %147 = struct $UnsafeMutablePointer<ObjCBool> (%146 : $Builtin.RawPointer) // user: %148
  %148 = apply %1(%111, %132, %147) : $@noescape @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any, UnsafeMutablePointer<ObjCBool>) -> ()
  destroy_addr %111 : $*Any                       // id: %149
  destroy_addr %132 : $*Any                       // id: %150
  dealloc_stack %132 : $*Any                      // id: %151
  dealloc_stack %111 : $*Any                      // id: %152
  %153 = load %86 : $*ObjCBool                    // user: %154
  %154 = apply %79(%153) : $@convention(method) (ObjCBool) -> Bool // user: %155
  %155 = struct_extract %154 : $Bool, #Bool._value // user: %156
  cond_br %155, bb14, bb13                        // id: %156
bb13:                                             // Preds: bb12
  br bb9                                          // id: %157
bb14:                                             // Preds: bb12
  %158 = apply %77(%10) : $@convention(method) (@guaranteed NSLock) -> ()
  %159 = load %86 : $*ObjCBool                    // user: %161
  %160 = begin_access [modify] [dynamic] [no_nested_conflict] %82 : $*ObjCBool // users: %162, %161
  store %159 to %160 : $*ObjCBool                 // id: %161
  end_access %160 : $*ObjCBool                    // id: %162
  %163 = apply %78(%10) : $@convention(method) (@guaranteed NSLock) -> ()
  br bb9                                          // id: %164
// %165                                           // users: %195, %167
bb15(%165 : $NSDictionary):                       // Preds: bb0
  // function_ref NSDictionary.count.getter
  %166 = function_ref @$s10Foundation12NSDictionaryC5countSivg : $@convention(method) (@guaranteed NSDictionary) -> Int // user: %167
  %167 = apply %166(%165) : $@convention(method) (@guaranteed NSDictionary) -> Int // users: %196, %168
  debug_value %167 : $Int, let, name "count"      // id: %168
  %169 = alloc_box ${ var Array<Any> }, var, name "keys" // users: %196, %170
  %170 = project_box %169 : ${ var Array<Any> }, 0 // users: %195, %177
  %171 = global_addr @_swiftEmptyArrayStorage : $*_SwiftEmptyArrayStorage // user: %172
  %172 = address_to_pointer %171 : $*_SwiftEmptyArrayStorage to $Builtin.RawPointer // user: %173
  %173 = raw_pointer_to_ref %172 : $Builtin.RawPointer to $__EmptyArrayStorage // users: %186, %187, %174
  %174 = upcast %173 : $__EmptyArrayStorage to $__ContiguousArrayStorageBase // user: %175
  %175 = struct $_ContiguousArrayBuffer<Any> (%174 : $__ContiguousArrayStorageBase) // user: %176
  %176 = struct $Array<Any> (%175 : $_ContiguousArrayBuffer<Any>) // users: %179, %177
  store %176 to %170 : $*Array<Any>               // id: %177
  %178 = alloc_stack $Array<Any>, var, name "objects" // users: %179, %195
  store %176 to %178 : $*Array<Any>               // id: %179
  %180 = alloc_box ${ var ObjCBool }, var, name "sharedStop" // users: %196, %181
  %181 = project_box %180 : ${ var ObjCBool }, 0  // user: %189
  %182 = integer_literal $Builtin.Int1, 0         // user: %183
  %183 = struct $Bool (%182 : $Builtin.Int1)      // user: %188
  %184 = metatype $@thin ObjCBool.Type            // user: %188
  // function_ref ObjCBool.init(booleanLiteral:)
  %185 = function_ref @$s10Foundation8ObjCBoolV14booleanLiteralACSb_tcfC : $@convention(method) (Bool, @thin ObjCBool.Type) -> ObjCBool // user: %188
  strong_retain %173 : $__EmptyArrayStorage       // id: %186
  strong_retain %173 : $__EmptyArrayStorage       // id: %187
  %188 = apply %185(%183, %184) : $@convention(method) (Bool, @thin ObjCBool.Type) -> ObjCBool // user: %189
  store %188 to %181 : $*ObjCBool                 // id: %189
  %190 = metatype $@thick NSLock.Type             // user: %192
  // function_ref NSLock.__allocating_init()
  %191 = function_ref @$s10Foundation6NSLockCACycfC : $@convention(method) (@thick NSLock.Type) -> @owned NSLock // user: %192
  %192 = apply %191(%190) : $@convention(method) (@thick NSLock.Type) -> @owned NSLock // users: %196, %193
  debug_value %192 : $NSLock, let, name "lock"    // id: %193
  // function_ref specialized NSDictionary.getObjects(_:andKeys:count:)
  %194 = function_ref @$s10Foundation12NSDictionaryC10getObjects_7andKeys5countySayypGz_AGzSitFTf4nndn_n : $@convention(method) (@inout Array<Any>, @inout Array<Any>, @guaranteed NSDictionary) -> () // user: %195
  %195 = apply %194(%178, %170, %165) : $@convention(method) (@inout Array<Any>, @inout Array<Any>, @guaranteed NSDictionary) -> ()
  br bb1(%167 : $Int, %169 : ${ var Array<Any> }, %180 : ${ var ObjCBool }, %192 : $NSLock) // id: %196
bb16:                                             // Preds: bb0
  checked_cast_br [exact] %2 : $NSDictionary to NSMutableDictionary, bb17, bb23 // id: %197
// %198                                           // user: %199
bb17(%198 : $NSMutableDictionary):                // Preds: bb16
  %199 = upcast %198 : $NSMutableDictionary to $NSDictionary // users: %261, %220, %221, %201, %200
  debug_value %199 : $NSDictionary, let, name "self", argno 1 // id: %200
  %201 = value_metatype $@thick NSDictionary.Type, %199 : $NSDictionary // users: %212, %202
  %202 = init_existential_metatype %201 : $@thick NSDictionary.Type, $@thick AnyObject.Type // user: %206
  %203 = metatype $@thick NSDictionary.Type       // user: %204
  %204 = init_existential_metatype %203 : $@thick NSDictionary.Type, $@thick AnyObject.Type // user: %206
  // function_ref === infix(_:_:)
  %205 = function_ref @$s10Foundation3eeeoiySbyXlXp_yXlXptF : $@convention(thin) (@thick AnyObject.Type, @thick AnyObject.Type) -> Bool // users: %215, %206
  %206 = apply %205(%202, %204) : $@convention(thin) (@thick AnyObject.Type, @thick AnyObject.Type) -> Bool // user: %207
  %207 = struct_extract %206 : $Bool, #Bool._value // user: %208
  cond_br %207, bb18, bb19                        // id: %208
bb18:                                             // Preds: bb17
  %209 = integer_literal $Builtin.Int1, -1        // user: %210
  %210 = struct $Bool (%209 : $Builtin.Int1)      // user: %211
  br bb20(%210 : $Bool)                           // id: %211
bb19:                                             // Preds: bb17
  %212 = init_existential_metatype %201 : $@thick NSDictionary.Type, $@thick AnyObject.Type // user: %215
  %213 = metatype $@thick NSMutableDictionary.Type // user: %214
  %214 = init_existential_metatype %213 : $@thick NSMutableDictionary.Type, $@thick AnyObject.Type // user: %215
  %215 = apply %205(%212, %214) : $@convention(thin) (@thick AnyObject.Type, @thick AnyObject.Type) -> Bool // user: %216
  br bb20(%215 : $Bool)                           // id: %216
// %217                                           // user: %218
bb20(%217 : $Bool):                               // Preds: bb19 bb18
  %218 = struct_extract %217 : $Bool, #Bool._value // user: %219
  cond_br %218, bb21, bb22                        // id: %219
bb21:                                             // Preds: bb20
  debug_value %199 : $NSDictionary, let, name "self", argno 1 // id: %220
  %221 = ref_element_addr %199 : $NSDictionary, #NSDictionary._storage // user: %222
  %222 = begin_access [read] [dynamic] [no_nested_conflict] %221 : $*Dictionary<NSObject, AnyObject> // users: %223, %227
  %223 = struct_element_addr %222 : $*Dictionary<NSObject, AnyObject>, #Dictionary._variant // user: %224
  %224 = struct_element_addr %223 : $*Dictionary<NSObject, AnyObject>._Variant, #Dictionary._Variant.object // user: %225
  %225 = struct_element_addr %224 : $*_BridgeStorage<__RawDictionaryStorage>, #_BridgeStorage.rawValue // user: %226
  %226 = load %225 : $*Builtin.BridgeObject       // user: %228
  end_access %222 : $*Dictionary<NSObject, AnyObject> // id: %227
  %228 = unchecked_ref_cast %226 : $Builtin.BridgeObject to $__RawDictionaryStorage // user: %229
  %229 = ref_element_addr %228 : $__RawDictionaryStorage, #__RawDictionaryStorage._count // user: %230
  %230 = struct_element_addr %229 : $*Int, #Int._value // user: %231
  %231 = load %230 : $*Builtin.Int64              // user: %232
  %232 = builtin "assumeNonNegative_Int64"(%231 : $Builtin.Int64) : $Builtin.Int64 // user: %233
  %233 = struct $Int (%232 : $Builtin.Int64)      // users: %262, %234
  debug_value %233 : $Int, let, name "count"      // id: %234
  %235 = alloc_box ${ var Array<Any> }, var, name "keys" // users: %262, %236
  %236 = project_box %235 : ${ var Array<Any> }, 0 // users: %261, %243
  %237 = global_addr @_swiftEmptyArrayStorage : $*_SwiftEmptyArrayStorage // user: %238
  %238 = address_to_pointer %237 : $*_SwiftEmptyArrayStorage to $Builtin.RawPointer // user: %239
  %239 = raw_pointer_to_ref %238 : $Builtin.RawPointer to $__EmptyArrayStorage // users: %253, %252, %240
  %240 = upcast %239 : $__EmptyArrayStorage to $__ContiguousArrayStorageBase // user: %241
  %241 = struct $_ContiguousArrayBuffer<Any> (%240 : $__ContiguousArrayStorageBase) // user: %242
  %242 = struct $Array<Any> (%241 : $_ContiguousArrayBuffer<Any>) // users: %245, %243
  store %242 to %236 : $*Array<Any>               // id: %243
  %244 = alloc_stack $Array<Any>, var, name "objects" // users: %245, %261
  store %242 to %244 : $*Array<Any>               // id: %245
  %246 = alloc_box ${ var ObjCBool }, var, name "sharedStop" // users: %262, %247
  %247 = project_box %246 : ${ var ObjCBool }, 0  // user: %255
  %248 = integer_literal $Builtin.Int1, 0         // user: %249
  %249 = struct $Bool (%248 : $Builtin.Int1)      // user: %254
  %250 = metatype $@thin ObjCBool.Type            // user: %254
  // function_ref ObjCBool.init(booleanLiteral:)
  %251 = function_ref @$s10Foundation8ObjCBoolV14booleanLiteralACSb_tcfC : $@convention(method) (Bool, @thin ObjCBool.Type) -> ObjCBool // user: %254
  strong_retain %239 : $__EmptyArrayStorage       // id: %252
  strong_retain %239 : $__EmptyArrayStorage       // id: %253
  %254 = apply %251(%249, %250) : $@convention(method) (Bool, @thin ObjCBool.Type) -> ObjCBool // user: %255
  store %254 to %247 : $*ObjCBool                 // id: %255
  %256 = metatype $@thick NSLock.Type             // user: %258
  // function_ref NSLock.__allocating_init()
  %257 = function_ref @$s10Foundation6NSLockCACycfC : $@convention(method) (@thick NSLock.Type) -> @owned NSLock // user: %258
  %258 = apply %257(%256) : $@convention(method) (@thick NSLock.Type) -> @owned NSLock // users: %262, %259
  debug_value %258 : $NSLock, let, name "lock"    // id: %259
  // function_ref specialized NSDictionary.getObjects(_:andKeys:count:)
  %260 = function_ref @$s10Foundation12NSDictionaryC10getObjects_7andKeys5countySayypGz_AGzSitFTf4nndn_n : $@convention(method) (@inout Array<Any>, @inout Array<Any>, @guaranteed NSDictionary) -> () // user: %261
  %261 = apply %260(%244, %236, %199) : $@convention(method) (@inout Array<Any>, @inout Array<Any>, @guaranteed NSDictionary) -> ()
  br bb1(%233 : $Int, %235 : ${ var Array<Any> }, %246 : ${ var ObjCBool }, %258 : $NSLock) // id: %262
bb22:                                             // Preds: bb20
  %263 = integer_literal $Builtin.Int64, 500069396323 // user: %264
  %264 = struct $UInt64 (%263 : $Builtin.Int64)   // user: %267
  %265 = integer_literal $Builtin.Int64, -1945555039024054272 // user: %266
  %266 = value_to_bridge_object %265 : $Builtin.Int64 // user: %267
  %267 = struct $_StringObject (%264 : $UInt64, %266 : $Builtin.BridgeObject) // user: %268
  %268 = struct $_StringGuts (%267 : $_StringObject) // user: %269
  %269 = struct $String (%268 : $_StringGuts)     // user: %278
  %270 = string_literal utf8 "C:\\agent\\_work\\55\\s\\swift-corelibs-foundation\\Sources\\Foundation\\NSDictionary.swift" // user: %272
  %271 = integer_literal $Builtin.Word, 83        // user: %274
  %272 = builtin "ptrtoint_Word"(%270 : $Builtin.RawPointer) : $Builtin.Word // user: %274
  %273 = integer_literal $Builtin.Int8, 2         // user: %274
  %274 = struct $StaticString (%272 : $Builtin.Word, %271 : $Builtin.Word, %273 : $Builtin.Int8) // user: %278
  %275 = integer_literal $Builtin.Int64, 20       // user: %276
  %276 = struct $UInt (%275 : $Builtin.Int64)     // user: %278
  // function_ref NSRequiresConcreteImplementation(_:file:line:)
  %277 = function_ref @$s10Foundation32NSRequiresConcreteImplementation_4file4lines5NeverOSS_s12StaticStringVSutF : $@convention(thin) (@guaranteed String, StaticString, UInt) -> Never // user: %278
  %278 = apply %277(%269, %274, %276) : $@convention(thin) (@guaranteed String, StaticString, UInt) -> Never
  unreachable                                     // id: %279
bb23:                                             // Preds: bb16
  %280 = class_method %2 : $NSDictionary, #NSDictionary.count!getter : (NSDictionary) -> () -> Int, $@convention(method) (@guaranteed NSDictionary) -> Int // user: %281
  %281 = apply %280(%2) : $@convention(method) (@guaranteed NSDictionary) -> Int // users: %310, %309, %282
  debug_value %281 : $Int, let, name "count"      // id: %282
  %283 = alloc_box ${ var Array<Any> }, var, name "keys" // users: %310, %284
  %284 = project_box %283 : ${ var Array<Any> }, 0 // users: %309, %291
  %285 = global_addr @_swiftEmptyArrayStorage : $*_SwiftEmptyArrayStorage // user: %286
  %286 = address_to_pointer %285 : $*_SwiftEmptyArrayStorage to $Builtin.RawPointer // user: %287
  %287 = raw_pointer_to_ref %286 : $Builtin.RawPointer to $__EmptyArrayStorage // users: %301, %300, %288
  %288 = upcast %287 : $__EmptyArrayStorage to $__ContiguousArrayStorageBase // user: %289
  %289 = struct $_ContiguousArrayBuffer<Any> (%288 : $__ContiguousArrayStorageBase) // user: %290
  %290 = struct $Array<Any> (%289 : $_ContiguousArrayBuffer<Any>) // users: %293, %291
  store %290 to %284 : $*Array<Any>               // id: %291
  %292 = alloc_stack $Array<Any>, var, name "objects" // users: %293, %309
  store %290 to %292 : $*Array<Any>               // id: %293
  %294 = alloc_box ${ var ObjCBool }, var, name "sharedStop" // users: %310, %295
  %295 = project_box %294 : ${ var ObjCBool }, 0  // user: %303
  %296 = integer_literal $Builtin.Int1, 0         // user: %297
  %297 = struct $Bool (%296 : $Builtin.Int1)      // user: %302
  %298 = metatype $@thin ObjCBool.Type            // user: %302
  // function_ref ObjCBool.init(booleanLiteral:)
  %299 = function_ref @$s10Foundation8ObjCBoolV14booleanLiteralACSb_tcfC : $@convention(method) (Bool, @thin ObjCBool.Type) -> ObjCBool // user: %302
  strong_retain %287 : $__EmptyArrayStorage       // id: %300
  strong_retain %287 : $__EmptyArrayStorage       // id: %301
  %302 = apply %299(%297, %298) : $@convention(method) (Bool, @thin ObjCBool.Type) -> ObjCBool // user: %303
  store %302 to %295 : $*ObjCBool                 // id: %303
  %304 = metatype $@thick NSLock.Type             // user: %306
  // function_ref NSLock.__allocating_init()
  %305 = function_ref @$s10Foundation6NSLockCACycfC : $@convention(method) (@thick NSLock.Type) -> @owned NSLock // user: %306
  %306 = apply %305(%304) : $@convention(method) (@thick NSLock.Type) -> @owned NSLock // users: %310, %307
  debug_value %306 : $NSLock, let, name "lock"    // id: %307
  %308 = class_method %2 : $NSDictionary, #NSDictionary.getObjects : (NSDictionary) -> (inout [Any], inout [Any], Int) -> (), $@convention(method) (@inout Array<Any>, @inout Array<Any>, Int, @guaranteed NSDictionary) -> () // user: %309
  %309 = apply %308(%292, %284, %281, %2) : $@convention(method) (@inout Array<Any>, @inout Array<Any>, Int, @guaranteed NSDictionary) -> ()
  br bb1(%281 : $Int, %283 : ${ var Array<Any> }, %294 : ${ var ObjCBool }, %306 : $NSLock) // id: %310
} // end sil function '$s10Foundation12NSDictionaryC23enumerateKeysAndObjects7options5usingyAA20NSEnumerationOptionsV_yyp_ypSpyAA8ObjCBoolVGtXEtF'

@compnerd
Copy link
Member Author

@swift-ci please test Linux platform

@compnerd compnerd merged commit 87d7210 into master Mar 28, 2020
@compnerd compnerd deleted the revert-2744-pr_url_redirect_fixes branch March 28, 2020 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant