Commit Graph

12 Commits

Author SHA1 Message Date
Daniel Rodríguez Troitiño
ba68faaed5 [test] Mark tests that use experimental/upcoming features as such
Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.

Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).

All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.

There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
2024-11-02 11:46:46 -07:00
Mike Ash
4b438d517a [Test] Fix remote-run of objc_implementation_objc_client.m, again.
The previous fix wasn't quite good enough, as the framework didn't get copied to the remote device. Pass the framework as a command-line argument to the test executable so that remote-run copies it.

rdar://134406720
2024-09-03 16:41:55 -04:00
Mike Ash
b7636733f7 [Test] Fix remote-run of objc_implementation_objc_client.m.
Use a @executable_path relative install name so that it still works when the executable and framework are copied and run elsewhere.

rdar://134406720
2024-08-26 11:12:34 -04:00
Becca Royal-Gordon
79acf14ec4 Re-enable objc_implementation_objc_client.m
This test was disabled over a year ago due to what may have been a standard library bug; however, the failure no longer reproduces in commonly-tested configurations.

Experimentally re-enable the test to find out whether it is still failing in *any* tested configuration or whether we can simply leave it turned on.

Fixes rdar://101497120 (maybe).
2024-08-19 17:11:27 -07:00
Becca Royal-Gordon
6d3e1ad794 Fix -target in several objcImpl tests 2024-04-30 12:03:46 -07:00
Becca Royal-Gordon
f94ed6d606 Hide objcImpl resilience support behind feature
Resilence support will require changes to the Objective-C runtime to expand support for metadata initialization functions. Add a separate experimental feature flag to help with staging that support in, and modify diagnostics to not suggest increasing the minimum deployment target for now.
2024-04-30 12:03:46 -07:00
Becca Royal-Gordon
427386feea Support resilient stored properties in objcImpl
When an @objc @implementation class requires the use of `ClassMetadataStrategy::Update` because some of its stored properties do not have fixed sizes, we adjust the direct field offsets during class realization by emitting a custom metadata update function which calls a new entry point in the Swift runtime. That entry point adjusts field offsets like `swift_updateClassMetadata2()`, but it only assumes that the class has Objective-C metadata, not Swift metadata.

This commit introduces an alternative mechanism which does the same thing without using any Swift-only metadata. It’s a rough implementation with important limitations:

• We’re currently using the field offset vector, which means that field offsets are being emitted into @objc @implementation classes; these will be removed.
• The new Swift runtime entry point duplicates a lot of `swift_updateClassMetadata2()`’s implementation; it will be refactored into something much smaller and more compact.
• Availability bounds for this feature have not yet been implemented.

Future commits in this PR will correct these issues.
2024-04-30 12:03:44 -07:00
Becca Royal-Gordon
35f05cdf8d Fix objc_implementation_objc_client test
Because this test is disabled, a previous commit failed to add an experimental feature flag that’s required to run it.
2024-04-24 11:39:24 -07:00
Hamish Knight
d310542f3c [test] Disable objc_implementation_objc_client.m
rdar://101497120
2022-10-25 14:31:46 +01:00
Becca Royal-Gordon
7f0791ed44 Temporarily disable test in simuilators for CI
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.
2022-10-18 17:21:56 -07:00
Becca Royal-Gordon
6143b8379f Generate IR for @_objcImpl stored properties
Only works for trivial types right now because features related to initialization and deinitialization are seriously busted.
2022-10-18 17:21:56 -07:00
Becca Royal-Gordon
ba1ec90419 Generate IR for @_objcImpls
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.
2022-10-18 17:21:56 -07:00