Skip to content

[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 18 commits into from
Oct 30, 2021
Merged

[pull] swiftwasm from main #3813

merged 18 commits into from
Oct 30, 2021

Conversation

pull[bot]
Copy link

@pull pull bot commented Oct 30, 2021

See Commits and Changes for more details.


Created by pull[bot]

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

nate-chandler and others added 15 commits October 28, 2021 13:42
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
MaxDesiatov previously approved these changes Oct 30, 2021
@MaxDesiatov MaxDesiatov enabled auto-merge October 30, 2021 09:31
@MaxDesiatov MaxDesiatov merged commit 441ed8c into swiftwasm Oct 30, 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.

6 participants