1627 Commits

Author SHA1 Message Date
Ben Barham
746517c9f2 Merge remote-tracking branch 'origin/main' into manually-merge-main-to-rebranch
Conflicts:
  - `test/IRGen/has_symbol.swift` test updates in rebranch. The new test
    will fail, will fix in the next commit.
2024-10-24 14:20:17 -07:00
Joe Groff
8242110bbe Merge pull request #76831 from jckarter/builtin-vector
Builtin.FixedArray
2024-10-23 05:20:21 -10:00
Joe Groff
a184782a38 Introduce a Builtin.FixedArray type.
`Builtin.FixedArray<let N: Int, T: ~Copyable & ~Escapable>` has the layout of `N` elements of type `T` laid out
sequentially in memory (with the tail padding of every element occupied by the array). This provides a primitive
on which the standard library `Vector` type can be built.
2024-10-22 16:21:45 -07:00
swift-ci
51e2b62f85 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-16 15:28:54 -07:00
Meghana Gupta
3b358c5d57 Merge pull request #77016 from meg-gupta/cachelifetimedep
Cache absence of lifetime dependencies during deserialization
2024-10-16 15:22:06 -07:00
Meghana Gupta
f3a6d44fa7 Cache absence of lifetime dependencies during deserialization
Fixes rdar://136769990
2024-10-15 00:26:28 -07:00
swift-ci
8a2edbc4c5 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-11 17:05:06 -07:00
Nate Chandler
df1c4f6b25 [CoroutineAccessors] Add new SILFnTy CoroKind.
For `modify` and `read` coroutines, produce SILFunctionType's whose
coroutineKind is ::YieldOnce2.
2024-10-11 08:25:02 -07:00
swift-ci
43530d6fb5 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-08 23:54:07 -07:00
Akira Hatanaka
9c44b79189 [SILGen] Fix the type of closure thunks that are passed const reference structs (#76903)
The thunk's parameter needs the @in_guaranteed convention if it's a
const reference parameter. However, that convention wasn't being used
because clang importer was removing the const reference from the
type and SILGen was computing the type of the parameter based on the
type without const reference.

This commit fixes the bug by passing the clang function type to
SILDeclRef so that it can be used to compute the correct thunk type.

This fixes a crash when a closure is passed to a C function taking a
pointer to a function that has a const reference struct parameter.

This recommits e074426 with fixes to
serialization/deserialization of function types. The fixes prevent clang
types of functions from being dropped during serialization.

rdar://131321096
2024-10-08 23:44:49 -07:00
swift-ci
e5f97d79c5 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-30 07:15:01 -07:00
Nate Chandler
091368ba21 [CoroutineAccessors] Added read.
The name is a placeholder for the mutating single-yield coroutine
accessor.
2024-09-26 18:10:39 -07:00
Nate Chandler
98a2e6a7df [CoroutineAccessors] Added modify.
The name is a placeholder for the mutating single-yield coroutine
accessor.
2024-09-26 18:10:39 -07:00
swift-ci
da55e84c74 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-05 15:35:33 -07:00
Alejandro Alonso
46a4d56c2b Bring back the isOpaqueType parameter for deserialization 2024-09-04 15:13:49 -07:00
Alejandro Alonso
15db739055 Serialize IntegerType
Use BCBlob
2024-09-04 15:13:47 -07:00
Alejandro Alonso
19fc174f30 Don't create fake GTPDs for SIL generic signatures 2024-09-04 15:13:47 -07:00
Alejandro Alonso
e0f2b812e8 Add serialization and parser tests for SIL 2024-09-04 15:13:47 -07:00
Slava Pestov
b9b6bb7b69 AST: Introduce new kind of sugared GenericTypeParamType
This one just stores an identifier instead of a declaration.
2024-09-04 15:13:46 -07:00
Alejandro Alonso
f4f60f4344 Remove Value requirement Add GenericTypeParamKind 2024-09-04 15:13:43 -07:00
Alejandro Alonso
75c2cbf593 Implement value generics
Some requirement machine work

Rename requirement to Value

Rename more things to Value

Fix integer checking for requirement

some docs and parser changes

Minor fixes
2024-09-04 15:13:25 -07:00
swift-ci
50d4698d95 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-03 20:36:09 -07:00
Slava Pestov
e3ff6f0697 AST: Fiddle with GenericEnvironment::forOpenedExistential() again 2024-09-03 17:31:26 -04:00
swift-ci
1450e0889d Merge remote-tracking branch 'origin/main' into rebranch 2024-08-20 19:16:30 -07:00
Slava Pestov
5577f27661 AST: Opened existential environments store outer substitutions 2024-08-20 16:54:51 -04:00
swift-ci
52ded95b06 Merge remote-tracking branch 'origin/main' into rebranch 2024-07-30 10:34:02 -07:00
Alexis Laferrière
b93d9b6836 Merge pull request #75547 from xymus/deser-recover
Serialization: Bubble up more errors from readParameterList
2024-07-30 10:20:57 -07:00
Alexis Laferrière
1311a8097d Serialization: Bubble up errors under readParameterList
rdar://131002388
2024-07-29 15:49:34 -07:00
swift-ci
ee5c37e742 Merge remote-tracking branch 'origin/main' into rebranch 2024-07-28 22:14:29 -07:00
Alejandro Alonso
dd37c1daa7 Update Deserialization.cpp 2024-07-28 12:52:25 -07:00
swift-ci
a32c1896dc Merge remote-tracking branch 'origin/main' into rebranch 2024-07-10 23:09:47 -07:00
Meghana Gupta
154989463b Add support for lifetime dependence in parameter position 2024-07-10 14:20:03 -07:00
Ben Barham
b7954411ec Merge remote-tracking branch 'origin/main' into manually-merge-main-to-rebranch
Conflicts:
  - `include/swift/AST/PluginRegistry.h`
2024-06-27 14:56:11 -07:00
Akira Hatanaka
42bc49d3fe Add a new parameter convention @in_cxx for non-trivial C++ classes that are passed indirectly and destructed by the caller (#73019)
This corresponds to the parameter-passing convention of the Itanium C++
ABI, in which the argument is passed indirectly and possibly modified,
but not destroyed, by the callee.

@in_cxx is handled the same way as @in in callers and @in_guaranteed in
callees. OwnershipModelEliminator emits the call to destroy_addr that is
needed to destroy the argument in the caller.

rdar://122707697
2024-06-27 09:44:04 -07:00
swift-ci
ee72f594fb Merge remote-tracking branch 'origin/main' into rebranch 2024-06-25 08:55:18 -07:00
Alex Lorenz
0c7621d282 Merge pull request #74541 from hyp/eng/lookup-imported-member-operator-cxx
[cxx-interop][serialization] resolve x-refs to instantiated/synthesiz…
2024-06-25 08:45:02 -07:00
Xi Ge
736ccef626 Merge remote-tracking branch 'apple/main' into rebranch 2024-06-20 15:16:55 -07:00
Alex Lorenz
983fb8025a [cxx-interop][serialization] resolve x-refs to instantiated/synthesized C++ iterator conformance operators
These x-refs might not be resolvable using regular lookup from the 'std' module as they could be instantiated/synthesized
by the clang importer. Augment the lookup logic in that case to try clang importer lookup logic that is used during
the conformance to the C++ iterator protocol.
2024-06-20 14:51:34 -07:00
Tim Kientzle
1098054291 Merge branch 'main' into tbkka-assertions2 2024-06-18 17:52:00 -07:00
swift-ci
37bf57ef27 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-11 15:53:47 -07:00
Meghana Gupta
f1a887515b Merge pull request #74195 from meg-gupta/immortal
Add dependsOn(immortal)
2024-06-11 15:51:34 -07:00
Meghana Gupta
c14559173d Add dependsOn(immortal) 2024-06-11 11:18:10 -07:00
swift-ci
d4b69a39b8 Merge remote-tracking branch 'origin/main' into rebranch 2024-06-06 12:55:05 -07:00
Alexis Laferrière
10a1dccc45 Merge pull request #74159 from xymus/recover-readPattern
Serialization: Recover from deserialization failures under readPattern
2024-06-06 12:46:00 -07:00
swift-ci
be87ad7bcb Merge remote-tracking branch 'origin/main' into rebranch 2024-06-06 10:35:38 -07:00
Tim Kientzle
1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Alexis Laferrière
cde298198c Serialization: Recover from deserialization failures under readPattern
rdar://129310602
2024-06-05 16:55:35 -07:00
Meghana Gupta
470fa2f365 Remove resultDependsOn/resultDependsOnSelf 2024-06-05 11:36:16 -07:00
swift-ci
2aff268350 Merge remote-tracking branch 'origin/main' into rebranch 2024-05-30 20:34:28 -07:00
Alejandro Alonso
324cb2df1f Merge pull request #73955 from Azoy/show-me-those-moves
[IRGen] Add option for raw layout to move as its like type
2024-05-30 20:32:49 -07:00