Commit Graph

11 Commits

Author SHA1 Message Date
Allan Shortlidge
cb578172ea Tests: Remove -disable-availability-checking in more tests that use concurrency.
Use the `%target-swift-5.1-abi-triple` substitution to compile the tests for
deployment to the minimum OS versions required for use of _Concurrency APIs,
instead of disabling availability checking.
2024-10-19 12:35:20 -07:00
Doug Gregor
eeeea49764 Remove -enable-experimental-concurrency almost everywhere. 2021-07-26 21:24:43 -07:00
Doug Gregor
1e2012d816 Disable availability checking in tests that use concurrency 2021-07-20 12:46:26 -07:00
Doug Gregor
2b9ca315fe [Concurrency] Remove asyncHandler attribute.
The `asyncHandler` attribute turned out to be the wrong solution
to the problem of creating a sync->async bridge. Remove it.
2021-05-13 17:01:39 -07:00
Richard Wei
fb66de6126 Unify mangling operators for async, @Sendable, @differentiable and @noDerivative.
Repurpose mangling operator `Y` as an umbrella operator that covers new attributes on function types. Free up operators `J`, `j`, and `k`.

```
async ::= 'Ya'                             // 'async' annotation on function types
sendable ::= 'Yb'                          // @Sendable on function types
throws ::= 'K'                             // 'throws' annotation on function types
differentiable ::= 'Yjf'                   // @differentiable(_forward) on function type
differentiable ::= 'Yjr'                   // @differentiable(reverse) on function type
differentiable ::= 'Yjd'                   // @differentiable on function type
differentiable ::= 'Yjl'                   // @differentiable(_linear) on function type
```

Resolves rdar://76299796.
2021-04-07 17:49:10 -07:00
Nate Chandler
eb5fadcf0e [TBD] Fixed AsyncFunctionPointer name for @_silgen_name'd funcs.
Use SILDeclRef::mangle for AsyncFunctionPointers.

rdar://76026408
2021-03-31 11:11:38 -07:00
Doug Gregor
c76dac7155 Banish @asyncHandler to a hidden flag.
We don't want @asyncHandler to be part of the concurrency model, so put
it behind a different flag.
2021-03-25 16:45:21 -07:00
Daniel Rodríguez Troitiño
748339a83a [test] Mark concurrency tests with appropiate REQUIRES. (#35624)
The Python build system always enables concurrency, but CMake has it
disable by default. Collaborators that do not use the Python build
system and use directly CMake will have it disable, unless they
explicitely enable it. If the tests are not marked as requiring the
concurrency features, the tests will fail to execute when concurrency is
disabled.

The changes add the `REQUIRES: concurrency` line to many tests that deal
with concurrency, but wasn't marked as such.
2021-02-01 11:45:15 -08:00
Nate Chandler
2e880af6a0 [TBDGen] Use effective linkage for class member async function pointers.
Previously, the "bare" linkage of a link entity was used to determine
whether to put an async function pointer into the tbd.  That did not
match the mechanism by which the linkage was determined in IRGen.
There, the linkage is the "_effective_" linkage (i.e. the value returned
from SILFunction::getEffectiveSymbolLinkage).

Here, whether to put the async function pointer corresponding to a class
method is determined on the basis of that effective linkage.

rdar://problem/73203508
2021-01-19 08:45:04 -08:00
Nate Chandler
73cfca89b6 [IRGen] Corrected mangling of AsyncFunctionPointers.
Previously, the suffix "AD" was used to mangle AsyncFunctionPointers.
That was incorrect because it was already used in the mangling scheme.
Here, that error is fixed by using 'u' under the thunk or specialization
operator 'T' to mangle AsyncFunctionPointers.  Additionally, printing
and demangling support is added.

rdar://problem/72336407
2020-12-15 18:24:25 -08:00
Nate Chandler
4a515c6dd5 [TBDGen] @asyncHandlers don't have public async function pointers.
Previously, an async function pointer symbol was being emitted into the
TBD for all AbstractFunctionDecls which returned true for
"hasAsynContext", i.e. both those that were async and those which were
asnycHandlers.  That was not correct because the async function portion
of an asyncHandler is not ABI.  Here, that mistake is fixed by only
emitting this symbol for functions which are annotated async (i.e. those
for which "hasAsync" returns true).

rdar://problem/72329062
2020-12-15 10:24:42 -08:00