Commit Graph

8 Commits

Author SHA1 Message Date
Drew Maxwell
7825221cd4 Updating Swift tests to remove outdated tests and use more current calls. 2022-09-16 15:11:10 -07:00
Nate Chandler
674fc2c33a [Test] Reenabled two tests.
They should have been reenabled earlier.

rdar://81704151
2022-07-15 13:47:24 -07:00
Nate Chandler
4aff98ffb5 [SILGen] Use opaque AP for ObjC-async returns.
Previously, the AbstractionPattern that was used for the value
"returned" (i.e. via a completion handler) from ObjC mostly (but not
quite always) was "type".

The generated completion handler correctly (because this is required in
order to call _resumeUnsafeContinuation) reabstracted the block (e.g.
from @convention(block) to @substituted <T> () -> @out T for <()>).  The
callee of the ObjC function, however, loaded the function from the block
as if it were not reabstracted (e.g. () -> ()).

On most platforms, that happened to work.  On arm64e, that difference in
types caused in a difference in pointer signing, resulting in a failure
at runtime.

rdar://85526879
rdar://85526916
2022-04-20 10:42:45 -07:00
Nate Chandler
06971042e5 [Test] Disabled a couple tests on arm64e.
rdar://85526879
rdar://85526916
2021-12-03 08:32:40 -08:00
Hamish Knight
4c66ff01a1 [test] Skip some Concurrency tests during back deployment testing
rdar://82123254
2021-08-20 11:11:34 +01:00
Nate Chandler
a4992cff64 [Test] Reenabled compiler_crashers_2_fixed/rdar81590807.swift.
The test isn't supported on optimized builds because of the different
crash behavior there.

rdar://81804817
2021-08-11 13:47:36 -07:00
Holly Borla
f6a6a34b08 [Test] Disable compiler_crashers_2_fixed/rdar81590807.swift 2021-08-11 11:39:56 -07:00
Nate Chandler
6eb4f2ca8a [SILGen] Handled transforming Bridged? -> Swift.
Previously, the function emitCBridgedToNativeValue handled three
situations around optionals:
- Bridged?, Native?
- Bridged, Native?
- Bridged, Native

Here, handling for the fourth case
- Bridged?, Native
is added.

To enable this, the number of Optional wrappings that the bridged type
has that the native type does not is passed in to the function.  Then,
in the portions of the function where actual transformations are done,
the values are unwrapped an appropriate number of times.  Mostly that
means force unwrapping N times before doing the transformation.  In the
case of types that conform to _ObjectiveCBridgeable, however, it means
force unwrapping the value N-1 times after doing the transformation
because _ObjectiveCBridgeable._unconditionallyBridgeFromObjectiveC
performs one layer of unwrapping itself.

rdar://81590807
2021-08-09 19:02:27 -07:00