Skip to content

[pull] swiftwasm-release/5.7 from release/5.7 #4602

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 13 commits into from
May 28, 2022

Conversation

pull[bot]
Copy link

@pull pull bot commented May 28, 2022

See Commits and Changes for more details.


Created by pull[bot]

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

CodaFi and others added 13 commits May 26, 2022 10:32
These don't produce meaningful ParameterLists for this analysis to
consider. Bail instead of crashing.

rdar://93922410
…ential(s) that would loose generic requirements

Implements SE-0352 revision - require explicit `as` coercion when existential
erasure loses information.

For example:

```swift
protocol P {
  associatedtype A
}

protocol Q {
  associatedtype B: P where B.A == Int
}

func getB<T: Q>(_: T) -> T.B { ... }

func test(v: any Q) {
  let _ = getB(v) // <- produces `any P` which loses A == Int
}
```
No longer test the round trip remapping for the output file - we'll be
changing the reader to preserve the canonical output file path instead
of converting it back to local. Once all of the changes are complete, we
can swap this to verify it is canonical, but indexstore-db will also
check this with its own tests.
…-5.7

[5.7][TypeChecker] SE-0352: Require coercion if result type contains exist…
…zation::tryPeephole

The callers to ConversionInitialization::tryPeephole assume that, if the conversion peephole
succeeded, that the peepholed result was fully emitted into the initialization. However, if
the ConversionInitialization sat on top of an in-memory initialization, then tryPeephole would
only set the value of the ConversionInitialization, without forwarding the value into the underlying
initialization, causing code generation to proceed leaving the underlying memory uninitialized.
This problem becomes exposed now when literal closures are emitted with a return value that is
indirectly returned and also reabstracted, and the return expression undergoes a ping-pong reabstraction
pair: we see through the conversions and peephole away the reabstractions, but fail to emplace the
result in the indirect return slot.

Fixes rdar://92654098
…onstraints.

When determining whether a superclass conforms to a particular protocol,
skip unavailable conformances. This way, we don't minimize away a
constraint that might only apply to subclasses of the specified
superclass.

Fixes rdar://91853658.
When a class has an unavailable conformance to a protocol, do not
inherit that unavailable conformance, because it can get in the way of
subclasses defining their own (properly-available) conformance.

Fixes rdar://89992569.
[5.7] Handle ParamDecls and VarDecls in Argument Matching Diagnostics
…x-5.7

[5.7] SILGen: Complete initialization of FinalContext in ConversionInitialization::tryPeephole
…gtestfix

[5.7] Update unit-one-sourcefile-remapped.swift round tripping
@kateinoigakukun kateinoigakukun merged commit a8bf124 into swiftwasm-release/5.7 May 28, 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.

8 participants