Commit Graph

140896 Commits

Author SHA1 Message Date
swift-ci
28a464ed18 Merge pull request #60845 from hyp/eng/99313326
[test] update SwiftToCxx unsigned-return-type-no-zext.cpp test to
2022-08-30 01:11:35 -07:00
swift-ci
a66951aa3d Merge pull request #60521 from kavon/preconcurrency-var-access
Add missing function conversion for member access to preconcurrency vardecl.
2022-08-30 00:58:49 -07:00
Pavel Yaskevich
506ccccf74 Merge pull request #60837 from xedin/rdar-99282932
[ConstraintSystem] Teach partial application check about implicit con…
2022-08-30 00:22:27 -07:00
Eric Miotto
f7a11c7543 Tests all cases of infer-cross-compile-hosts-on-darwin at once (#60824)
The current implementation currently requires to have physical machine
for each architecture supported by macOS, which is not desirable.

To allow all cases to be tested on a random Mac machine, allow
to inject an arbitratry current architecture into the inference
of the cross compile hosts by means of an environment variable.

Addresses rdar://99096874
2022-08-30 00:10:40 -07:00
Alex Lorenz
0a6974072e [test] update SwiftToCxx unsigned-return-type-no-zext.cpp test to
work on Amazon Linux

Zeroext is optional
2022-08-29 22:52:57 -07:00
Alex Lorenz
7d71d64aab Merge pull request #60835 from hyp/eng/generic-methods-gogo
[interop][SwiftToCxx] add support for generic methods
2022-08-29 21:59:41 -07:00
Kavon Farvardin
a4d661d3bb Add tests for rdar://98018067 2022-08-29 21:02:03 -07:00
Kavon Farvardin
6c24bc57cb [AST][SILGen] model ABI-safe casts of LValues
We needed a way to describe an ABI-safe cast of an address
representing an LValue to implement `@preconcurrency` and
its injection of casts during accesses of members.

This new AST node, `ABISafeConversionExpr` models what is
essentially an `unchecked_addr_cast` in SIL when accessing
the LVAlue.

As of now I simply implemented it and the verification of
the node for the concurrency needs to ensure that it's not
misused by accident. If it finds use outside of that,
feel free to update the verifier.
2022-08-29 20:58:26 -07:00
Kavon Farvardin
e70fbbc738 [ConstraintSystem] correct the @preconcurrency adjustment of var references
We intended to introduce AST conversions that strip concurrency
attributes off of types associated with `@preconcurrency` decls.
But for VarDecl references, we stripped it too early, leading to
things like a MemberVarDecl that doesn't have `@Sendable` in its
result type, but the VarDecl it refers to does have it.

That caused crashes in SIL where types didn't match up. This patch
fixes things by delaying the stripping until the right point.

resolves rdar://98018067
2022-08-29 20:58:25 -07:00
Xi Ge
095226f411 Merge pull request #60834 from nkcsgexi/98624267
ABI checker: we should also print ABI breakages when diagnostics are serialized
2022-08-29 18:39:39 -07:00
Alex Lorenz
c838945488 Merge pull request #60832 from hyp/eng/generic-requirement-not-yet-not-yet
[interop][SwiftToCxx] do not support generics with requirements for now
2022-08-29 17:04:13 -07:00
Pavel Yaskevich
05648c1f56 Merge pull request #60819 from LucianoPAlmeida/crash-generic-ambiguity
[Sema] Handle non-function type parameters for closure arguments in ambiguity diagnositc
2022-08-29 16:59:52 -07:00
Pavel Yaskevich
842aa60b5b [ConstraintSystem] Teach partial application check about implicit conversions
Implicit conversion used to erase path for contextual type conversions
but it does so no longer, this means that invalid partial application
check needs to know about existence of implicit conversions that are
not reflected in the AST until solution is applied.

Resolves: rdar://99282932
2022-08-29 16:56:16 -07:00
swift-ci
ff0e5a92dd Merge pull request #60829 from atrick/comment-bindmem
[comment] Add a semantics note to SIL BindMemory
2022-08-29 16:05:02 -07:00
Alex Lorenz
a89d4f3ced [interop][SwiftToCxx] add support for generic methods 2022-08-29 14:11:33 -07:00
Xi Ge
9ea86830ff ABI checker: we should also print ABI breakages when diagnostics are serialized
This ensures users can review ABI checker failures from build logs alone.

rdar://98624267
2022-08-29 13:26:17 -07:00
Andrew Trick
c14059e92c [comment] Add a semantics note to SIL BindMemory 2022-08-29 13:20:45 -07:00
Alex Lorenz
c08428cd56 [interop][SwiftToCxx] do not support generics with requirements for now 2022-08-29 12:14:33 -07:00
Pavel Yaskevich
e22fc3e34c Merge pull request #60345 from xedin/type-wrappers
[TypeChecker] Type wrappers (experimental feature)
2022-08-29 12:06:27 -07:00
Michael Gottesman
a21984ea7a Merge pull request #60805 from gottesmm/pr-be37496f2562a6683d2f616f6301d8fbb6884c53
Put @_moveOnly type attribute behind the move only experimental flag.
2022-08-29 11:53:11 -07:00
Alex Lorenz
9fc19fb60c Merge pull request #60827 from hyp/eng/expose-init
[interop][SwiftToCxx] support @_expose attribute on initializers
2022-08-29 11:48:23 -07:00
Alex Lorenz
925ba6f7ab Merge pull request #60051 from WANGJIEKE/fix-value-witness-table-type
Change return type of getEnumTag in value witness table
2022-08-29 11:35:42 -07:00
swift-ci
2c40a850df Merge pull request #60826 from aschwaighofer/fix_test_IRGen_98995607
Add missing REQUIRES: executable_test to the test IRGen/98995607.swift.gyb
swift-DEVELOPMENT-SNAPSHOT-2022-08-29-a
2022-08-29 08:39:51 -07:00
Alex Lorenz
7bf7642d51 [interop][SwiftToCxx] support @_expose attribute on initializers 2022-08-29 07:41:49 -07:00
Arnold Schwaighofer
c528e966e8 Add missing REQUIRES: executable_test to the test IRGen/98995607.swift.gyb
redar://99229421
2022-08-29 06:17:18 -07:00
swift-ci
481a561df0 Merge pull request #60820 from meg-gupta/fixmem2regsbi
Fix SILMem2Reg while marking end_borrow of store_borrow as deinit point
2022-08-28 00:33:56 -07:00
Doug Gregor
98e50258b8 Merge pull request #60814 from DougGregor/build-early-swiftsyntax
[build-script] Support building "early" SwiftSyntax via `--early-swiftsyntax`
2022-08-27 23:01:25 -07:00
Meghana Gupta
e0f8711b23 Fix SILMem2Reg while marking end_borrow of store_borrow as deinit point
Fixes rdar://99229461
2022-08-27 21:01:16 -07:00
Luciano Almeida
109737551e [Sema] Handle non-function type parameters for closure arguments in ambiguity diagnositc 2022-08-27 20:42:19 -03:00
Robert Widmann
150aca3db7 Merge pull request #60811 from CodaFi/initial-d 2022-08-27 11:38:39 -07:00
swift-ci
055df4a9de Merge pull request #60817 from al45tair/eng/PR-99206914
[Build] Add back the reference to the threading library at top level.
2022-08-27 07:26:23 -07:00
Doug Gregor
5ae31c0029 Address Python linting failures 2022-08-27 07:25:32 -07:00
Alastair Houghton
aafb6e21bf [Build] Add back the reference to the threading library at top level.
Without this, BackDeployConcurrency build will fail.

rdar://99206914
2022-08-27 12:58:19 +01:00
Doug Gregor
e771660526 [build-script] Support building "early" SwiftSyntax via --early-swiftsyntax
Similar to the way the early Swift Driver is built, introduce a
build-script option `--early-swiftsyntax` that uses the host Swift and
CMake to build the parts of the swift-syntax package that are expected
to become be used in the compiler.

Note that this does not obviate the need for the `--swiftsyntax`
option, because that build product uses the just-built Swift compiler
and SwiftPM to build, test, and install everything from the
swift-syntax package.
2022-08-27 00:06:09 -07:00
Doug Gregor
fde58da5c2 Merge pull request #60809 from DougGregor/distributed-thunk-default-impls 2022-08-26 21:22:00 -07:00
Robert Widmann
a8b5e14d9d [NFC] Remove An Unused Vector of Protocols 2022-08-26 17:46:58 -07:00
Robert Widmann
09c24ef420 [Gardening] Remove Unused Parse-Time Circularity Diagnostic 2022-08-26 17:46:06 -07:00
Michael Gottesman
f46ed6be13 Put @_moveOnly type attribute behind the move only experimental flag.
Just forgot to do this.
2022-08-26 17:33:02 -07:00
Doug Gregor
641d896a26 [Distributed] Use distributed thunk witnesses for DA protocol extensions.
When a distributed member of an extension of a DistributedActor
protocol is used to satisfy a distributed requirement for the same
protocol, make sure we still use the distributed thunk.

Noticed by inspection.
2022-08-26 16:56:03 -07:00
nate-chandler
cd04e9eb3b Merge pull request #60792 from nate-chandler/canonicalize_ossa_lifetime/access_scope_ends
[CopyProp] Don't extend lifetime over end_access.
2022-08-26 15:59:16 -07:00
Alex Hoppen
b6377ff54a Merge pull request #60765 from ahoppen/pr/rdar98623438
[SourceKit] Workaround a bug that parameterized protocols without 'any' cannot be mangled
2022-08-27 00:36:32 +02:00
Alejandro Alonso
315ee2a167 Fix tuple keypath verifier (#60737) 2022-08-26 15:28:59 -07:00
Artem Chikin
308d33564d Merge pull request #60789 from artemcm/DepScan-ForgetUnderlyingModule
[Dependency Scanning] Do not add underlying Clang moduel to persistent (global) scanner cache
2022-08-26 15:15:56 -07:00
Doug Gregor
0db7246c59 Merge pull request #60799 from DougGregor/generalize-actor-isolation 2022-08-26 13:03:00 -07:00
Joe Groff
18b2225435 Merge pull request #60604 from jckarter/silbuilder-dont-delete-operands-in-peepholes
SIL: Don't eagerly erase instructions in builder peepholes.
2022-08-26 12:27:05 -07:00
Pavel Yaskevich
491defb682 [Sema] TypeWrappers: Mark $_storage as private and all $Storage properties as internal 2022-08-26 12:25:22 -07:00
Pavel Yaskevich
3aa2bb958a [Sema] TypeWrappers: Mark $Storage struct as internal 2022-08-26 12:25:22 -07:00
Pavel Yaskevich
347e85ddc4 [Sema] TypeWrappers: Add unamanged stored properties to the synthesized memberwise init
If a stored property would be in a default memberwise initializer
it would be added to the `init` synthesized for a type wrapped type
as well i.e. a `let` property without a default.
2022-08-26 12:25:22 -07:00
Pavel Yaskevich
5a73b48599 [Sema] CodeSynthesis: Extract logic to synthesize a parameter for memberwise init 2022-08-26 12:25:22 -07:00
Pavel Yaskevich
8c0f6e15cd [TypeWrappers] NFC: Fix type wrapper executable test on Linux 2022-08-26 12:25:22 -07:00