Skip to content

Merge main 2022-06-18 #4653

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 171 commits into from
Jun 19, 2022
Merged

Merge main 2022-06-18 #4653

merged 171 commits into from
Jun 19, 2022

Conversation

kateinoigakukun
Copy link
Member

No description provided.

kateinoigakukun and others added 30 commits October 26, 2020 19:56
Toolchain installers distributed on https://swift.org/download creates a
symbolic link of the toolchain as `swift-latest.xctoolchain`, but postinstall
script in this repo creates as `swift-latest`.
This patch syncs the difference of symlink name.
3-spaces formatting is inconsistently used for some keys instead of 4 spaces. This change makes the formatting consistent in `update-checkout-config.json`.
The CI currently uses Xcode 13.0 beta 4. It is very likely that if the build starts failing with Xcode 12.x, this will go unnoticed. Let's warn the users to upgrade to a newer version of Xcode.
PR swiftlang#41550 changed from using `SmallVector::set_size` to `resize_for_overwrite` and `truncate`, but in `sourcekitd-repl` changing from `reserve` changed the size just prior to getting the `end()` of the output array, leading to retrieving the end of the resized array, rather than the array prior to resizing.

The conversion needs to begin at the original output's end, rather than the resized-to-reserve output size, otherwise the conversion triggers the asserts at lines 101 and 116 (with `res == targetExhausted`).
The IBAction signature does not allow completion handlers, so making
IBAction methods async doesn't make sense. Disallowing it statically so
it doesn't just break people when they try.
This patch merges the two diagnostics complaining about asynchronous
function declarations with incompatible attributes. The two are cdecl
and ibaction at the moment.
The fix indentifies the conflicting variables and the expected
"join" type e.g. `case .a(let x), .b(let x)` where `a(Int)` and
`b(String)`.
Diagnose situations where pattern variables with the same name
have conflicting types:

```swift
enum E {
case a(Int)
case b(String)
}

func test(e: E) {
  switch e {
  case .a(let x), .b(let x): ...
  }
}
```

In this example `x` is bound to `Int` and `String` at the same
time which is incorrect.
… statements

Avoid mutating case label items while solving, instead let's use types
recorded in the constraint system for each pattern variable and use
that for var reference in the case body. This also helps to detect
and diagnose type conflicts while solving.
This adds a note with a possible way to fix the issue, recommending
removing the `async` effect and wrapping the body of the function in a
task.
This patch teaches the compiler to emit a fix-it to automatically wrap
everything in the function in a Task and remove the effects from the
function declaration.
See swiftlang#59144 for more on why this is a bad idea.

Patch out the synthesized file unit accessor to only clear the source cache, then patch up all the places that were assuming they could iterate over the module's file list and see synthesized files.

rdar://94164512
Make frontend flag `-enable-experimental-string-processing` default to true.
[cxx-interop] Disable SIL tests failing on aarch64
Fix assert always triggering in `sourcekitd-repl`
hyp and others added 26 commits June 16, 2022 14:14
[ASTContext] Fix unordered member initialization warning (NFC)
Ensure the last node after all of the destructuring really
is a dependent generic param type. If it isn't, something has
gone horribly wrong.
This seems to have been a thinko that got copied-and-pasted around this file.
…wiftlang#59513)

When a distributed-actor-isolated witness is provided for a
non-distributed-actor-isolated requirement, always hop to the
distributed thunk.

While here, mark distributed thunks as being `final`, to ensure that
we always statically call them vs. trying to retrieve them from the
vtable (since they aren't in the vtable).
[Gardening] Remove a Copy-Pasted Header
Switch From Bitwise to Logical And
…eavus/underscored-protocols

Revert "consider requirements of an underscored protocol to also be underscored"
…tArgument

When ClangImporter::Implementation::inferDefaultArgument processes
func/method arguments as part of omitNeedlessWordsInFunctionName it
processes information about how the typenames for the parameters related
to the parameter names to form a parameter names list. The parameter
names list is used to determine if the argument label for a function
should be clipped based on the typename. So for example a type like
NSOrderedCollectionDifferenceCalculationOptions would cause a label
ending with "Options" to get clipped so that for instance "withOptions"
becomes simply "with".

Unfortunately in the context of C++-Interop, the typename for the
parameter often resolves to what the type backing the typedef or enum is
and not the actual name of the typedef
(so `typedef NSUInteger NSOrderedCollectionDifferenceCalculationOptions`
 resolves to a name of NSUInteger rather than
 NSOrderedCollectionDifferenceCalculationOptions).

This patch seeks to collect a bit more information when processing
NS_OPTIONS typedefs and providing that to the calling
omitNeedlessWordsInFunctionName to handle more inteligently.

In practice this fixes anywhere in Foundatio where

`withOptions: NSOrderedCollectionDifferenceCalculationOptions` is used.
[interop][SwiftToCxx] Add support for emitting resilient struct bindings
…e-fixup

[c++-interop] Providing information about enum types from inferDefaultArgument
The layout of constant static arrays differs from non-constant static arrays.
Therefore use a different mangling to get symbol mismatches if for some reason two modules don't agree on which version a static array is.
Expands to, e.g. `x86_64-apple-macosx99.99`
This is useful to test features which are available in a "future" runtime.
* `__swiftImmortalRefCount`: The bit pattern of the ref-count field of immortal objects
* `__swiftStaticArrayMetadata`: The metadata used for static arrays.
So far, static arrays had to be put into a writable section, because the isa pointer and the (immortal) ref count field were initialized dynamically at the first use of such an array.

But with a new runtime library, which exports the symbols for the (immortal) ref count field and the isa pointer, it's possible to put the whole array into a read-only section. I.e. make it a constant global.

rdar://94185998
…rays

IRGen: generate static arrays in read-only data sections.
…06-18

Conflicts:
	utils/darwin-installer-scripts/postinstall
	utils/update_checkout/update-checkout-config.json
@kateinoigakukun
Copy link
Member Author

Builds will be repaired after swiftlang/swift-experimental-string-processing#500

@kateinoigakukun kateinoigakukun merged commit 417c643 into swiftwasm Jun 19, 2022
@kateinoigakukun kateinoigakukun deleted the katei/merge-main-2022-06-18 branch June 19, 2022 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.