Erik Eckstein
162139364e
IRGen: support read-only statically initialized arrays in embedded swift
...
Arrays buffers need to be initialized with a (minimal) metatype and with an immortal reference count.
2024-05-21 18:04:10 +02:00
Mike Ash
ae71658c6a
[Runtime] Add weak check to use of _dyld_find_pointer_hash_table_entry.
...
Needed to avoid availability errors in some configurations.
rdar://127621414
2024-05-21 10:59:15 -04:00
Alastair Houghton
ee630d407f
[Build] Don't include Compatiblity50/51 for 64-bit watchOS.
...
We don't support Swift 5.0 or 5.1 on ARM64 watchOS.
rdar://128445543
2024-05-21 14:21:48 +01:00
Mike Ash
7f2d4be642
[Runtime] Use CMake variable to control os_trace_lazy_init usage.
...
SWIFT_BNI_OS_BUILD isn't exactly what we need. Use an option to turn it on/off instead.
rdar://128408295
2024-05-20 17:39:01 -04:00
John McCall
e1a82f622e
Merge pull request #70910 from nickolas-pohilets/mpokhylets/fix-list-merger-performance
...
Fix quadratic performance of the `ListMerger` in specific usage pattern
2024-05-20 17:26:34 -04:00
David Smith
b81aec5c1a
rdar://127199021, fix compatibility with apps that accidentally do [[[aSwiftArray class] new] mutableCopy] to work ( #73728 )
2024-05-20 12:06:05 -07:00
Alastair Houghton
72d801c88e
Merge pull request #73747 from al45tair/eng/PR-128388845
...
[Shims] Fix nullability for musl.
2024-05-20 15:30:02 +01:00
Alastair Houghton
5e24abc970
[Shims] Fix nullability for musl.
...
Apparently I got the merge for this slightly wrong.
rdar://128388845
2024-05-20 12:18:59 +01:00
Alejandro Alonso
3053c81259
Enforce that atomic representations are bitwisecopyable
2024-05-18 10:18:32 -07:00
Michael Gottesman
d759ec97ea
Merge pull request #73696 from gottesmm/rdar128216574
...
[sending] Add support for 'sending'
2024-05-18 05:42:41 -04:00
Mike Ash
011c46eb45
Merge pull request #73650 from mikeash/prespecializations-dyld-hash-table
...
[Runtime] Add pointer-based lookup of prespecialized metadata.
2024-05-17 21:22:57 -04:00
Guillaume Lessard
a27d9c426a
Merge pull request #71912 from oscbyspro/better-joined-distance-from-to-int-min
...
FlattenSequence/distance(from:to:) untrapping Int.min
2024-05-17 16:17:01 -07:00
Augusto Noronha
4417786be4
[RemoteInspection] Hardcode DefaultActorStorage's type info
...
No metadata is emitted for the builtin DefaultActorStorage type. Since
its layout is fixed, hardcode its definition in Remote Mirrors.
rdar://128032250
2024-05-17 14:29:25 -07:00
Mike Ash
96555ba51c
[Runtime] Add pointer-based lookup of prespecialized metadata.
...
The existing lookup uses a hash table with the type's mangled name as the key. Building that key is costly. Add a new table that uses pointer keys, so that we can use the descriptor and arguments directly as the key.
rdar://127621414
2024-05-17 16:17:03 -04:00
Allan Shortlidge
f0551920c5
Merge pull request #73700 from tshortli/borrowing-switch-condfail
...
stdlib: Fix a borrowing switch condfail
2024-05-17 09:16:39 -07:00
Allan Shortlidge
ca70312879
stdlib: Fix a borrowing switch condfail.
...
Resolves rdar://128249510
2024-05-16 23:35:25 -07:00
Allan Shortlidge
5b252da7e2
stdlib: Fix warnings in Duration.swift.
2024-05-16 23:34:44 -07:00
Alex Martini
b57dbae317
Fix typo in docs code example
...
Co-authored-by: Kavon Farvardin <kfarvardin@apple.com >
2024-05-16 16:33:12 -07:00
Alex Martini
97790c03a7
Indent code listings, to match style used elsewhere
2024-05-16 14:35:29 -07:00
Alastair Houghton
a3ce5a9ba2
Merge pull request #73670 from al45tair/eng/PR-128197532
...
[Build] Add compatibility library deps to target executables.
2024-05-16 21:57:21 +01:00
Alex Martini
6fa34bdabf
Add a missing implicit Copyable constraint
...
Co-authored-by: Kavon Farvardin <kfarvardin@apple.com >
Co-authored-by: Slava Pestov <spestov@apple.com >
2024-05-16 13:47:36 -07:00
Michael Gottesman
e3e78ad6bb
[sending] Change the internals of sending to be based around 'sending' instead of 'transferring'.
...
We still only parse transferring... but this sets us up for adding the new
'sending' syntax by first validating that this internal change does not mess up
the current transferring impl since we want both to keep working for now.
rdar://128216574
2024-05-16 12:20:45 -07:00
Alejandro Alonso
db9232f246
Merge pull request #73550 from Azoy/string-debugger-changes
...
[debug] Print strings using their description in the debugger
2024-05-16 11:40:00 -07:00
Mike Ash
857cc388d4
Merge pull request #73639 from mikeash/lazy-signposts
...
[Runtime] Don't emit signposts until the system is ready.
2024-05-16 14:30:39 -04:00
Alastair Houghton
0302944988
[Build] Add compatibility library deps to target executables.
...
We need to make sure that we add the compatibility libraries as
dependencies for target executables, otherwise we can end up with
a race condition in the build where the build will fail if the
compatibility libraries haven't been built by the time e.g.
`swift-backtrace` is linked.
rdar://128197532
2024-05-16 15:46:09 +01:00
Erik Eckstein
15acfbb268
stdlib: improve debug performance of UnsafePointer.pointer(to:)
...
Making those functions transparent enables to completely remove the creation of keypaths, even with -Onone.
rdar://127793797
2024-05-16 10:15:53 +02:00
Erik Eckstein
fb036e9019
stdlib: more efficient pointer overflow checks in the UnsafePointer.pointer(to:) functions
...
Saves the optional nil check for unwrapping the pointer and one condition
2024-05-16 10:15:42 +02:00
Joe Groff
2c6bfa23c8
Merge pull request #72967 from jckarter/enable-borrowing-switch-frontend
...
Enable 'BorrowingSwitch' feature.
2024-05-15 10:57:07 -07:00
Alejandro Alonso
b2f21bbfb3
Update DebuggerSupport.swift
2024-05-15 10:02:35 -07:00
Mike Ash
dd24d8e71f
[Runtime] Don't emit signposts until the system is ready.
...
Emitting a signpost for the first time can trigger lazy setup of the logging system, and doing this in the wrong context can cause deadlocks. Check to see if the logging system is already set up, and only emit signposts if it has been to avoid triggering this.
As it's hard to determine if the "is it set up?" function is available in the SDK we're building against, only do this in OS builds, as it's not particularly useful in local builds.
rdar://124620772
2024-05-15 11:02:23 -04:00
Karoy Lorentey
6e6a5ba1d0
Merge pull request #73400 from lorentey/fix-managedbuffer-abi-mixup
...
[stdlib] ManagedBuffer: Fix misapplied linkage names for legacy entry points
2024-05-14 20:52:17 -07:00
Joe Groff
10f9289ef8
Enable 'BorrowingSwitch' feature.
2024-05-14 07:31:59 -07:00
Kuba (Brecka) Mracek
e7b9fbc6e4
Merge pull request #73599 from kubamracek/embedded-concurrency-install
...
[embedded] Explicitly install the embedded concurrency .a libraries with +x permissions
2024-05-13 21:10:28 -07:00
Kuba Mracek
fba653708e
[embedded] Explicitly install the embedded concurrency .a libraries with +x permissions
2024-05-13 10:27:26 -07:00
Kuba Mracek
e68195b8f2
[embedded] Avoid using UInt64 in int->string code (which triggers allocations on 32-bit systems)
2024-05-12 22:11:40 -07:00
Kuba Mracek
7120279755
[embedded] Avoid using a metatype variable in _allocateUninitializedArray
2024-05-12 22:07:00 -07:00
Tim Kientzle
54a2007903
Merge pull request #73552 from tbkka/tbkka-127839540
...
Make SwiftValue == support unconditional
2024-05-10 22:47:30 -07:00
Tim Kientzle
03ea6a1225
Merge pull request #73491 from tbkka/tbkka-mpe-sparebits
...
Calculate spare bits for multi-payload enums from first principles
2024-05-10 13:15:07 -07:00
Mykola Pokhylets
9ba09ff63d
Process incoming queue when obtaining drainer lock
2024-05-10 11:05:22 +02:00
Mykola Pokhylets
40c38f9803
Using multiple insertion points to ensure all jobs are always inserted in O(1)
...
Fully separated unprocessed jobs and processed jobs
Reverse jobs after updating status to minimise contention
2024-05-10 11:05:22 +02:00
Mykola Pokhylets
21a70e10c7
Fixed quadratic performance of ListMerger when each executed job creates 2+ new jobs of the same priority
...
See https://forums.swift.org/t/quadratic-performance-of-the-listmerger-in-specific-use-case/69393
2024-05-10 11:05:22 +02:00
Alex Lorenz
340bfcddc0
Merge pull request #73534 from hyp/eng/fix-readlink
...
stdlib: fix android build
2024-05-09 20:29:59 -07:00
Tim Kientzle
cb03a459fe
Make SwiftValue == support unconditional
...
PR #71620 made this behavior conditional as a way to help
provide binary compatibility for legacy software that might
be relying on the old behavior.
So far, it appears the only such problems arose from the
SwiftObject behavior changes, not from SwiftValue behavior.
So let's optimistically back this out and make the new behavior
unconditional.
Resolves rdar://127839540
2024-05-09 14:38:36 -07:00
Alejandro Alonso
180a11fdc2
Print strings using their description in the debugger
2024-05-09 14:36:57 -07:00
nate-chandler
387e8d3ff1
Merge pull request #73516 from nate-chandler/rdar127755503
...
[BitwiseCopyable] Avoid a condfail.
2024-05-09 07:00:01 -07:00
Konrad `ktoso` Malawski
b2bd17635f
[Concurrency] Fix too eager early return in checkIsolation mode detecting ( #73495 )
2024-05-09 03:12:37 -07:00
Kuba Mracek
92c20a699b
[embedded] Avoid unsafeBitCast, use Builtin.castFromNativeObject instead, add armv7 test
2024-05-08 21:29:11 -07:00
Alex Lorenz
94b1348183
stdlib: fix android build
...
the readlink addition in f4bf278 was introduced without a corresponding include.
2024-05-08 20:20:51 -07:00
Nate Chandler
2671652085
[BitwiseCopyable] Avoid a condfail.
...
The standard library defines
```
protocol BitwiseCopyable {}
typealias _BitwiseCopyable = BitwiseCopyable
```
For current compilers, `BitwiseCopyable` is a "known protocol".
For older compilers, it is not; instead `_BitwiseCopyable` is. So
print the following into the swiftinterface for those older compilers:
```
protocol _BitwiseCopyable {}
typealias BitwiseCopyable = _BitwiseCopyable
```
rdar://127755503
2024-05-08 16:53:14 -07:00
Nate Chandler
acd9b72833
[BitwiseCopyable] Only deprecate underscored.
...
Rather than immediately outright banning the old protocol, just make it
be a deprecated typealias for the real one.
2024-05-08 16:52:51 -07:00