Skip to content

[pull] swiftwasm from main #4931

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 40 commits into from
Sep 22, 2022
Merged

[pull] swiftwasm from main #4931

merged 40 commits into from
Sep 22, 2022

Conversation

pull[bot]
Copy link

@pull pull bot commented Sep 22, 2022

See Commits and Changes for more details.


Created by pull[bot]

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

AnthonyLatsis and others added 30 commits September 6, 2022 15:08
to be modified in the atomic - it is set once and never changed again
to create extra threads to process jobs, actors should really behave
like locks.
…n protocols

Originally protocols prefixed with 'some' keyword are considered an opaue return
type representation. In order to understand plain protocols, the GenericParamList
Request must understand how to build a generic parameter list using alternative
type representations: identifier and composition.
We want to make sure not to cause a circular reference
by fetching the full generic parameter list when we are
creating opaque paramters and result types.
Now that GenericParamListRequest and OpaqueResultTypeRequest know
to check for IdentTypeReprs when scanning for opaque parameters,
the requests need to know it should only create Generic Paramters
and Opaque Type Decls for IdentTypeReprs that are protocols.
We should add a function to the swift namespace to check.
Type contraints need to be passed when creating
generic parameters from identifier types.
This is just more work to get type resolution to understand
how to derive an opaque type from an IdentTypeRepr during
OpaqueResultTypeRequest
… the C++ class that represents the Swift type

This allows you to import a method that returns the type of the context in which the method is declared when such
type is a generic parameter in another type. This means that it's now possible to bridge the initializer for
RawRepresentable enums.
Previously, we would turn a key path literal like `\.foo` in function type
context into a double-wrapped closure like this:

  foo(\.x) // before type checking
  foo({ $kp$ in { $0[$kp$] } }(\.x)) // after type checking

in order to preserve the evaluation semantics of the key path literal. This
works but leads to some awkward raw SIL generated out of SILGen which misses
out on various SILGen peepholes and requires a fair number of passes to clean
up. The semantics can still be preserved with a single layer of closure, by
using a capture list:

  foo({[$kp$ = \.x] in $0[$kp$] }) // after type checking

which generates better natural code out of SILGen, and is also (IMO) easier
to understand on human inspection.

Changing the AST representation did lead to a change in code generation that
interfered with the efficacy of CapturePropagation of key path literals; for
key path literals used as nonescaping closures, a mark_dependence of the
nonescaping function value on the key path was left behind, leaving the key
path object alive. The dependence is severed by the specialization done in
the pass, so update the pass to eliminate the dependence.
…ng#61227)

rdar://100169094

Co-authored-by: Max Obermeier <themomax@icloud.com>
[cxx-interop] Fix ASTVerifier error when building SwiftCompilerSources
…function-ast-optimization

Sema: Simplify AST representation of key path literals as functions.
swift-ci and others added 10 commits September 21, 2022 15:32
…s-as-locks

[Freestanding] In the task-to-thread model, actors should behave like actual locks
[Sema] Accept IgnoreCollectionElementContextualMismatch in conflict generic diagnostics
[interop][SwiftToCxx] Declare the generic usability type trait before…
…in availability attributes and queries.

Resolves rdar://100195680
…han their unavailable enclosing scope.

Resolves rdar://92552186
…ite-to-gh-issues-23

Gardening: Migrate test suite to GH issues p. 23
[NFC][test] Add additional test case for issue 57376
…itsome

Implement `some` elision behind an experimental feature flag
…vailable-than-unavailable-enclosing-scope

Sema: Diagnose declarations that are annotated to be more available than their unavailable enclosing scope
…e-fixit

Parse: Offer a fix-it when platform is specified with the wrong case in availability attributes and queries
@kateinoigakukun kateinoigakukun merged commit 979f882 into swiftwasm Sep 22, 2022
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.