UnsafeContinuations can be stored in variables or properties,
so it's important for RemoteMirror to be able to at least minimally
recognize them.
This just treats an UnsafeContinuation as a refcounted pointer.
Which might be "good enough" for now.
Working towards rdar://110351406
The "generic depth" is used to match up generic type variables.
For example:
```
struct Foo<T> { // `T` at generic depth 0
struct Bar {
struct Baz<U> { // 'U' at generic depth 1
...
}}}
```
Note in the above that `Bar` is not counted in the
generic depth. The previous logic did count `Bar` in
the generic depth calculation, leading to mismatches
when trying to associate references to generic variables.
This adds a new test with cases like the above and of course
corrects the calculation.
Resolves rdar://127450037
The reverse-condfail workaround needs to be removed, and this is the
first step to allowing the stdlib to build with conditionally escapable
types.
resolves rdar://132453000
From feedback, replace the name `_debugDescription`, which was confusing because of the
underscore, with `lldbDescription`. This new name also indicates that this property may
contain [LLDB Summary Strings](https://lldb.llvm.org/use/variable.html#summary-strings).
This apinote file needs to be accessible in the locally built Android SDK as it's being built with build.ps1, so that swift-foundation can be built with that file present. This change ensures that the file is copied over into the local build directory for that Android SDK, in addition to being included in the installed component
This change also places the component into lib/swift/apinotes, as that's where the clang importer already looks for API notes
* [stdlib] Remove docs from default implementations
Customized docs were not removed:
public static var isSigned: Bool
public static var max: Self
public static var min: Self
public var description: String
public var magnitude: Self
public init<T: BinaryInteger>(_ source: T)
public func distance(to other: Self) -> Int
public func advanced(by n: Int) -> Self
* [stdlib] Remove unused docs for "unsafe" methods
* [stdlib] Remove inherited "ReportingOverflow" docs
* [stdlib] Remove inherited docs for operators
Customized docs were not removed.
(`+`, `-`, `*`, `+=`, `-=`, `*=`)
Non-inherited docs were not removed.
(`&+`, `&-`, `&+=`, `&-=`, `&*=`)
* [stdlib] Reattach doc comments to their APIs
Use `rstrip()` to remove the trailing newline.
<https://docs.python.org/3/library/stdtypes.html#str.rstrip>
* [stdlib] Remove inherited docs from integer types
* [stdlib] Remove FIXME(ABI) comments
* [stdlib] Remove unused docs for operators
* [stdlib] Update example code for `-=` and `*=`
* [stdlib] Update internal gyb comments
* [stdlib] Move docs to BinaryInteger overrides
* [stdlib] Remove unused gyb code
* [stdlib] Fix `&-` and `&*` examples
* Add missing period at end of sentence
* Add missing period
Co-authored-by: LamTrinh.Dev <me@lamtrinh.dev>
---------
Co-authored-by: LamTrinh.Dev <me@lamtrinh.dev>
The executor may execute and free the task while the enqueue code is still finishing up. If that code tries to get an async backtrace (for example, if it calls malloc/free with malloc stack logging enabled) then it will find a dangling pointer in the current task TSD, and dereferencing it may crash.
rdar://130125017
This fills in a number of missing cases:
* MPEs with closure payloads
* MPEs with many non-payload cases
* MPEs with class existential payloads
* MPEs with existential metatype payloads
Resolves rdar://132270733
Resolves rdar://128705332
**Background:**
Each RemoteMirror test runs two processes: A host process runs the
RemoteMirror library and queries memory data from a target process. The host
and target communicate by passing strings back and forth with requests to read
particular information in memory. The target is pure Swift; the host is
C/C++.
**What this change does:**
Without this, the host makes very many small requests to the target.
Each of those requests has to be individually parsed by the target
using String operations from the debug stdlib. Actually transferring
the raw bytes is relatively quick.
With this, the host requests and caches "pages" of about 4k and
satisfies most requests from previously-fetched data. This dramatically
reduces the total number of operations.
**Performance notes:**
The following notes only count the time to compile and run the 78 tests in the
validation-tests/Reflection directory using `lit.py`; it does not include time
to rebuild the project before running tests.
**Performance with debug stdlib:**
(That is: `build-script -ra --debug-swift-stdlib`) Before this change, I got
tired of waiting after about 15 minutes and it was about 1/4 done. Some very
simplistic profiling showed >99% of the time being spent in stdlib String
operations in the target process. Activity Monitor shows that individual tests
run for about 6 minutes of CPU time each.
With this change, the tests run in about 70s of wall time. Almost all of the
time seems to spent compiling the tests; the tests themselves run too quickly to
even show up in the Activity Monitor.
**Performance with release stdlib:**
(That is: `build-script -ra`)
The tests run in about 70s of wall time with or without this change.
The subscript function from CxxRandomAccessCollection did not perform any bounds-checks.
This means that C++ containers that don't provide the operator[] (or C++ containers used in generic contexts) didn't have bounds-checks.
Fixes rdar://126570011