-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor finalization of initializers. (#3250)
Factor out the common code to find the return slot for an initializing expression, and use it to simplify the two different ways we finalize initializers, as either initializing a temporary or initializing some specific object. This slightly changes the SemIR we create for function calls: instead of rewriting the Call node to have a different destination and replacing its temporary with a `no_op`, we now replace its temporary with a `stub_reference` to the new destination. This results in the same amount of SemIR being produced, but allows calls and other kinds of initializers to be handled uniformly.
- Loading branch information
Showing
2 changed files
with
75 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters