-
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.
Consolidate post-check logic (#5003)
Right now, some post-run logic is does in `Run()` (`CheckRequiredDefinitions();` and `context_.sem_ir().set_has_errors(unit_and_imports_->err_tracker.seen_error());`) whereas other parts are done by `Finalize`. Noting the goal to move things off `Context`, this consolidates into a new `FinishRun`. Note #4962 is adding another bit of post-run that can be consolidated in; this seems likely to keep growing slowly. Note this also creates more parity with mutation source, like the `context_.scope_stack().Pop();` matches the push done by `CheckUnit::ImportCurrentPackage` and `context_.inst_block_stack().Pop()` was pushed in `CheckUnit::Run()`. Also makes `exports()` more consistent with other Context APIs. Makes `VerifyOnFinish` `const` so that it can't accidentally mutate state, and is instead only validating that the Context is in its expected configuration at completion.
- Loading branch information
Showing
9 changed files
with
46 additions
and
44 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
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
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
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
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