Skip to content

[pull] swiftwasm from main #2924

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 60 commits into from
Apr 3, 2021
Merged

[pull] swiftwasm from main #2924

merged 60 commits into from
Apr 3, 2021

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 2, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

varungandhi-apple and others added 30 commits March 30, 2021 14:58
Fix a bug and enforce the invariant that all bits between the last code unit
and the descriminator in a small string should be unset.
This extension (introduced in swiftlang#35264) was placed in a file location where it wasn’t correctly guarded against mentioning Float16 on macOS/x86_64, so the generated .swiftinterface file included a reference to an unavailable declaration. (The dummy stand-in Float16 type that we currently use on Intel macOS.)

Moving the declaration out of the “AnyHashable” section and into a file region that’s more suitable for it (i.e., enclosed in `#if !((os(macOS) || targetEnvironment(macCatalyst)) && arch(x86_64))`) resolves the issue.

rdar://76025365
This can lead to latent type errors for API users,
because a swiftmodule would otherwise be emitted,
without any diagnostics, containing imported decl
with two global actor annotations on it. Such
decls will always be an error to the typechecker
when its eventually encountered.

This patch drops all `@MainActor` annotations after
the first one in the ClangImporter, regardless of
whether its the safe or unsafe version, and emits
a warning when doing so.
… just constructed, look through ownership insts.

Just an oversight. When used with -enable-ossa-modules, this eliminates the
reported ARC traffic issue in:

SR-12377
rdar://60832825
use-swift-source-info.swift is checking that the .swiftsourceinfo file
is being used when OptimizedForIDE is false by checking the location
output from a cursor info request.

It also checks that the module name is there, which it should be the
result is in a different file. There was previously a bug where it
*wasn't* added when a location was added (which was valid before
.swiftsourceinfo was used). The test has always worked since it was
modified in the fix to that bug, but some weirdness caused the change
and test to be out of sync (possibly the result of merges between main
and next branches).

The new line is the language, which was added after it was disabled (and
hence missed being updated).
…ype() if substituted type is an interface type

IsBindableVisitor is part of TypeBase::substituteBindingsTo(), which
is used for two things:

- Checking if one contextual type is a proper substitution of another
  contextual type, used in the solver

- To compute the substituted generic signature when lowering a SIL
  function type

In the first case, we're interested in knowing if the substitution
succeeds or fails. In the second case, we know the substitution is
correct by construction, and we're trying to recover the generic
requirements.

In the second case though, the substituted type might be an
interface type, and if the interface type is constrained to a
concrete type in the original type's generic signature, we would
conclude that the substitution should fail.

This is incorrect, and we should just skip the check if the
substituted type is an interface type -- we do not have enough
information to know if it succeeds, and instead we must assume it
does because otherwise the substituted type passed in to type
lowering must be incorrect.

Fixes https://bugs.swift.org/browse/SR-13849.
Remove the heuristic that escaping closures cannot be actor-isolated.
This is in line with the long term plan for actor isolation, but opens
up some holes in the short term because Sendable closures are not enforced
throughout the Swift ecosystem.

One significant effect of this change is that we will now, statically,
fail to detect many cases where actor isolation can be broken.
External async functions pointers can't be used to clone the async
context size from.

Future improvement: reinstate the previous optimization of reusing the
context.

rdar://76029017
This allows programs to target older OSes while using Concurrency behind an availability check. When targeting older OSes, the symbols are weak-linked and the compiler will require the use of Concurrency features to be guarded by an availability check.

rdar://75850003
…4ee802388a449799d74c4df

[build-wrangler] Disable broken test.
Fix IRGen and tests to use musttail/swiftasync correctly
…ssor-synthesis

[Property Wrappers] Fix accessor synthesis of wrapped parameters that infer the property wrapper attribute.
IRGen: Fix async throw emission for indirect direct values
…pply_forwarder_fix

IRGen: Create full async functions for partial apply forwarders
[testing] Add missing `REQUIRES: concurrency`
[SourceKit/CursorInfo] Enable passing .swiftsourceinfo test
[Concurrency] Add availability to Concurrency APIs.
swift-ci and others added 4 commits April 2, 2021 00:35
[TypeChecker] NFC: Add an additional test-case for rdar://46713933 wi…
[TypeChecker] NFC: Add a couple of tests for inference with optional/…
[stdlib] Float16/Intel: Add an explicit Sendable conformance to work around a swiftinterface issue
aschwaighofer and others added 23 commits April 2, 2021 06:51
…iagnose

Only diagnose references to globals under -warn-concurrency.
…properties

either as an `async` or `async throws` property, by marking it
with swift_async_name("getter:PROPERTY_NAME()") where `PROPERTY_NAME`
will be the name of the property it will be imported as.

This is in lieu of being imported as an async method. It's still
imported as an `@objc` method as well.
…est1

[CodeCompletion] Migrate some tests to batch completion test #1
…515032beaa42d06dba73389

[build-wrangler] Unblock CI by disabling a test that is waiting on an automerger
…mitGetAsyncContinuation

IRGen: Fix signing of resumeParent in emitGetAsyncContinuation
Fix a bug that pointers to ObjCInterfaces can be invalid when std vector
expended. Now allocate all the interfaces in BumpPtrAllocator so the
pointers to APIs are always valid as long as API class is alive.

rdar://76155450
…est2

[CodeCompletion] Migrate some tests to batch completion test #2
…34a5e051190270946699427

[simplify-instruction] When eliminating extracts from an aggregate we  just constructed, look through ownership insts.
[concurrency] Allow ObjC completion-handler methods to be imported as effectful properties
…il-function-type

AST: Skip requirement checks in IsBindableVisitor::visitBoundGenericType() if substituted type is an interface type
…lation

[Actors] Permit non-sendable, escaping closures to be actor-isolated.
…est3

[CodeCompletion] Migrate some tests to batch completion test #3
…est4

[CodeCompletion] Migrate some tests to batch completion test #4
[stdlib] Fix bug in small string uninitialized init
[swift-api-extract] BumpPtrAllocate API structs
@pull pull bot merged commit fd98026 into swiftwasm Apr 3, 2021
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.