forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
…eneric diagnostics
… 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.
…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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )