Commit Graph

7604 Commits

Author SHA1 Message Date
nate-chandler
033fc2354f Merge pull request #74157 from nate-chandler/rdar128710064
[SILGen] Store_borrow into in_guaranteed.
2024-06-07 06:47:16 -07:00
swift-ci
749cc49ed1 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-06 15:54:11 -07:00
Nate Chandler
c35b86a30d [SILGen] Borrow into in_guaranteed.
Don't create a copy in order to pass a value `@in_guaranteed`.  Just
`store_borrow` the value.

rdar://128710064
2024-06-06 15:45:22 -07:00
Alejandro Alonso
73b0ad3622 Merge pull request #74122 from Azoy/dict-builder-condition
[stdlib] Guard for empty singleton in dictionary builder
2024-06-06 15:36:31 -07:00
Alejandro Alonso
1cda063fe0 Update Dictionary.swift 2024-06-06 11:02:47 -07:00
swift-ci
5963c949e1 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-06 07:35:19 -07:00
Tim Kientzle
6c2b772b86 Merge pull request #74145 from tbkka/tbkka-remotemirror-mpe-fixes
Expand the work from #73491 to support more MPE layouts.
2024-06-06 07:31:20 -07:00
swift-ci
a25693a194 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-05 23:36:22 -07:00
nate-chandler
c961cc1662 Merge pull request #74140 from nate-chandler/gh68128
[Test] Add regression test.
2024-06-05 23:26:32 -07:00
swift-ci
acb84b4fd0 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-05 19:54:38 -07:00
Alex Lorenz
5aa63fc93e Merge pull request #72634 from hyp/eng/android/ndk-overlay
[android] add an Android NDK Swift overlay
2024-06-05 19:35:13 -07:00
Tim Kientzle
eba980af03 Limit this test to macOS 2024-06-05 17:47:30 -07:00
Tim Kientzle
40eb3c084d Expand the work from #73491 to support more MPE layouts. This also switches the
MPE layout code to exclusively use the new code.  The key observation: existing
reflection metadata seems to already provide enough information in all cases, so
we can abandon an earlier effort to add spare bitmask data.

Resolves rdar://129281368
2024-06-05 10:15:58 -07:00
Nate Chandler
666f036b82 [Test] Add regression test.
For https://github.com/apple/swift/issues/68128 .
2024-06-05 07:48:50 -07:00
swift-ci
089207f2d3 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-04 18:35:07 -07:00
nate-chandler
23915e8075 Merge pull request #74109 from nate-chandler/rdar113142446
[ConsumeObjectChecker] End lifetimes at consumes.
2024-06-04 18:17:36 -07:00
Nate Chandler
cae89a9562 [ConsumeObjectChecker] End lifetimes at consumes.
The checker already verifies that no non-destroy consuming users occur
after any `move_value`s corresponding to `consume` operators applied to
a value.  There may, however, be _destroy_ users after it.

Previously, the checker did not shorten the lifetime from those destroys
up to `move_value`s that appear after those `move_value`s.  The result
was that the value's lifetime didn't end at the `consume`.

Here, the checker is fixed to rewrite the lifetimes so that they both
end at `consume`s and also maintain their lexical lifetimes on paths
away from the `consume`s.  This is done by using
`OwnedValueCanonicalization`/`CanonicalizeOSSALifetime`.

Specifically, it passes the `move_value`s that correspond to
source-level `consume`s as the `lexicalLifetimeEnds` to the
canonicalizer.  Typically, the canonicalizer retracts the lexical
lifetime of the value from its destroys.  When these `move_value`s are
specified, however, instead it retracts them from the lifetime boundary
obtained by maximizing the lifetime within its original lifetime while
maintaining the property that the lifetime ends at those `move_value`s.

rdar://113142446
2024-06-03 15:45:32 -07:00
swift-ci
1e98ad9bdf Merge remote-tracking branch 'origin/main' into rebranch 2024-05-31 21:35:10 -07:00
Alex Hoppen
ba773d5c4e Merge pull request #73659 from ahoppen/ahoppen/fix-capture-crash
[CodeCompletion] Don’t compute isolated parameter captures during code completion
2024-05-31 21:26:36 -07:00
Alex Hoppen
22f0daf7d5 [CodeCompletion] Don’t compute isolated parameter captures during code completion
Computing capture information requires a type checked AST, which we don’t have during code completion. To fix an assertion failure, don’t look for a captured `isolated` parameter while computing a closure’s actor isolation during code completion.

rdar://126923558
2024-05-31 17:44:00 -07:00
swift-ci
d23bfc9e6a Merge remote-tracking branch 'origin/main' into rebranch 2024-05-31 15:56:17 -07:00
Dario Rexin
2d0b19484f Merge pull request #74058 from drexin/wip-127535274
[IRGen] Assign layout strings for static layout generic types in meta…
2024-05-31 15:38:00 -07:00
Dario Rexin
8e2b0ec1d6 [IRGen] Assign layout strings for static layout generic types in metadata initialization function
rdar://127535274

The layout string needs to be assigned before completion, to make it available in recursive metadata initialization. Setting it in the completion function causes a race between other metadata initializers using it and the completion function running.
2024-05-31 11:24:01 -07:00
swift-ci
ff256e4a52 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-30 18:35:13 -07:00
Slava Pestov
8a7f0b8e58 Add regression test for fixed crasher 2024-05-30 16:39:49 -04:00
Slava Pestov
23be369c0e SILGen: Update for PackElementExpr captures
Fixes https://github.com/apple/swift/issues/68941.
Fixes https://github.com/apple/swift/issues/69282.
Fixes https://github.com/apple/swift/issues/72153.
Fixes rdar://110711746.
Fixes rdar://119212867.
Fixes rdar://124202697.
2024-05-30 16:39:49 -04:00
Finagolfin
a99b3748fe [android] Update tests to use new Android overlay and disable stdlib/Glibc.swift 2024-05-28 13:01:25 -07:00
swift-ci
e5905defea Merge remote-tracking branch 'origin/main' into rebranch 2024-05-26 10:54:02 -07:00
Michael Ilseman
4f83c093e5 Merge pull request #73714 from karwa/enable-norm-tests
Re-enable StringNormalization validation test
2024-05-26 11:44:43 -06:00
swift-ci
fd95cb8f45 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-26 10:34:14 -07:00
Allan Shortlidge
4bc1abb4be Sema: Relax feature check for non-escapable types in swiftinterfaces.
Checking for the presence of a feature flag in order to allow syntax tends to
result in condfails when applied to `.swiftinterfaces`, since older compilers
that have this restriction may be used to compile newer interfaces where the
restriction has been lifted. Remove this restriction for non-escapable types
when typechecking an interface.

Resolves rdar://128577611
2024-05-24 13:53:50 -07:00
Dario Rexin
de06df9fc6 [Test] Require arm64 in pack_stack_metadata_alloc_loop.sil
rdar://128431285
2024-05-23 16:41:20 -07:00
swift-ci
95de7f626b Merge remote-tracking branch 'origin/main' into rebranch 2024-05-18 04:54:40 -07:00
Slava Pestov
c7c244e16a Merge pull request #73712 from slavapestov/pack-expansion-closures-part-6
Pack expansion closures, part 6
2024-05-18 07:41:44 -04:00
Slava Pestov
4aa0008d74 SILGen: Rewrite captured local archetypes into primary archetypes
This implements support for autoclosures, closures and local functions
nested within a pack iteration for loop.

The combination of explicit closure expressions and pack expansion
expressions still needs some work.

Fixes #66917.
Fixes #69947.
Fixes rdar://113505724.
Fixes rdar://122293832.
Fixes rdar://124329076.
2024-05-17 17:45:05 -04:00
swift-ci
e08a64d130 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-17 13:55:16 -07:00
Karl Wagner
31782df287 Re-enable StringNormalization validation test 2024-05-17 19:32:48 +02:00
Hamish Knight
cbbb1c9eca [CS] Avoid creating placeholder var if skipping for completion
Otherwise we'd crash in CSApply since we'd have no
type recorded for the var.

rdar://127838305
2024-05-17 15:46:40 +01:00
swift-ci
9bc448114e Merge remote-tracking branch 'origin/main' into rebranch 2024-05-16 19:54:35 -07:00
nate-chandler
a570286201 Merge pull request #73647 from nate-chandler/rdar128077404
[PrunedLiveness] Fix boundary check for dead-ends.
2024-05-16 19:45:41 -07:00
swift-ci
60a50df76e Merge remote-tracking branch 'origin/main' into rebranch 2024-05-16 16:35:17 -07:00
Holly Borla
1b3aa8723e Merge pull request #73666 from hborla/implicit-global-actor-sendable
[Concurrency] Implicit global actor attributes imply `Sendable`.
2024-05-16 16:30:36 -07:00
Nate Chandler
9d42d69c0a [PrunedLiveness] Fix boundary check for dead-ends.
Consider dead, dead-end blocks within the availability boundary to be
within the boundary.

rdar://126965232
2024-05-16 15:53:06 -07:00
Holly Borla
1b0dca035e [NFC] Update concurrency validation test. 2024-05-16 10:18:34 -07:00
Nate Chandler
353e4955ee [Test] embedded: Use test lit in validation-test. 2024-05-15 11:52:18 -07:00
swift-ci
99593fa393 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-15 11:14:36 -07:00
Joe Groff
10f9289ef8 Enable 'BorrowingSwitch' feature. 2024-05-14 07:31:59 -07:00
swift-ci
65204e9227 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-10 13:34:02 -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
swift-ci
ac90898851 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-08 16:34:07 -07:00