mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Optimize accessing Swift Arrays from ObjC
This commit is contained in:
@@ -541,8 +541,6 @@ ArrayTestSuite.test("BridgedToObjC/Verbatim/objectAtIndex") {
|
||||
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
|
||||
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
|
||||
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
|
||||
|
||||
expectAutoreleasedKeysAndValues(unopt: (0, 3))
|
||||
}
|
||||
|
||||
for indexRange in [
|
||||
@@ -602,8 +600,6 @@ ArrayTestSuite.test("BridgedToObjC/Verbatim/getObjects") {
|
||||
|
||||
buffer.deallocate()
|
||||
_fixLifetime(a)
|
||||
|
||||
expectAutoreleasedKeysAndValues(unopt: (0, 3))
|
||||
}
|
||||
|
||||
ArrayTestSuite.test("BridgedToObjC/Verbatim/copyWithZone") {
|
||||
@@ -721,8 +717,6 @@ ArrayTestSuite.test("BridgedToObjC/Verbatim/BridgeBack/Reallocate") {
|
||||
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
|
||||
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
|
||||
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
|
||||
|
||||
expectAutoreleasedKeysAndValues(unopt: (0, 3))
|
||||
}
|
||||
|
||||
ArrayTestSuite.test("BridgedToObjC/Verbatim/BridgeBack/Adopt") {
|
||||
@@ -812,7 +806,6 @@ ArrayTestSuite.test("BridgedToObjC/Custom/objectAtIndex") {
|
||||
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
|
||||
|
||||
expectEqual(3, TestBridgedValueTy.bridgeOperations)
|
||||
expectAutoreleasedKeysAndValues(unopt: (0, 3))
|
||||
}
|
||||
|
||||
for indexRange in [
|
||||
@@ -874,7 +867,6 @@ ArrayTestSuite.test("BridgedToObjC/Custom/getObjects") {
|
||||
_fixLifetime(a)
|
||||
|
||||
expectEqual(3, TestBridgedValueTy.bridgeOperations)
|
||||
expectAutoreleasedKeysAndValues(unopt: (0, 3))
|
||||
}
|
||||
|
||||
ArrayTestSuite.test("BridgedToObjC/Custom/copyWithZone") {
|
||||
@@ -1011,8 +1003,6 @@ ArrayTestSuite.test("BridgedToObjC/Custom/BridgeBack/Cast") {
|
||||
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
|
||||
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
|
||||
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
|
||||
|
||||
expectAutoreleasedKeysAndValues(unopt: (0, 3))
|
||||
}
|
||||
|
||||
ArrayTestSuite.test("BridgedToObjC/Custom/BridgeBack/Reallocate") {
|
||||
@@ -1045,8 +1035,6 @@ ArrayTestSuite.test("BridgedToObjC/Custom/BridgeBack/Reallocate") {
|
||||
expectEqual(idValue0, unsafeBitCast(a.object(at: 0) as AnyObject, to: UInt.self))
|
||||
expectEqual(idValue1, unsafeBitCast(a.object(at: 1) as AnyObject, to: UInt.self))
|
||||
expectEqual(idValue2, unsafeBitCast(a.object(at: 2) as AnyObject, to: UInt.self))
|
||||
|
||||
expectAutoreleasedKeysAndValues(unopt: (0, 3))
|
||||
}
|
||||
|
||||
ArrayTestSuite.test("BridgedToObjC/Custom/BridgeBack/Adopt") {
|
||||
|
||||
Reference in New Issue
Block a user