forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[pull] swiftwasm from main #3813
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
In 1ae317d, all the machinery was added to enable calling ObjC functions that have both async and error conventions. The handling that was added for matching up arguments and parameters, however, failed to handle functions that had both foreign async and foreign error and other arguments. Here, that handling is fixed. The fix is in four parts: - Reverting to a single call to CallSite::emit to emit the formal params. At this point, the foreign async and/or error params will be claimed as well. - Separately counting the async and error parameters in ParamLowering::claimParams to ensure we get the right parameter slices. - Letting ArgEmitter::maybeEmitForeignArgument look for an error parameter even if it already found an async parameter. - Letting ArgEmitter::maybeEmitForeignArgument keep looking for foreign arguments after it finds one. rdar://80704984
We used to assert if a generic requirement of a signature could be proved from the signature with the requirement removed. However, in some rare cases minimization can *add* new requirements as well as remove them. This is going to come up even more with the RequirementMachine, where for example the following signature is accepted: protocol Q { associatedtype A : P } protocol P { associatedtype B } <T where T.A : Q, T.A.B == T> and minimized as follows: <T where T : P, T.A : Q, T.A.B == T>
…atureRequest too There's no way to trigger this from a test right now; it's for some changes @jckarter is working on.
[SILGen] Handled foreign funcs with async, error, and more args.
…opy value. The key thing is that the move checker will not consider the explicit copy value to be a copy_value that can be rewritten, ensuring that any uses of the result of the explicit copy_value (consuming or other wise) are not checked. Similar to the _move operator I recently introduced, this is a transparent function so we can perform one level of specialization and thus at least be generic over all concrete types.
Just a thinko on my part.
…ferred result builder attributes from protocol requirements.
…nference GSB: Perform conditional requirement inference in AbstractGenericSignatureRequest too
…itnesses, always map type parameters into context. For result builders applied to function/variable/subscript bodies, the builder type will only be used for calls to `buildBlock` and friends inside the body, for which we always want the contextual type of the builder, not the interface type.
…b7f978fdb5599412fd608c0 [moveOnly] Add a semi-generic _copy function similar to the semi-generic _move
…icSignature() function This is slightly cleaner.
…est return the HadAnyError bit For now I'm going to use this in -verify-generic-signatures, but it could be useful in other places too.
This removes the final dependency on GenericSignatureBuilder.h.
…bstitution [Result Builders] Correct type witness substitution when computing inferred result builder attributes from protocol requirements.
MaxDesiatov
previously approved these changes
Oct 30, 2021
…ulate-gsb Completely encapsulate GenericSignatureBuilder
MaxDesiatov
approved these changes
Oct 30, 2021
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 : )