Adds a SpanIterator type and switches to use that for new borrowing
sequences, removing the BorrowingIterator customization for existing
stdlib sequence types. These existing sequences will just get the
borrowing adaptor, so as to continue with their existing iteration
model.
If the backtracer crashes, at present we get no clues as to what
went wrong. This makes it very hard to debug. Part of the reason
for this is that we were worried about it entering a recursive
backtracing loop, however not having any messages at all when
something goes awry is a bit of a problem.
To address this, have the backtracing code set an environment
variable to indicate that we're backtracing, then if we crash with
that variable set, disable the backtracer for the subsequent run
of the backtracer. This means that if the initial backtracer
instance crashes, we will try to run at most one more instance to
backtrace *that*.
rdar://170801141
`-define-availability` arguments for stdlib modules can be very long,
which may exceed Windows command-line length limits and cause build
failures. Use response files to avoid this.
Ever since `_BorrowingSequence` and friends landed in the standard library,
it's introduced a primary associated type that is suppressed. Since the mangling
of generic signatures is different depending on whether you're using
`SuppressedAssociatedTypes` and the `-WithDefaults` version, we should introduce
it with the new mangling in-place. It's also source breaking to make this switch
happen later on, since defaults will get assumed where they were not before.
rdar://170650908
This is better than the `alternativePaths` mechanism because it means that
a client of the `Runtime` module can do its own thing, which might even
mean fetching things from a remote server or decompressing files or any
other thing we might find useful.
rdar://170642627
7b9281fcb8
was applied to resolve a condfail but it wasn't done in all places, also
apply it to the new typed throws version
rdar://166244033
FYI @gottesmm
We can't test the alternate image support for ELF, because that's been
removed in favour of `SymbolLocator`/`SymbolSource`.
Also we must pass `/opt:icf` in the symbolicated backtrace test when
using PDB, otherwise we corrupt the metadata.
Finally fix a mistake in `Utils.swift` where we were crashing if the
environment variable in question wasn't set.
rdar://168454023
Without scanning the main symbol stream, we get weird names for the
Swift functions in the backtrace, because the compiler generates C++-style
names for them. We actually want the mangled names, if possible, which
only seem to be in the symbol stream, so scan that as well and use it
to find mangled names.
rdar://168454023
This is necessary to disambiguate when calling the method
for CxxBorrowingSequences in a non-generic context. The `Sequence`
extension is unconditional, and I haven't been able to figure
out another tie-breaker for other protocol-provided methods.
Identified in test/Interop/Cxx/stdlib/use-std-vector.swift
This is a follow up from the "async" `deinit` work, which will allow us
to guarantee cleanup code to run in deinitializers, even if they need to
call asynchronous code, and even if they may be run in a task that was
cancelled: by "shielding" it from cancellation.
This is incomplete, the child handling needs some more love.
SE proposal: https://github.com/swiftlang/swift-evolution/pull/3037/