This ensures that when we hit IRGen, if we have a type with trivial contents, we
emit nothing and if we have a type with non-trivial contents, we just emit
recursive retain/release as appropriate.
This is the last bug holding up the buffer view prototype from Guilliume.
New subscript allows to pass wrapped self instance down to the
type wrapper and is declared as follows:
```
subscript<...>(wrappedSelf <name>: Wrapped, propertyKeyPath: ..., storageKeyPath: ...)
```
The type-checker would use it to synthesize getter/setter accessors for
managed storage if wrapped type is a class.
This is failing in the iOS simulator, but *only* in Swift CI, not locally (even with the same tools). Disable the test ouside of macOS while we investigate the failure.
This commit begins to generate correct metadata for @_objcImplementation extensions:
• Swift-specific metadata and symbols are not generated.
• For main-class @_objcImpls, we visit the class to emit metadata, but visit the extension’s members.
• Includes both IR tests and executable tests, including coverage of same-module @objc subclasses, different-module @objc subclasses, and clang subclasses.
The test cases do not yet cover stored properties.
Immutable properties cannot be re-assigned and don't have setters
which means that we cannot use `assign_by_wrapper` instruction to
handle `let` properties, but we can use a direct reference to
`_storage` property instead when immutable property appears as an
assignment destination and let read references go through a getter
still.
Inject a call to $Storage.init(...) which is then used to initialize
type wrapper property `$storage` via `self.$storage = <TypeWrapper>(memberwise: <storage>)`
call at each point where `_storage` becomes fully initialized.
NOTE: If one does not define a deinit on a move only type, if a destroy_value
lasts until IRGen time we will assert since I haven't implemented support in
IRGen for the destroy value witness for move only types. That being said, just
creating a deinit by adding to such a type:
```
deinit {}
```
is pretty low overhead for the experiments we want to use this for.
* initial
* it works
demangling mostly works
fix dots
printing works
add tests
add conformance to AnyKeyPath
implement SPI
subscripts fully work
comments
use cross platform image inspection
remove unnecessary comment
fix
fix issues
add conditional conformance
add types
try to fix the api-digester test
cr feedback: move impls behind flag, remove addChain(), switch statement, fallthrough instead of if-elses, move import
cr feedback: refactor switch statement
fix #ifdef
reindent, cr feedback: removes manual memory management
fix missing whitespace
fix typo
fix indentation issues
switch to regexes
checks should test in on all platforms
print types in subscripts
add test for empty subscript
Update test/api-digester/stability-stdlib-abi-without-asserts.test
Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com>
add commas
fix failing test
fix stdlib annotation
cr feedback: remove global, refactor ifdef
cr feedback: switch back to manual memory management
switch to 5.8 macro
add new weakly linked functions to the allowlist
fix one more failing test
more cr feedback
more cr feedback
* fix invisible unicode
If a stored property would be in a default memberwise initializer
it would be added to the `init` synthesized for a type wrapped type
as well i.e. a `let` property without a default.
Since properties with property wrappers are not supported, default
init synthesis needs to handle them as well by using correct interface
type depending on outer wrapper capabilities and setting correct
default expression.
* [IRGen] Properly handle empty payloads in getEnumTagMultipayload
rdar://97914498
The generated code assumed that payloads would always be at least
1 byte long, ignoring the possibility of empty payloads, causing
runtime crashes when using empty payloads in multi payload enums.
* Fix test
* Remove unnecessary basic block