Skip to content
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

Gather CTFE support code in const_eval and cleanup that file #67316

Closed
RalfJung opened this issue Dec 15, 2019 · 0 comments · Fixed by #67327
Closed

Gather CTFE support code in const_eval and cleanup that file #67316

RalfJung opened this issue Dec 15, 2019 · 0 comments · Fixed by #67327
Labels
A-const-eval Area: constant evaluation (mir interpretation) C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

Follow-up to #66866: @oli-obk agreed to move eval_const_fn_call to const_eval.rs. Generally I propose that interp should not contain code that is only needed by CTFE. We have intern.rs and snapshot.rs in there are they need some very deep access to Miri engine internals, but at least those are separate modules.

Also, const_eval.rs has grown pretty messy, and it does not seem like the order of definitions in that file follows any principle. We could split the file into two similar to what I did with Miri: const_eval/engine.rs for implementing the machine trait and defining everything that is needed during CTFE execution, and const_eval/eval.rs for defining the setup functions and all the glue that connects CTFE with the rest of the compiler.

@jonas-schievink jonas-schievink added A-const-eval Area: constant evaluation (mir interpretation) C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 15, 2019
@bors bors closed this as completed in 3ac40b6 Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-eval Area: constant evaluation (mir interpretation) C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants