Commit Graph

610 Commits

Author SHA1 Message Date
Kuba Mracek
2542bc4495 [embedded] Mark test/embedded/ptrauth-none-macho.swift as REQUIRES: embedded_stdlib_cross_compiling 2025-01-21 09:40:28 -08:00
Alejandro Alonso
11fbd94668 Merge pull request #78664 from Azoy/unicode-16
[stdlib] Unicode 16
2025-01-21 09:29:35 -08:00
Kuba Mracek
d8c0c25b4b [embedded] Centralize the OS/target requirements on (most) Embedded Swift tests 2025-01-19 11:44:55 -08:00
Kuba (Brecka) Mracek
7f5686d5ff Merge pull request #78613 from kubamracek/embedded-arm64e-none-macho
[embedded] Add a test for arm64e ptrauth using -none-macho triple
2025-01-18 20:44:58 -08:00
Alejandro Alonso
69f6df024d Remove consonant check 2025-01-17 17:46:14 -08:00
Alejandro Alonso
29378d3132 Update embedded unicode dead strip test v2 2025-01-16 16:08:25 -08:00
Alejandro Alonso
6d5acec493 Update embedded dead strip tests 2025-01-16 13:36:50 -08:00
Kuba Mracek
4110b390e9 [embedded] Add a test for arm64e ptrauth using -none-macho triple 2025-01-13 11:59:49 -08:00
Erik Eckstein
cc308c97cf embedded: make sure to generate witness tables which are imported from other modules
In embedded swift all the code is generated in the top-level module.
De-serialized witness tables for class existentials must be code-gen'd and therefore made non-external.

Fixes an unresolved symbol linker error.
rdar://142561676
2025-01-13 14:08:35 +01:00
Arnold Schwaighofer
c7b343d603 Disable this test on anything but macOS
Attempting to unblock bots

Specifically, this also seems to fail on PR tests:

```
Failed Tests (1):
  Swift(iphonesimulator-x86_64) :: embedded/wrong-linkage.swift
```

rdar://142601111
2025-01-09 14:17:02 -08:00
Erik Eckstein
67b8c08ef1 SILLinker: convert an assert to a compiler error message
Having a wrong linkage can happen if the user "re-defines" an existing function with a wrong linkage, e.g. using `@_cdecl`.
2025-01-08 11:00:27 +01:00
Kuba Mracek
054527731e [embedded] Add test/embedded/availability-macos.swift 2024-12-18 13:46:36 -08:00
Kuba (Brecka) Mracek
0bbaa3519b Merge pull request #78100 from kubamracek/embedded-no-metadata-cxx
[embedded] Don't emit metadata references from C++ interop
2024-12-12 21:14:52 -08:00
Kuba (Brecka) Mracek
7946bf7840 Merge pull request #78147 from kubamracek/embedded-cxxshim
[embedded] Include and use cxxshims in the embedded/ resource dir
2024-12-12 20:36:56 -08:00
Kuba Mracek
77c6494cdb [embedded] Add test/embedded/cxx-no-metadata.swift testcase 2024-12-12 15:32:24 -08:00
Kuba Mracek
3aeb5e9289 [embedded] Add missing 'REQUIRES' into test/embedded/cxxshim.swift 2024-12-12 15:30:50 -08:00
Kuba Mracek
85a4f18dcd [embedded] Add test/embedded/cxxshim.swift testcase 2024-12-12 12:17:55 -08:00
Kuba Mracek
1952449d64 [embedded] Test changes for new Embedded Swift mangling prefix 2024-12-03 09:10:45 -08:00
Erik Eckstein
7cceaff5f3 SIL: don't print operand types in textual SIL
Type annotations for instruction operands are omitted, e.g.

```
  %3 = struct $S(%1, %2)
```

Operand types are redundant anyway and were only used for sanity checking in the SIL parser.

But: operand types _are_ printed if the definition of the operand value was not printed yet.
This happens:

* if the block with the definition appears after the block where the operand's instruction is located

* if a block or instruction is printed in isolation, e.g. in a debugger

The old behavior can be restored with `-Xllvm -sil-print-types`.
This option is added to many existing test files which check for operand types in their check-lines.
2024-11-21 18:49:52 +01:00
Kuba (Brecka) Mracek
3fdec2171f Merge pull request #77657 from kubamracek/embedded-more-stdlib
[embedded] Add back lazy collection operations, collection diffing and StaticBigInt to Embedded Stdlib
2024-11-19 15:03:31 -08:00
Erik Eckstein
4241a2cbfd embedded: Don't emit SILProperties in embedded swift
SILProperties are only needed for resilient builds.

Fixes a crash in IRGen
https://github.com/swiftlang/swift/issues/77682
2024-11-19 10:10:56 +01:00
Kuba Mracek
cf75741ad6 [embedded] Restrict test/embedded/collection-difference.swift to just macOS 2024-11-16 08:29:51 -08:00
Kuba Mracek
0d4f91f271 [embedded] Add back lazy collection operations, collection diffing and StaticBigInt to Embedded Stdlib 2024-11-16 08:16:57 -08:00
Kuba Mracek
b370050dd0 [embedded] Enable integer parsing in Embedded Swift 2024-11-13 11:52:37 -08:00
Kuba Mracek
b197db88b0 [ConstExpr] Relax expectations in ArrayAppendElement to allow direct-passed element 2024-11-08 14:37:15 -08:00
Meghana Gupta
c0a55e11d4 Merge pull request #77314 from meg-gupta/ossaflag
Remove -enable-ossa-modules for Synchronization and Distributed
2024-11-04 02:40:54 -08:00
Meghana Gupta
d55146c3d5 [NFC] Update embedded test 2024-11-03 06:06:39 -08:00
Allan Shortlidge
e089c5850e Merge pull request #77258 from tshortli/discard-overloads-in-unavailable-extensions-in-constraint-solver
Sema: Correctly treat overloads in unavailable extensions as unavailable
2024-11-02 22:56:47 -07:00
Allan Shortlidge
98b34c6ff6 Sema: Correctly treat overloads in unavailable extensions as unavailable.
Instead of checking for unavailability attributes directly in the solver, which
does not correctly handle members of unavailable extensions, query
`checkDeclarationAvailability()` instead. By using the same underlying logic as
the availability checker the constraint solver can be confident in the accuracy
of this result.

Resolves rdar://87403752.
2024-11-02 17:15:11 -07:00
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
Allan Shortlidge
f4df1a8e52 Merge pull request #77316 from tshortli/unavailable-in-embedded
Sema: Allow calls to @_unavailableInEmbedded functions in compatible contexts
2024-11-01 17:16:22 -07:00
Kuba (Brecka) Mracek
e3dff642fc Merge pull request #77325 from kubamracek/embedded-concurrency-fix-leaks
[Concurrency] Fix memory leak around mismatched refcounting in Embedded Concurrency
2024-11-01 17:14:08 -07:00
Allan Shortlidge
6ac729ea41 Sema: Allow calls to @_unavailableInEmbedded functions in compatible contexts.
Treat `@_unavailableInEmbedded` as if it were `@available(Embedded,
unavailable)` and apply platform compatibility logic in the availability
checker. Revert back to disallowing calls to universally unavailable functions
(`@available(*, unavailable)`) in all contexts.
2024-11-01 13:03:30 -07:00
Allan Shortlidge
0f7406550a Embedded: Add @_unavailableInEmbedded overload ambiguity tests. 2024-11-01 13:03:29 -07:00
Kuba Mracek
db94dc7d36 [Concurrency] Fix memory leak around mismatched refcounting in Concurrency 2024-10-31 21:43:02 -07:00
Allan Shortlidge
2b6f4d075c Embedded: Add -parse-stdlib to attr-unavailable-in-embedded.swift.
Resolves rdar://138975278.
2024-10-31 15:41:34 -07:00
Allan Shortlidge
daf87c06fe Serialization: Serialize the IsForEmbedded bit on @available attributes. 2024-10-30 14:29:45 -07:00
Kuba (Brecka) Mracek
79d8de952f Merge pull request #77240 from kubamracek/embedded-printing-types
[embedded] Make Bool string-interpolatable in Embedded Swift, clarify support in docs
2024-10-26 07:56:36 -07:00
Kuba (Brecka) Mracek
585dccbb17 Merge pull request #75427 from kubamracek/embedded-qemu
[embedded] Add QEMU-based testing configs for ARM and AVR for runtime testing
2024-10-25 22:09:04 -07:00
Kuba Mracek
68e01f2249 [embedded] Make Bool string-interpolatable in Embedded Swift, clarify support in docs 2024-10-25 22:05:58 -07:00
Kuba Mracek
22e3493cdc [embedded] Fix up lit.cfg and embedded/hello.swift's REQUIRES line 2024-10-25 15:13:18 -07:00
Kuba Mracek
8620a99b18 [embedded] Add QEMU-based testing configs for ARM and AVR for runtime testing 2024-10-25 14:52:49 -07:00
Erik Eckstein
b8a91c95aa embedded: make sure to de-serialize vtable/wtable methods before trying to specialize them
Fixes a compiler crash.
rdar://138341211
2024-10-24 10:29:50 +02:00
Kuba Mracek
84b69f0c56 [GenericCloner] Propagate @_optimize(none) when cloning 2024-10-21 16:47:19 -07:00
Kuba Mracek
8666aef39f [embedded] Fix a memory leak caused by incorrect refcounting logic around doNotFreeBit 2024-10-18 23:19:40 -07:00
eeckstein
4d9f8f1544 Merge pull request #77066 from eeckstein/fix-class-existential-diagnostic
embedded: print an error for class existentials where not all protocols of a composition are class bound
2024-10-17 22:01:28 +02:00
Erik Eckstein
a9b2c06f81 embedded: print an error for class existentials where not all protocols of a composition are class bound
We don't support this, yet.
Without the error IRGen would crash.
rdar://137517212
2024-10-17 09:52:22 +02:00
Kuba Mracek
2358cc973d [Concurrency] Split out the default cooperative executor into a separate opt-in library 2024-10-16 22:49:22 -07:00
Kuba (Brecka) Mracek
c31ed73e70 Merge pull request #77026 from kubamracek/embedded-deps-no-asserts
[Concurrency] Add a no_asserts version of the Embedded Concurrency dependency checking
2024-10-16 22:47:56 -07:00
Kuba (Brecka) Mracek
44bea0552a Merge pull request #76029 from kubamracek/embedded-traps-unique
[embedded] Make assert helper functions always inlined to avoid trap basic blocks from merging
2024-10-16 22:46:39 -07:00