Commit Graph

9 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
Kuba Mracek
ff1f8adac8 [embedded] Implement non-allocating embedded Swift mode, under -no-allocations flag 2023-12-11 09:00:50 -08:00
Kuba Mracek
f1aba675ef [embedded] Mark all embedded tests as REQUIRES: swift_in_compiler 2023-11-07 10:01:03 -08:00
Kuba Mracek
30046b1f8d [embedded] Update wording on existential diagnostics, take 2 2023-10-14 14:03:59 -07:00
Kuba Mracek
bbe111cca6 [embedded] Update wording on 'no existentials' diagnostic 2023-10-13 10:31:14 -07:00
Kuba Mracek
d5b1abb726 [embedded] Improve the diagnostic message when using an existential 2023-10-09 16:20:08 -07:00
Kuba Mracek
ae2e903574 [embedded] Build an initial embedded Swift standard library
This isn't a "complete" port of the standard library for embedded Swift, but
something that should serve as a starting point for further iterations on the
stdlib.

- General CMake logic for building a library as ".swiftmodule only" (ONLY_SWIFTMODULE).
- CMake logic in stdlib/public/core/CMakeLists.txt to start building the embedded stdlib for a handful of hardcoded target triples.
- Lots of annotations throughout the standard library to make types, functions, protocols unavailable in embedded Swift (@_unavailableInEmbedded).
- Mainly this is about stdlib functionality that relies on existentials, type erasure, metatypes, reflection, string interpolations.
- We rely on function body removal of unavailable functions to eliminate the actual problematic SIL code (existentials).
- Many .swift files are not included in the compilation of embedded stdlib at all, to simplify the scope of the annotations.
- EmbeddedStubs.swift is used to stub out (as unavailable and fatalError'd) the missing functionality.
2023-09-16 12:38:46 -07:00
zoecarver
a5d7d2f020 [embedded] Require whole module optimization in embedded mode. 2023-09-15 16:41:06 -06:00
zoecarver
48789914bb [embedded] Add initial tests; fix two issues in IRGen. 2023-09-06 10:48:17 -07:00