Skip to content

[Parse/Sema/SIL] Implementation of init accessors feature (under a flag) #66283

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 48 commits into from
Jun 7, 2023

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 1, 2023

No description provided.

@xedin
Copy link
Contributor Author

xedin commented Jun 1, 2023

@swift-ci please build toolchain macOS

@xedin
Copy link
Contributor Author

xedin commented Jun 1, 2023

swiftlang/llvm-project#6945
@swift-ci please build toolchain macOS

@xedin
Copy link
Contributor Author

xedin commented Jun 3, 2023

@swift-ci please build toolchain macOS

@xedin
Copy link
Contributor Author

xedin commented Jun 5, 2023

@swift-ci please build toolchain macOS

@xedin xedin force-pushed the init-accessors branch 2 times, most recently from 82bcb27 to a767c7c Compare June 5, 2023 18:28
@xedin xedin changed the title [Sema/SIL] Implementation of init accessors feature (under a flag) [Parse/Sema/SIL] Implementation of init accessors feature (under a flag) Jun 5, 2023
@xedin xedin force-pushed the init-accessors branch from a767c7c to a1bb62c Compare June 6, 2023 01:04
@xedin
Copy link
Contributor Author

xedin commented Jun 6, 2023

@swift-ci please build toolchain macOS

@xedin
Copy link
Contributor Author

xedin commented Jun 6, 2023

@swift-ci please test

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Jun 6, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jun 6, 2023

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Jun 6, 2023

@swift-ci please smoke test

@xedin xedin force-pushed the init-accessors branch from b898d9b to 34e6966 Compare June 6, 2023 19:54
@xedin
Copy link
Contributor Author

xedin commented Jun 6, 2023

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Jun 6, 2023

@swift-ci please test

hborla added 5 commits June 6, 2023 18:57
This instruction is similar to AssignByWrapperInst, but instead of having
a destination operand, the initialization is fully factored into the init
function operand. Like AssignByWrapper, AssignOrInit has partial application
operands of both the initializer and the setter, and DI will lower the
instruction to a call based on whether the assignment is initialization or
a setter call.
xedin added 13 commits June 6, 2023 18:59
… into context before checking `initialValue`
…initializers

Properties with init accessors are used in place of properties they
are supposed to initialize in order of stored properties.
…nstead of initialization

Some properties from `initializes(...)` list could be already initialized,
which means that Raw SIL lowering has to emit `destroy_addr` for them
before calling init accessor.
DI marks all of of the previously initialized properties and Raw SIL
lowering emits `destroy_addr` before calling init accessor for such
properties to destroy previously set value.
…ly iniitalized properties

Properties that are marked as initialized are printed as `[assign=<index>]`
where `<index>` point to the property position in `getInitializedProperties()`
list.
Because the feature is experimental and the flag would not be present
in the production compilers.
@xedin xedin force-pushed the init-accessors branch from a65edd5 to aaa7261 Compare June 7, 2023 01:59
@xedin xedin marked this pull request as ready for review June 7, 2023 02:00
@xedin
Copy link
Contributor Author

xedin commented Jun 7, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jun 7, 2023

@swift-ci please test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Jun 7, 2023

Unrelated lldb test failure.

@xedin
Copy link
Contributor Author

xedin commented Jun 7, 2023

@swift-ci please clean test macOS platform

@xedin xedin merged commit 274a43b into swiftlang:main Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants