-
Notifications
You must be signed in to change notification settings - Fork 71
Eagerly construct bodies of THIR #409
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
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed. cc @rust-lang/compiler @rust-lang/compiler-contributors |
@rustbot second |
Whoops, I probably shouldn't have seconded this, as there were some outstanding questions. Not sure how to cancel that, though? EDIT: I just removed the label for now. |
@rustbot second my concerns around peak memory usage have been resolved, we'll look into this during the actual impl, but I don't think anyone is very worried. |
Eagerly construct bodies of THIR With this PR: - the THIR is no longer constructed lazily, but is entirely built before being passed to the MIR Builder - the THIR is now allocated in arenas instead of `Box`es However, this PR doesn't make any changes to the way patterns are constructed: they are still boxed, and exhaustiveness checking is unchanged. Implements MCP rust-lang/compiler-team#409. Closes rust-lang/project-thir-unsafeck#1. r? `@ghost` cc `@nikomatsakis` `@oli-obk`
Proposal
No longer construct the THIR lazily, layer by layer, and instead construct it eagerly.
This concretely means:
thir::ExprRef
/thir::StmtRef
and having a full THIR tree (not a "shallow" tree)build_thir
function, without the need for visitors to construct it recursively themselves, simplifying code overallAlso, this might allow to do more things on the THIR, like unsafety checking (#402).
(Suggested by @nikomatsakis on Zulip)
FAQ
Mentors or Reviewers
@nikomatsakis
Process
The main points of the Major Change Process is as follows:
@rustbot second
.-C flag
, then full team check-off is required.@rfcbot fcp merge
on either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
The text was updated successfully, but these errors were encountered: