Skip to content
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

[pull] swiftwasm from main #5391

Merged
merged 54 commits into from
Apr 29, 2023
Merged

[pull] swiftwasm from main #5391

merged 54 commits into from
Apr 29, 2023

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 29, 2023

See Commits and Changes for more details.


Created by pull[bot]

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

elsh and others added 30 commits April 20, 2023 17:45
…ck for associated enum element types

This ensures that we do not try to emit enums whose associated values come from dependent modules that don't have a C++ representation
Treat the C++ interop modules similar to the Concurrency and
StringProcessing modules, enabled through a top-level global flag.  The
flag now enables disabling the C++ interop modules when the standard
library is built.

Based on the original work by Egor Zhdan!
Unavailable decls cannot be overridden by available decls. This change improves
the compiler diagnostics for this restriction in a few ways:

- Duplicate diagnostics are suppressed for getters and setters inside property
  declarations that have already been diagnosed.
- Diagnostics are suppressed for implicit accessors since they would typically
  duplicate diagnostics for the explicit accessors the implicit ones are
  derived from.
- Decls inside unavailable a derived class are no longer incorrectly diagnosed.
Eliminate another circular reference through macro expansion mangling
by adjusting the starting declaration context to ensure that it is from
a suitable "outer" context.

Fixes rdar://108511666.
They cause ambiguities with math functions from platform's libc
Expression macros ascribed to non-private contexts need private
discriminators so they don't conflict with other uses of the same macro
in other source files.

Thank you, Richard, for noticing this omission!
The request returns the expanded buffer ID even if it failed to
typecheck the expanded buffer.
This makes refactoring 'Expand Macro' work regardless of the
typechecking results.

rdar://108530760
…unavailable-diagnostics

Sema: Improve diagnostics for overrides of unavailable decls
Only fully resolved substitutions are eligible to be considered
as conflicting, if holes are involved in any position that automatically
disqualifies a generic parameter.

Resolves: rdar://108534555
Resolves: swiftlang#63450
`SSAPrunedLiveness::invalidate` is used as though it reset the state of
the instance it is called on.  Clients then reuse the instance with the
expectation that it has been reset.  But since it has not been reset,
this results in unexpected liveness results.

rdar://108627366
…has package-name.

This disallows building an interface file that imports such module which should be allowed
since interface does not contain package symbols unless usableFromInline or inlinable.
This change limits erroring only when building a .swift file.

Resolves rdar://108633068
…arsing

This is needed to be able to perform code completion inside `@freestanding` and `@attached`.
…-completions

[CodeCompletion] Suggest freestanding after @
…rivate-discriminator

[Macros] Use private discriminators for expression macros
Print package-name in .private.swiftinterface only for better abstraction
…odifiers_in_operatordecl

[Parser] Make parser aware of the unexpected attributes in operator declarations
Rather than requiring macro implementations to add required whitespace
and indentation, basic format all macro expansions. Right now this uses
the default four space indentation, we can consider having that inferred
later. Macros can opt-out of automatic formatting by implementing
`formatMode` and setting it to `.disabled`.

Also moves the extra newlines before/after expansions to a new "Inline
Macro" refactoring.

Resolves rdar://107731047.
eeckstein and others added 21 commits April 28, 2023 08:46
…structs inside global static initializers

We missed converting such types inside static initializers of global variables.
This results in ptrauth crashes when ptrauth is enabled.

rdar://108165425
Tool selection is primarily done by checking the executable (= symlink) name.
But sometimes (e.g. if the tool symlink is not there) it's useful to have an option for selecting the tool.
The selection option (e.g. -sil-opt) must be the first argument of swift-frontend.
[SILOptimizer] Use BitfieldRef instead of invalidating SSAPrunedLiveness.
[interop][SwiftToCxx] do not expose enums with a protocol type associ…
[interop][SwiftToCxx] add additional type representation emission che…
[interop][SwiftToCxx] do not assert when emitting a public var and fu…
[interop] avoid importing math functions from the C++ standard library
…add accessors"

This reverts commit ef7970b. We
shouldn't need this.
…ress

LoadableByAddress: convert types of functions which are contained in structs inside global static initializers
…bservers

When an accessor macro adds a non-observing accessor to a property, it
subsumes the initializer. We had previously modeled this as removing
the initializer, but doing so means that the initializer could not be
used for type inference and was lost in the AST.

Explicitly mark the initializer as "subsumed" here, and be more
careful when querying the initializer to distinguish between "the
initializer that was written" and "the initializer that will execute"
in more places. This distinction already existed at the
pattern-binding level, but not at the variable-declaration level.

This is the proper fix for the circular reference issue described in
rdar://108565923 (test case in the prior commit).
build: enable control over the C++ interop modules
driver: add swift-frontend options to select the tool to run
Limit loading error when importing a module built from interface with package-name
This is a revert  of the workaround for creating debug  info for error variables
in b2109ab, while leaving the test  added back then in place.  The compiler
is now emitting debug info for the error pattern binding as it's supposed to and
after the  recent migration to  stricter debug  scope generation, there  are now
situations where the  variable added for the workaround and  the correct one are
in conflict.

rdar://108576484
[stdlib] Adopt _pointerBitWidth conditional
Make sure we walk auxiliary declarations when gathering stored
properties. This ensures that we will get any stored properties
introduced by peer macros.

Fixes rdar://108534298.
…uest-rdar108530760

[Macros] Requestify MacroExpansionExpr expansion
[Macros] Automatically format expanded macros
…x-decls

Walk auxiliary declarations when gathering stored properties
xedin and others added 3 commits April 28, 2023 17:18
[CSDiagnostics] Teach `diagnoseConflictingGenericArguments` about holes
…te-completions

[CodeCompletion] Support completion for macro roles and the 'names:' argument label
Remove an obsolete workaround for error variables.
@kateinoigakukun kateinoigakukun merged commit 2f4ee5f into swiftwasm Apr 29, 2023
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.

None yet