Commit Graph

21492 Commits

Author SHA1 Message Date
Pavel Yaskevich
7484f01f8e Merge pull request #79504 from xedin/execution-caller-mangling
[Mangling] Mangle presence of `@execution(caller)` in a function type
2025-02-20 14:01:26 -08:00
honghoker
7e30a91e47 fix: add missing whitespace in MARK comment 2025-02-20 21:57:08 +09:00
Konrad `ktoso` Malawski
e8668684a1 Merge pull request #79411 from amartini51/typo_144059094
Remove double word ("a a" and "the the")
2025-02-20 13:05:06 +09:00
Kuba (Brecka) Mracek
7e4398079b Merge pull request #79451 from kubamracek/shims-include-target-h
[SwiftShims] Include Target.h in the modulemap for SwiftShims
2025-02-19 18:11:51 -08:00
Pavel Yaskevich
1067ead82c [Mangling] Mangle presence of @execution(caller) in a function type
If `@execution(caller)` attribute is present on a function type,
mark its presence in the mangling with `YC` suffix.
2025-02-19 16:48:41 -08:00
Mike Ash
f9bdb45583 Merge pull request #79303 from mikeash/fix-overrides-warning
[Compatibility50] Silence warning about taking the address of objc_setHook_getClass.
2025-02-19 16:19:47 -05:00
Mike Ash
44ff7e59c6 Merge pull request #78817 from mikeash/fix-supersleep
[Concurrency] Fix Task.sleep on values greater than Int64.max.
2025-02-18 21:07:05 -05:00
Kuba Mracek
54a0be3509 [SwiftShims] Include Target.h in the modulemap for SwiftShims 2025-02-17 17:13:14 -08:00
Alejandro Alonso
ff58dc6739 Use other feature syntax 2025-02-17 14:50:42 -08:00
Alejandro Alonso
7480668c7b Add feature for Builtin.emplace typed throws 2025-02-17 12:45:05 -08:00
Allan Shortlidge
eb75c0cd23 CMake: Bring back -enable-experimental-feature Span.
Reenable it temporarily (until after 6.2 is released) for compatibility with
older compilers.
2025-02-16 07:15:44 -08:00
Allan Shortlidge
a0ac6c74e3 Tests: Stop referring to the Span feature since it has been removed. 2025-02-15 17:23:14 -08:00
Gábor Horváth
788d0f9f64 Merge pull request #79396 from swiftlang/gaborh/fix-lifetime-errors-in-macros
[cxx-interop] Work around lifetime errors in SwiftifyImport generated code
2025-02-15 15:29:12 +00:00
Konrad `ktoso` Malawski
d8f89bd948 [Distributed] improved return type metadata test and dont allow partial metadata 2025-02-15 18:15:10 +09:00
Konrad `ktoso` Malawski
62155f380d [Distributed] Improve getting return type metadata for distributed invocations
rdar://141313340
2025-02-15 11:27:06 +09:00
Alex Martini
06bdfa96b2 Remove double word 2025-02-14 17:23:50 -08:00
Alex Martini
3c21c626be Remove redundant 'error' from type name 2025-02-14 17:07:52 -08:00
Alastair Houghton
72230dae53 Merge pull request #79394 from al45tair/eng/PR-144497804
[Backtracing] Fix bug in Compact Image Map decoder.
2025-02-14 20:04:54 +00:00
Alastair Houghton
f0050df4c9 Merge pull request #79007 from al45tair/eng/PR-136977833
[Backtracing] Support redirection to a named file.
2025-02-14 16:59:29 +00:00
Gabor Horvath
df27b79579 [cxx-interop] Work around lifetime errors in SwiftifyImport generated code
Unfortunately, this was not discovered earlier as swift-ide-test is not
invoking the SIL passes that produce this diagnostic. When creating
Swift spans from C++ spans we have no lifetime dependency information to
propagate as C++ spans are modeled as escapable types. Hence, this PR
introduces a helper function to bypass the lifetime checks triggered by
this discepancy. Hopefully, the new utility will go away as the lifetime
analysis matures on the Swift side and we get standardized way to deal
with unsafe lifetimes.
2025-02-14 16:40:43 +00:00
Alastair Houghton
864f3dc023 [Backtracing] Fix bug in Compact Image Map decoder.
The `expand` opcode was being decoded incorrectly in the case where we
were trying to expand prefixes with codes of 64 or above.

rdar://144497804
2025-02-14 14:59:20 +00:00
Doug Gregor
2989770cd6 Merge pull request #79352 from DougGregor/strict-sendable-metatypes
Add StrictSendableMetatypes to require Sendable requirements on metatypes
2025-02-14 03:40:36 -08:00
Yuta Saito
5c1a02adfd Merge pull request #79349 from kateinoigakukun/pr-b59229c8b7f3a006cea85209a02c5246f2e75701
[wasm] Use `__visibility__("default")` for all wasm platforms
2025-02-14 16:05:09 +09:00
Doug Gregor
e24598bca1 Use a marker protocol SendableMetatype to model T.Type: Sendable
Introduce a marker protocol SendableMetatype that is used to indicate
when the metatype of a type will conform to Sendable. Specifically,
`T: SendableMetatype` implies `T.Type: Sendable`. When strict
metatype sendability is enabled, metatypes are only sendable when `T:
SendableMetatype`.

All nominal types implicitly conform to `SendableMetatype`, as do the
various builtin types, function types, etc. The `Sendable` marker
protocol now inherits from `SendableMetatype`, so that `T: Sendable`
implies `T.Type: Sendable`.

Thank you Slava for the excellent idea!
2025-02-13 22:48:05 -08:00
Allan Shortlidge
6e3eb96d91 Concurrency: Fix an unused variable warning. 2025-02-13 07:40:53 -08:00
Philipp Gabriel
773561cc27 Expose attosecond representation of Duration (#78202)
* Add Int128 to Duration

* Update stdlib/public/core/Duration.swift

Co-authored-by: Stephen Canon <stephentyrone@gmail.com>

* Add unit tests for duration + attoseconds

* Add docs to duration + attosecond

* Update docs for attoseconds property

* Update stdlib.swift

* Update stdlib.swift

---------

Co-authored-by: Stephen Canon <stephentyrone@gmail.com>
2025-02-13 09:31:02 -05:00
Yuta Saito
35c3d7fd0e [wasm] Use __visibility__("default") for all wasm platforms
The condition previously depended on the specific OS, but the image
boundary is the same for all platforms using Wasm as image format. This
fixes the Emscripten build.
2025-02-13 02:07:36 +00:00
Hamish Knight
d6e6d2625b Merge pull request #79320 from hamishknight/excode
[build-script] Remove Xcode generation support
2025-02-12 20:17:13 +00:00
Guillaume Lessard
c7af9a701b Merge pull request #79294 from Azoy/bye-bye-slab
[stdlib] Rename Slab to InlineArray
2025-02-12 12:03:25 -08:00
Hamish Knight
d260bd8ddb [build-script] Remove Xcode generation support
This was quite brittle and has now been superseded
by swift-xcodegen. Remove the CMake/build-script
logic for it, leaving the option behind to inform
users to switch to using xcodegen instead.
2025-02-12 12:19:21 +00:00
Erik Eckstein
6407f9a0bd remove the allocVector builtin
It's not needed anymore, because the "FixedArray" experimental feature is replaced by inline-arrays.
2025-02-12 10:51:14 +01:00
Mike Ash
e4e2b23a71 [Compatibility50] Silence warning about taking the address of objc_setHook_getClass.
Add a & so the compiler doesn't think it always evaluates to true.

rdar://144465537
2025-02-11 17:11:12 -05:00
Guillaume Lessard
6b90664f54 [concurrency] fix availabilities some more
Extensions cannot be more available than their type for swiftinterface files.
2025-02-11 13:14:49 -08:00
Alejandro Alonso
e4fb1f6761 Rename Slab to InlineArray 2025-02-11 10:26:44 -08:00
Rashmi Mudduluru
f60394db46 [SUA][Runtime] Define swift_coroFrameAlloc function that allocates typed memory (#79200)
[SUA][Runtime] Define `swift_coroFrameAlloc` function that allocates typed memory

Define `swift_coroFrameAlloc` that allocates typed memory if SWIFT_STDLIB_HAS_MALLOC_TYPE is defined.
This function will be used by IRGen to emit typed memory allocations for property accessors.

rdar://141235539
2025-02-11 09:57:08 -08:00
Saleem Abdulrasool
a86743e77e Merge pull request #79278 from compnerd/modular 2025-02-11 05:48:29 -08:00
Guillaume Lessard
e10e476fe4 [concurrency] fix availabilities
These two functions are called from a context that has SwiftStdlib 6.2 availability. Theyshould have that same availability.
2025-02-10 19:14:25 -08:00
Konrad `ktoso` Malawski
edc81e8901 Merge pull request #78625 from ktoso/wip-taskpriority-escalate-api
[Concurrency] Task priority escalation APIs
2025-02-11 09:08:05 +09:00
Saleem Abdulrasool
79d2af759b ClangImporter: support modularizing __msvc_string_view.hpp
This header was introduced in a recent STL release. Modularise the
header properly, adding a shim for compatibility with older releases.

Partially based on a change from @egorzhdan.
2025-02-10 12:48:35 -08:00
Konrad `ktoso` Malawski
26c521d317 [Concurrency] Add new APIs to ABI check & add more tests 2025-02-10 17:55:42 +09:00
Konrad `ktoso` Malawski
29d95cef85 [Concurrency] Fix ptrauth value for __ptrauth_swift_escalation_notification_function
Previously these records were not used at all, so changing this has no
impact on existing runtimes. Note that we changedd the FunctionType
because the previous one was slightly incorrect -- the context comes
LAST in the type, not first.
2025-02-08 17:18:59 +09:00
Konrad `ktoso` Malawski
67e6373c23 [Concurrency] minor renames of new API for adding escalation handlers 2025-02-08 17:18:58 +09:00
Konrad `ktoso` Malawski
655bd67f67 [Concurrency] Task priority escalation handler API 2025-02-08 17:18:58 +09:00
Konrad `ktoso` Malawski
18c25845d6 [Concurrency] Task.escalatePriority 2025-02-08 17:18:57 +09:00
Saleem Abdulrasool
db160d5e81 runtime: tweak the environment handling
We would previously enable "environment variables" on Android via global
properties. Re-order the macros a bit to make it more explicit that the
environment handling is required for that and remove it when environment
variables are unsupported.
2025-02-07 09:26:49 -08:00
Alastair Houghton
c35d65efca Merge pull request #79155 from weissi/jw-bt-leak
fix ELF/DWARF leak
2025-02-07 09:18:06 +00:00
Alejandro Alonso
57234f8034 Merge pull request #70451 from Azoy/read-keypath-optimization
[stdlib] Performance improvements for reading keypaths
2025-02-05 22:57:29 -08:00
Alejandro Alonso
f38e84cfe1 Pass buffer to _projectReadOnly and fix appends 2025-02-05 14:33:30 -08:00
Johannes Weiss
e533b8a7ff fix ELF/DWARF leak 2025-02-05 14:27:18 +00:00
Konrad `ktoso` Malawski
76f3729644 The SWIFT_DUMP_ACCESSIBLE_FUNCTIONS flag must be a bool, not a string 2025-02-05 10:30:53 +09:00