Skip to content

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 1, 2022

See Commits and Changes for more details.


Created by pull[bot]

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

ktoso and others added 24 commits May 5, 2022 20:14
…tance.setup`

FrontendTool sets up diagnostic infrastructure early and suppresses stdout diagnostics if frontend-parseable-output is enabled. It then calls `CompilerInstance.setup` which may fail - if it fails, we exit early. But that means we have not gotten a chance to emit parseable-output.

This change moves emission of the `began` parseable message to before `CompilerInstance.setup`, and ensures that a corresponding `finished` message is emitted if the setup fails.

Resolves rdar://93187783
…'apply' involves non-root opened archetypes

This optimization rewrites only the 'self' argument, and does not know how to
substitute types in the users of the given apply instruction in case the
underlying protocol method involved `Self`-dependent types. With SE-0309 in
motion, the bail-out logic must be generalized to non-root opened archetypes.
Synthesized file units were designed for autodiff to emit synthesized declarations, and also to sidestep the design implications of doing so late in the compiler pipeline.

A call to materialize synthesized file units was added to the GetImplicitSendable request. This introduced a source of iterator invalidation into forEachFileToTypeCheck in whole-module builds. Any call to insert a new file into the module has the potential to cause the underlying SmallVector to reallocate.

This patch provides a narrow workaround that stops using iterators altogether in forEachFileToTypeCheck. However, this bug reveals a severe architectural flaw in the concept of a synthesized file unit. Iterating over the files in a module is an extremely common operation, and there now are myriad ways we could wind up calling a function that mutates the module's list of files in the process. This also means the number and kind of files being visited by compiler analyses is dependent upon whether a request that inserts these files has or has not been called.

This suggests the call to ModuleDecl::addFile in FileUnit::getOrCreateSynthesizedFile is deleterious and should be removed. Doing so will come as part of a larger refactoring.

rdar://94043340
Fix an oversight where syntactic checking was not performed on
any statements in a body of a multi-statement after successful
solution application.

Resolves: rdar://94049113
(cherry picked from commit 953095a)
…s-5.7

[5.7] PerformanceDiagnostics: fix a crash when emitting a module
An `@objc` interface defined from Swift may have a formal type in terms of its
Swift bridged types, but we want to lower the SIL-level completion handler
implementation according to the actual ObjC types that will be passed at runtime.
Fixes rdar://93112430
[5.7][CSClosure] Perform syntactic checks on rewritten statements
[5.7] Patch Out a Source of Iterator Invalidation
…ypes

For now, this only works with conformance requirements and not
existential types.

Fixes rdar://problem/92197412.
…ing type of a typealias

Just as with an unconstrained protocol type appearing here, such a typealias
can only be used on the right hand side of a conformance requirement, or as
the base of an 'any' type.
…n-aka

🍒 [5.7] DiagnosticEngine: Print `any` in 'aka' types
…n-swift-type-bridge-5.7

[5.7] SILGen: Use ObjC types to lower async completion handler arguments.
🍒 [5.7] SE-0309: SILOptimizer fixes & reenable executable tests
…tExit

[5.7][Parseable Output] Emit parseable messages on failure in `CompilerInstance.setup`
…nose

🍒[5.7][Distributed] Diagnose missing inout on remoteCall decls
…tocol-improvements-5.7

Parameterized protocol improvements [5.7]
@kateinoigakukun kateinoigakukun merged commit b1ea1ae into swiftwasm-release/5.7 Jun 1, 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.

9 participants