Commit Graph

11 Commits

Author SHA1 Message Date
Allan Shortlidge
7ad12d73dd IRGen: Adjust tests for upstreaming of _stdlib_isOSVersionAtLeast_AEIC(). 2024-08-29 08:43:07 -07:00
Ben Langmuir
fd1875dcfb [test] Move availability tests to later fake OS versions
10.50 was once greater than any real macOS version, but now it compares
less than real released versions, which makes these tests depend on the
deployment target unnecessarily. Update these tests to use even larger
numbers to hopefully keep them independent a little longer.
2024-08-21 11:38:54 -07:00
Artem Chikin
1f14158a1d Introduce VisionOS Platform
This change introduces a new compilation target platform to the Swift compiler - visionOS.

- Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target.
- Addition of the new platform kind definition.
- Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries.
- Utilities to read out Darwin platform SDK info containing platform mapping data.
- Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback').
- Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path.
- Changes to existing test suite to accomodate the new platform.
2024-04-10 09:38:02 -07:00
Rintaro Ishizaki
a490db377a Bump host tools deployment version for Darwin OS (#61460)
* Bump host tools deployment version for Darwin OS

* Update availability_define.swift

* Fix the test to use @backDeployed from @_backDeploy

---------

Co-authored-by: Mishal Shah <shahmishal@users.noreply.github.com>
2023-02-05 22:11:32 -08:00
Devin Coughlin
664e7cc00e [Availability] Make _stdlib_isOSVersionAtLeast() no longer inlinable
To make it possible to change the implementation of
_stdlib_isOSVersionAtLeast(), remove the @inlinable attribute from it.

Since it is currently inlinable and calls the helper function
_swift_stdlib_operatingSystemVersion(), we’ll have to keep the
helper around as ABI.

This change causes a minor pessimization where the LLVM optimizer can no
longer reason that, for example, a successful check for 10.12 availability
means that a later check for 10.11 will always succeed. I don't expect this
pessimization to be a problem, but if needed we could write a custom SIL
optimizer pass to claw back the performance.

<rdar://problem/59447474>
2020-02-13 20:08:48 -08:00
Michael Gottesman
fd4828e40a Eliminate -assume-parsing-unqualified-ownership-sil from tests.
I am doing this separately from the actual change to eliminate the option to
make it easier to review.
2018-12-19 12:54:13 -08:00
Erik Eckstein
39bb14b094 change mangling prefix from $S to $s
This is the final ABI mangling prefix

rdar://problem/38471478
2018-09-19 13:55:11 -07:00
Arnold Schwaighofer
935641284a Change test case so that it passes on archs that return directly 2018-08-17 11:24:20 -07:00
Mike Ash
195e3807d1 [Runtime] Mark _swift_stdlib_operatingSystemVersion as __attribute__((const)).
This tells the compiler that repeated calls to this function will always generate the same result, which allows the optimizer to coalesce multiple calls, hoist calls out of loops, and other such nice things.

rdar://problem/20690429
2018-08-16 13:24:54 -04:00
Arnold Schwaighofer
b9b6362251 Re-enable inlining of the _stdlib_isOSVersionAtLeast macro 2018-08-14 13:42:55 -07:00
Arnold Schwaighofer
0330ec0fd5 AllocStackHoisting: Don't hoist alloc_stacks in the presence of an availability guard
This disables inlinability of _stdlib_isOSVersionAtLeast. I don't see
value in making it inlinable as long as _swift_stdlib_operatingSystemVersion is
opaque.

rdar://41849700
2018-07-10 12:04:07 -07:00