Skip to content

Merge main 2023-06-11 #5511

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 25 commits into from
Jun 12, 2023
Merged

Merge main 2023-06-11 #5511

merged 25 commits into from
Jun 12, 2023

Conversation

kateinoigakukun
Copy link
Member

No description provided.

gottesmm and others added 24 commits June 9, 2023 15:41
…table in IRGen.

SIL Functions are serialized in canonical SIL before they have their final ABI
adjusted for large function arguments. Large function argument ABI is adjusted
to be indirect as part of the transition from canonical SIL to lowered SIL. This
means that if we deserialize a function from another module in canonical SIL and
attempt to call it in IRGen we will call it with the wrong ABI implying if we
reference any fields of the type in the deinit we will most likely crash (among
other potential issues).

This patch fixes the issue by changing IRGen to not lazily deserialize the
moveonly deinit table and its associated functions. Instead if we do not have
our table already deserialized, we just call the function's deinit via the
destroy value deinit table.

rdar://110496872
The compiler knows (from a macro declaration) what freestanding macro
role a macro implementation is expected to implement. Pass that through
to the macro expansion code itself, rather than guessing based on the
protocol conformances of the implementation type. We already use this
approach with attached macros, so this is more of the same.

Eliminates a crash and improves diagnostics when the freestanding macro
role and its implementation are out of sync, fixing rdar://110418969.
Per SE-0397, a macro may only have a single freestanding macro role,
otherwise we would have an ambiguity in how a particular freestanding
macro would be expanded. Produce an error on such macro declarations.

Fixes rdar://110178899.
…#65984)

* [Observation] Transition to peer macros instead of arbitrary members

* [Observation] Lift the initializer requirement by utilizing init accessors for fully formed definite initialization

* [Observation] Gate enabling of peer macros by flag

* [Observation] Enable feature for InitAccessors in the observation tests

* [Observation] Add tests to validate memberwise and definite initialization
…d595d547bdfa2b9bb4f0b1e

[move-only] Do not attempt to lazily deserialize the moveonly deinit table in IRGen.
…anding-macro-role

[Macros] Provide the freestanding macro role for expansion operations.
…rn types

There is no reason to special-case `Void` to permit it. Rather, make
this a syntactic rule. Thanks to Alex Hoppen for the suggestion.
…terfaces

This allows us to continue to accept Swift interface files created with
older versions of the Swift 5.9 compiler that emitted a spurious
`-> ()` on non-expression macro declarations.
__GNUC__ can be defined on Wasm targets as well, so we need to check
__wasm__ first.
Stubs.cpp includes <sys/resource.h> which requires the emulation in
wasi-libc
…s-in-current-context

Sema: Reword diagnostics to say 'without a type annotation' instead of 'without more context'
…31b4569de6eb6f2d8dcd0ceeb9a538

[wasm][stdlib] Fix return-address strategy selection
…c40dacafff72d609d2b35f0941e69d

[wasm][stdlib] Add -D_WASI_EMULATED_PROCESS_CLOCKS to CFLAGS
@kateinoigakukun kateinoigakukun force-pushed the katei/merge-main-2023-06-11 branch from b2999a1 to f5f4b84 Compare June 11, 2023 10:40
@kateinoigakukun kateinoigakukun marked this pull request as ready for review June 12, 2023 08:02
@kateinoigakukun kateinoigakukun merged commit acb42e3 into swiftwasm Jun 12, 2023
@kateinoigakukun kateinoigakukun deleted the katei/merge-main-2023-06-11 branch June 12, 2023 08:02
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