Skip to content

[pull] swiftwasm from main #4080

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 29 commits into from
Jan 7, 2022
Merged

[pull] swiftwasm from main #4080

merged 29 commits into from
Jan 7, 2022

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 6, 2022

See Commits and Changes for more details.


Created by pull[bot]

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

xedin and others added 29 commits December 23, 2021 14:10
The API is not constrained to methods only, it should support
computed properties as well.
…erence`

Instead of checking the frontend flag directly, let's use dedicated
method on a constraint system to determine whether closure did
participate in inference or not.
…re inference in result builder contexts

Multi-statement closure inference doesn't play well with result builders
at the moment because it expects all of the information from the parent
statements to be inferred before solver starts working on the body of a
nested closure. Let's prevent inference for nested multi-statement closures
until result builders are ported to use conjunctions and solve the body
incrementally top-down instead of in one shot.
These are just invariant checks which will become obsolete as soon
as multi-statement closure inference is enabled by default.
…t closures

This test-case used to crash with multi-statement closure inference
enabled in result builder contexts.
…Type

As a small step toward moving away from having a bespoke generic
environment for each OpaqueTypeArchetypeType, create the types
without the generic environment and only build it lazily.
We were always mangling based on the last generic parameter, which
makes sense when there is only one opaque result type, but is
incorrect when there are multiple opaque result types, e.g., due to
named or structural opaque result types.
…hing.

Introduce a new primitive operation on opaque type archetypes that
canonicalizes a type within the environment of the opaque type
archetype without building the environment itself. Use it when matching
opaque archetype types in the solver.
…ion.

Creation of the "bound" generic signature isn't possible with interface
types or type variables, so open up the opaque interface signature
instead and separately bind the outer type parameters as appropriate.
…types.

Teach `GenericEnvironment` how to lazily create opaque type archetypes,
performing the contextual substitutions as required but without
building the "bound" generic signature until required. To get here,
augment `GenericEnvironment` with knowledge of the purpose of the
environment, whether it is for normal cases (any signature), an opened
existential type, or an opaque type. For opaque types, store the
opaque type declaration and substitution map, which we also use to
uniquely find the generic environment. Among other things, this
ensures that different opaque type archetypes within the same opaque
type declaration are properly sharing a generic environment, which
wasn't happening before.
…nment.

When forming the generic signature of a generic environment for opaque
types, substitute for the outer generic parameters based on the provided
substitution map. We weren't able to do this before because the
substitution cannot be performed when there are interface types or
type variables involved. However, the lazy construction of this
generic signature and use of other queries on opaque type archetypes
ensures that we don't form new generic signatures until we have
concrete types to work with.

This enables same-type constraints amongst different opaque result types
and their associated types.
…ion domain

When minimizing a generic signature, we only care about loops
where the basepoint is a generic parameter symbol.

When minimizing protocol requirement signatures in a connected
component, we only care about loops where the basepoint is a
protocol symbol or associated type symbol whose protocol is
part of the connected component.

All other loops can be discarded since they do not encode
redundancies that are relevant to us.
On arm64e, this test generates incorrect output.

rdar://86825277
[Distributed] NFC: Remove `Method` from accessor APIs
…rence-inside-result-builder-bodies

[ConstraintSystem] SE-0326: Temporarily prevent multi-statement closure inference in result builder contexts
This addresses most of the options with computed defaults.

Addresses rdar://86723940
…-map-rewrite-loops

RequirementMachine: More fixes for property map induced rules
Conditionally disable tsan/racy_async_let_fibonacci.swift
@MaxDesiatov MaxDesiatov enabled auto-merge January 6, 2022 22:25
@MaxDesiatov MaxDesiatov merged commit b911ec2 into swiftwasm Jan 7, 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.

7 participants