It cannot be used for executing general-purpose work, because such function would need to have a different signature to pass isolated actor instance.
And being explicit about using this method only for deinit allows to use object pointer for comparison with executor identity.
Fix an unused variable warning in `Errors.cpp`.
Use brace initialization syntax in `SymbolInfo.cpp` rather than using
a constructor call.
rdar://130992923
This inserts a suitably named function into the stack trace whenever
a dynamic cast failure involves a NULL source or target type.
Very often, crash logs include backtraces with function names but
no log output; with this change, such a backtrace might look like
the following -- note `TARGET_TYPE_NULL` in the function name
here to mark the missing type information:
```
frame #0: __pthread_kill + 8
frame #1: pthread_kill + 288
frame #2: abort + 128
frame #3: swift::fatalErrorv()
frame #4: swift::fatalError()
frame #5: swift_dynamicCastFailure_TARGET_TYPE_NULL()
frame #6: swift::swift_dynamicCastFailure()
frame #7: ::swift_dynamicCast()
```
Resolves rdar://130630157
Prefer `ZeroMemory()` to `::memset()` here.
Use `sizeof(*wszBuffer)` instead of `sizeof(WCHAR)`, just in case.
Don't use `*this=other`, because that motivates tests around `::free()`,
but instead pull the shared code out into some private functions.
Also, fix `SymbolInfo()` to initialize the pointer members.
rdar://130992923
We were calling `SymInitialize()` multiple times, which is wrong, which
was making the `SymbolInfo::lookup()` call fail. Also, we weren't
fetching the module names, so we should do that too.
rdar://130992923
The _Builtin_float symbols were moved twice, most recently from the OS Darwin library, but previously they were in the embedded @rpath Darwin library. @_originallyDefinedIn doesn't support multiple install names, but it can be replaced with -module-abi-name, and then multiple $ld$previous$ symbols can be used.
Update the Platform and Concurrency magic symbols to use $ld$previous$ everywhere.
rdar://130107191
The move from `@_unsafeInheritExecutor` to `#isolation` for the
with*Continuation breaks code that is using `@_unsafeInheritExecutor` and
calling these APIs. This originally caused silent breakage (which manifest
as runtime crashes), and is now detected by the compiler as an error.
However, despite `@_unsafeInheritExecutor` being an unsafe,
not-intended-to-be-user-facing feature, it is indeed being used, along
with these APIs. Introduce _unsafeInheritExecutor_-prefixed versions of
the `with*Continuation` and `withTaskCancellationHandler` APIs into
the _Concurrency library that use `@_unsafeInheritExecutor`. Then,
teach the type checker to swap in these
_unsafeInheritExecutor_-prefixed versions in lieu of the originals
when they are called from an `@_unsafeInheritExecutor` function. This
allows existing code using `@_unsafeInheritExecutor` with these APIs
to continue working as it has before, albeit with a warning that
`@_unsafeInheritExecutor` has been removed.
Fixes rdar://131151376.
The stdlib is always built with NoncopyableGenerics enabled, so `#if
$NoncopyableGenerics` guards in non-inlinable code are superfluous.
Additionally, the stdlib's interface no longer needs to support compilers
without the feature, so the guards in inlinable code can also be removed.
https://github.com/swiftlang/swift/pull/72612 can be reverted because it is no
longer necessary for the interface of the stdlib to be compatible with
compilers without `$TypedThrows` support.
If a type or opaque type descriptor appears inside of a protocol extension of the form:
```
extension P where Self == Nominal { ... }
```
then the runtime representation of the extension context was interpreted by the runtime
demangler as a nominal type extension, even though the parameterization is on the
`<Self>` generic signature of the protocol extension and not the generic signature of
the nominal type. This would cause spurious rejection of mangled names referencing the
extension context because we mistakenly thought that the type arguments mismatched with
the nominal type signature rather than matching them to the extension context.
Add some code to `_findExtendedTypeContextDescriptor` to detect when an extension is
a protocol extension with a `Self == SameType` constraint, and pass the extension along
rather than treating it as a nominal type extension. Fixes rdar://130168101.
Apparently we're missing a cast in `_swift_initRuntimePath()`. Previously
this code was accidentally not being used, which is why we hadn't noticed
it.
rdar://131294724