Skip to content

Manually merge main ➡️ rebranch #67754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 57 commits into from
Aug 4, 2023

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Aug 4, 2023

Fixes merge conflict in lib/SILOptimizer/Differentiation/Common.cpp. (Specifically, rebranch commit 8ceae8a from #67516 was conflicting with main commit 03334a8 from #67230. The fix was to change auto to const auto in two places.)

xedin and others added 30 commits July 21, 2023 09:46
If a closure doesn't have a contextual type inferred yet it should
be delayed in favor of already resolved closure conjunction because
"resolving" such a closure early could miss result builder attribute
attached to a parameter the closure is passed to.

Partially resolves swiftlang#67363
Fixes incorrectly reporting an optional type for an expression when the contextual type is optional.

fixes swiftlang#66882
rdar://111462279
…types.

We want these to be borrowed in most cases and to create an appropriate onion
wrapping. Since we are doing this in more cases now, we fix a bunch of cases
where we used to be forced to insert a copy since a coroutine or access would
end too early.
…n-tuple.

This prevents another type of copy of noncopyable value error.

I also as a small change, changed the tuple version to use a formal access
temporary since we are projecting a component out implying that the lifetime of
the temporary must end within the formal access. Otherwise, we cause the
lifetime of the temporary to outlive the access. This can be seen in the change
to read_accessor.swift where we used to extend the lifetime of the destroy_addr
outside of the coroutine access we are performing.
that can be converted to AnyKeyPath later.
…init

Default initialization of stored properties doesn't play a role
in default init synthesis for distributed actors.
… borrowing.

Also, the store_borrow work in the previous patch caused some additional issues
to crop up. I fixed them in this PR and added some tests in the process.
…tors.

In C++20, types that declare or delete their default/copy/move constructors are no longer aggregates, so the aggregate uses of these types will not compile under C++20. Adding them fixes this, without affecting older language modes.
These were never allowed, but with C++20 making more `vector` functions
`constexpr`, they would start causing build failures in that language
mode.
…e info

Querying property wrappers involves semantic analysis that can cause
cyclic references while building the type refinement context, and it's
unnecessary: we need only know that these are custom attributes to
incorporate their source ranges. Switch to the simpler/cheaper query.

A small part of fixing the cyclic references in rdar://112079160.
Eager expansion of type refinement contexts (TRCs) for variables
within pattern binding declarations is causing cyclic references in
some places involving macros. Make this expansion lazy, triggered by
walking into these pattern binding declarations as part of (e.g.)
availability queries.

Another step toward fixing the cyclic references in rdar://112079160.
… lazily

The check for "has property wrappers" as part of determining whether the
layout of a variable is exposed to clients can trigger reference
cycles. Push this check later, which eliminates these cycles for types
that aren't frozen/fixed-layout.

This is a hack, not a real fix, but it eliminates the cyclic
references observed in rdar://112079160.
Add a test case for Observable types that are extended from other
source files. Prior to the recent changes to make
`TypeRefinementContext` more lazy, this would trigger circular
references through the `TypeRefinementContextBuilder`.

Finishes rdar://112079160.
…lder

This state is a holdover from when accessors we stored "alongside"
their variable declarations, rather than contained within them. That's
no longer the case, so we don't need to track this information any
more.
The type refinement context builder had a bunch of logic to try to
model type refinement contexts for the first variable declaration that
shows up within a pattern binding declaration. Instead, model this
more syntactically by creating a type refinement context for the
pattern binding declaration itself. This both addresses a regression
in the handling of `if #available` within a closure that's part of an
initializer, and fixes a bug in the same area where similar code has
explicit availability annotations.
Dynamic subclasses have a NULL type descriptor. Make sure isDefaultActorClass doesn't try to dereference that NULL descriptor.

rdar://112223265
…ontext, before mangling them for printing.

Matching logic in the ASTPrinter. Otherwise we attempt to mangle types with archetypes in them, which cannot be done, and causes the compiler to crash.

Resolves rdar://113039215
Don't suggest `let` or `var` in e.g the sequence
expression of a `for` loop, or after a `return`.
We ought to do a better job of checking whether
we're in expression position before suggesting
these (as opposed to a pattern), but I'm leaving
that as future work for now.
When emitting key-path functions on behalf of a base that's an l-value,
copy the l-value into a temporary only when using lowered addresses.
…ng#67230)

Introduce the notion of "semantic result parameter". Handle differentiation of inouts via semantic result parameter abstraction. Do not consider non-wrt semantic result parameters as semantic results

Fixes swiftlang#67174
…nit-synthesis

[TypeChecker] Make sure that distributed actors always get "default" init
…erence

[ConstraintSystem] Allow inference to bind AnyKeyPath as a KeyPath
…test

[cxx-interop] Add test for mutable `std.optional.pointee`
shahmishal and others added 11 commits August 4, 2023 08:29
Disable test/stdlib/Observation/ObservableAvailabilityCycle.swift
…e-resolving

[CSBindings] Prefer conjunctions over closure variables without bindings
Expand type refinement contexts to encompass attributes
Within one module, SPI decls are always visible. Conceptually we want
the same behavior for `@_private` imports where the client pretends it's
part of the same module.

rdar://81240984
…heckout-scheme-alias

Add stable/20230725 to the rebranch alias
…lvalue

[move-only] Ensure that we properly nest accesses to base values if the base is noncopyable or the accessor result is noncopyable.
…-type-metadata-irgen

IRGen: Emitting metadata for function types containing pack expansion parameters
[Sema] @_private imports brings is all SPI of the imported module
# Conflicts:
#	lib/SILOptimizer/Differentiation/Common.cpp
@beccadax
Copy link
Contributor Author

beccadax commented Aug 4, 2023

@swift-ci smoke test and merge

@beccadax
Copy link
Contributor Author

beccadax commented Aug 4, 2023

@swift-ci smoke test and merge

@beccadax beccadax merged commit ddb833a into swiftlang:rebranch Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.