Saleem Abdulrasool
5f6d2ff723
Merge pull request #79749 from compnerd/submodules
...
WinSDK: add DDE, OLE, LZ32 submodules
2025-03-03 21:00:05 -08:00
Holly Borla
8be41edf6f
[Concurrency] Add a macro for wrapping a function body in a new task.
2025-03-03 20:51:14 -08:00
Henrik G. Olsson
27a29c0baf
[Swiftify][StrictMemorySafety] Test unsafe warnings in wrappers (NFC) ( #79719 )
...
[Swiftify][StrictMemorySafety] Test `unsafe` warnings in wrappers (NFC)
As _SwiftifyImport now emits the `unsafe` keyword to prevent warnings
about unsafe code in the macro expansions, we should make sure that our
tests do not emit any warnings. It turns out that calls to
RawSpan::withUnsafeRawPointer are not recognised as unsafe, so we
sometimes get warnings about using `unsafe` on a safe expression. This
issue is tracked under rdar://145899513.
2025-03-03 17:56:12 -08:00
Meghana Gupta
cf6c4c9422
Merge pull request #79699 from meg-gupta/prboundscheck
...
Add support for bounds check optimization of Span and InlineArray
2025-03-03 14:32:27 -08:00
Konrad `ktoso` Malawski
92ead521b8
[Concurrency] Fix swift-inspect and remote mirror build ( #79715 )
2025-03-04 07:04:42 +09:00
Saleem Abdulrasool
1dffb688d6
WinSDK: add DDE, OLE, LZ32 submodules
...
Further modularise the Windows SDK. This adds 3 new submodules to get
better coverage of the Windows SDK.
2025-03-03 13:44:51 -08:00
Jonathan Grynspan
9489564e07
Just like #76041 , but for ~Escapable instead of ~Copyable.
...
Resolves rdar://145945680.
2025-03-03 14:06:30 -05:00
Guillaume Lessard
7899343f40
Merge pull request #79732 from glessard/integers-are-safe
...
[stdlib] Integers are safe
2025-03-02 16:27:50 -08:00
Guillaume Lessard
fab65890fb
[stdlib] remove now-unnecessary unsafe annotations
2025-03-01 20:29:11 -08:00
Guillaume Lessard
b9dd255e08
[stdlib] converting an address to an integer is safe
2025-03-01 20:28:12 -08:00
Dario Rexin
143d683517
Merge pull request #79594 from drexin/wip-145523626
...
[Runtime] Add ccAttrs to slow path in compatibility overrides
2025-03-01 09:40:02 -08:00
Meghana Gupta
1fd2689985
Remove Span._checkIndex overload
2025-02-28 19:12:03 -08:00
Kuba Mracek
40aea83c6b
[embedded] Allow string-interpolatings in assert, assertionFailure, precondition, preconditionFailure
2025-02-28 18:47:47 -08:00
Kuba (Brecka) Mracek
77fc49c92c
Merge pull request #79581 from kubamracek/embedded-fatalerror-stringinterp
...
[embedded] Allow string-interpolating fatalError in Embedded Swift
2025-02-28 15:39:35 -08:00
nate-chandler
f8b60bb6d2
Merge pull request #79685 from nate-chandler/general-coro/20250227/1
...
[CoroutineAccessors] Use swiftcorocc if available.
2025-02-28 12:06:54 -08:00
Meghana Gupta
4edaaa4dcc
Remove @_transparent from InlineArray.count
...
It is orthogonal to @_semantics. @_transparent annotated functions need to be
inlined early and @_semantics annotated functions need to be inlined late.
Remove @_transparent since it has no effect here.
2025-02-28 09:52:02 -08:00
Meghana Gupta
6908e9b776
Annotate some Span and InlineArray's methods with semantics
2025-02-28 09:52:00 -08:00
Kuba Mracek
01d7e231c3
[embedded] Allow string-interpolating fatalError in Embedded Swift
2025-02-28 08:53:09 -08:00
Saleem Abdulrasool
c4f5831507
Platform: add APINotes for bionic.spawn
...
Add some APINotes for `bionic.spawn` to correct the nullability
annotations. This allows building Foundation with NDK r26b.
2025-02-27 21:09:23 -08:00
Nate Chandler
d1f1b4c86b
[CoroutineAccessors] Use swiftcorocc if available.
...
When it's available, use an open-coded allocator function that returns
an alloca without popping if the allocator is nullptr and otherwise
calls swift_coro_alloc. When it's not available, use the malloc
allocator in the synchronous context.
2025-02-27 18:20:53 -08:00
nate-chandler
30d91d39bf
Merge pull request #79625 from nate-chandler/general-coro/20250212/1
...
[CoroutineAccessors] Use retcon.once variant.
2025-02-27 12:58:49 -08:00
Alastair Houghton
8e87541b93
Merge pull request #79009 from al45tair/eng/PR-121430255
...
[Backtracing] Add JSON backtrace output
2025-02-27 16:35:42 +00:00
Nate Chandler
dd8cbe3e0a
[CoroutineAccessors] Use retcon.once variant.
...
Allocate a coroutine frame in the caller based on the size in the
corresponding "function pointer" and pass it along with an allocator to
the callee.
2025-02-27 07:53:58 -08:00
Konrad `ktoso` Malawski
f55964df26
[Concurrency] Initial steps for startSynchronously for Task ( #79608 )
...
* [Concurrency] Initial steps for startSynchronously for Task
* [Concurrency] Rename to _startSynchronously while in development
* [Concurrency] StartSynchronously special executor to avoid switching
* startSynchronously bring back more info output
* [Concurrency] startSynchronously with more custom executor tests
* add missing ABI additions to test for x86
* [Concurrency] gyb generate _startSynchronously
* [Concurrency] %import dispatch for Linux startSynchronously test
* [Concurrency] Add TaskGroup.startTaskSynchronously funcs
* [Concurrency] DispatchSerialQueue does not exist on linux still
2025-02-27 02:34:33 -08:00
Doug Gregor
89d0277a35
Enable strict memory safety in the Cxx/CxxStdlib modules
2025-02-26 14:28:30 -08:00
Doug Gregor
1efb994375
Enable strict memory safety in the Synchronization module
2025-02-26 14:28:28 -08:00
Doug Gregor
d9b5a4621f
Enable strict memory safety in the Distributed module
2025-02-26 14:28:26 -08:00
Doug Gregor
177d16ced8
Enable strict memory safety in the Concurrency module
2025-02-26 14:28:24 -08:00
Doug Gregor
25485858f9
Enable strict memory safety in the SwiftOnoneSupport module
2025-02-26 14:28:05 -08:00
Doug Gregor
22eecacc35
Adopt unsafe annotations throughout the standard library
2025-02-26 14:28:01 -08:00
Doug Gregor
50d3913086
[SE-0458] Enable strict memory safety in the Swift standard library
2025-02-26 14:27:55 -08:00
Alastair Houghton
6138992dfe
[Backtracing] Fix a couple of Linux specific issues.
...
Linux gives the main thread a name based on the process name, and also
we need to tolerate an extra slash on the `<compiler-generated>` filename
for some reason.
rdar://121430255
2025-02-26 21:31:45 +00:00
Alastair Houghton
b85bf05a82
[Backtracing] Update copyright dates in boilerplate.
...
rdar://121430255
2025-02-26 14:12:21 +00:00
Alastair Houghton
fbab10397d
[Backtracing] Use reserveCapacity to optimize escaping slightly.
...
We know we need at least as much space as the number of UTF-8
characters.
rdar://121430255
2025-02-26 14:12:21 +00:00
Alastair Houghton
583a2f8df4
[Backtracing] Update JSON output slightly after review.
...
Always put `registers` in the thread record, and always use the `threads`
top level key, even if we ask for only the crashed thread. Also add an
`omittedThreads` key.
rdar://121430255
2025-02-26 14:12:21 +00:00
Alastair Houghton
3964879a18
[Test][Backtracing] Added tests for JSON backtrace output.
...
Check that we generate valid JSON crash reports.
rdar://121430255
2025-02-26 14:12:20 +00:00
Alastair Houghton
b4d4a27b85
[Backtracing] Fix JSON output when not giving backtraces for all threads.
...
I'd omitted the key from the dictionary by mistake.
rdar://121430255
2025-02-26 14:12:20 +00:00
Alastair Houghton
bc2722e2cc
[Backtracing] Add platform and architecture to JSON output.
...
The JSON output should include platform and architecture data.
rdar://121430255
2025-02-26 14:12:20 +00:00
Alastair Houghton
75204522df
[Backtracing] Fix memory capture output.
...
A couple of commas were in the wrong place.
2025-02-26 14:12:20 +00:00
Alastair Houghton
b5461aeb22
[Backtracing] Added JSON crash log option.
...
Also made it so the `sanitize` option causes the crash logs to not
include memory dumps.
Fixes #71057
rdar://121430255
2025-02-26 14:12:17 +00:00
Ben Rimmington
4bb3cf1496
[stdlib] Update WordPair: Comparable conformance ( #79606 )
2025-02-25 10:17:05 -08:00
Alastair Houghton
4c0e141ccc
Merge pull request #79390 from al45tair/eng/PR-144497613
...
[Backtracing] Add warning suppression option, enable it for tests.
2025-02-25 17:51:28 +00:00
Dario Rexin
ec995e500f
[Runtime] Add ccAttrs to slow path in compatibility overrides
...
rdar://145523626
This was accidentally dropped when introducing the slow path, which causes CC mismatches for functions
using custom CC.
2025-02-24 17:31:27 -08:00
Anthony Latsis
e0cf5a50b6
Merge pull request #77639 from honghoker/fix/typo
...
Fix missing whitespace in Swift special comments
2025-02-24 22:08:34 +00:00
Alastair Houghton
0bc76dae80
[Backtracing] Add warning suppression option, enable it for tests.
...
The backtracing code will warn you if you attempt to forcibly enable
backtracing for a privileged executable. This is apparently upsetting
the Driver/filelists.swift test.
Since we want to force it on for tests, so that we will definitely get
backtraces, add an option to suppress warning messages, and turn that
on for tests as well.
rdar://144497613
2025-02-24 12:55:16 +00:00
Konrad `ktoso` Malawski
09003d6f11
Revert "Merge pull request #77609 from ktoso/wip-task-names" ( #79562 )
...
This reverts commit 4ab5d2604f .
2025-02-23 22:59:21 -08:00
Saleem Abdulrasool
53b34604d0
Merge pull request #79553 from compnerd/pretty-special
...
runtime: adjust the program name reference
2025-02-23 20:23:07 -08:00
Allan Shortlidge
972bc1898b
swift-backtrace: Fix a timespec initialization warning.
...
NFC.
2025-02-22 12:09:23 -08:00
Allan Shortlidge
73b301d369
Concurrency: Fix variable was never mutated warnings and indentation.
...
NFC.
2025-02-22 12:09:23 -08:00
Saleem Abdulrasool
10c804b0bb
runtime: adjust the program name reference
...
`__progname` is not available on Windows, and is provided by libbsd on
Linux. This provides a replacement for the functional aspect of the
symbol on Windows.
2025-02-22 07:14:26 -08:00