interpret: refactor function call handling to be better-abstracted#128687
Merged
bors merged 3 commits intorust-lang:masterfrom Aug 7, 2024
Merged
interpret: refactor function call handling to be better-abstracted#128687bors merged 3 commits intorust-lang:masterfrom
bors merged 3 commits intorust-lang:masterfrom
Conversation
Collaborator
|
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
Collaborator
|
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri The Miri subtree was changed cc @rust-lang/miri |
b3caa1b to
498d687
Compare
RalfJung
commented
Aug 5, 2024
This comment has been minimized.
This comment has been minimized.
721ee9b to
b02aa4f
Compare
Collaborator
|
☔ The latest upstream changes (presumably #128707) made this pull request unmergeable. Please resolve the merge conflicts. |
57f9d09 to
5783e73
Compare
WaffleLapkin
reviewed
Aug 6, 2024
Member
WaffleLapkin
left a comment
There was a problem hiding this comment.
The changes generally look good, but I have a few nits/questions
src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr
Show resolved
Hide resolved
Member
|
r? WaffleLapkin |
ca0af71 to
1c2705c
Compare
Member
Author
|
@bors r=WaffleLapkin |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 6, 2024
…r=WaffleLapkin interpret: refactor function call handling to be better-abstracted Add a new function `init_stack_frame` that pushes a stack frame and passes the arguments, and use that basically everywhere that the raw underlying `push_stack_frame` used to be called. This splits the previous monster function `eval_fn_call` into two parts: figuring out the MIR to call and the arguments to pass, and then actually setting up the stack frame. Also re-organize the files a bit: - The previous `terminator.rs` is split into a new `call.rs` with all the argument-passing logic, and the rest goes into `step.rs` where the other main dispatcher functions already live (in particular, `eval_statement`). - All the stack frame handling from `eval_context.rs` is moved to a new `stack.rs`.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 6, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125048 (PinCoerceUnsized trait into core) - rust-lang#128273 (Improve `Ord` violation help) - rust-lang#128406 (implement BufReader::peek) - rust-lang#128539 (Forbid unused unsafe in vxworks-specific std modules) - rust-lang#128687 (interpret: refactor function call handling to be better-abstracted) - rust-lang#128692 (Add a triagebot mention for `library/Cargo.lock`) - rust-lang#128710 (Don't ICE when getting an input file name's stem fails) - rust-lang#128718 (Consider `cfg_attr` checked by `CheckAttrVisitor`) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 6, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125048 (PinCoerceUnsized trait into core) - rust-lang#128273 (Improve `Ord` violation help) - rust-lang#128406 (implement BufReader::peek) - rust-lang#128539 (Forbid unused unsafe in vxworks-specific std modules) - rust-lang#128687 (interpret: refactor function call handling to be better-abstracted) - rust-lang#128692 (Add a triagebot mention for `library/Cargo.lock`) - rust-lang#128710 (Don't ICE when getting an input file name's stem fails) - rust-lang#128718 (Consider `cfg_attr` checked by `CheckAttrVisitor`) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 7, 2024
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#124944 (On trait bound mismatch, detect multiple crate versions in dep tree) - rust-lang#125048 (PinCoerceUnsized trait into core) - rust-lang#128406 (implement BufReader::peek) - rust-lang#128539 (Forbid unused unsafe in vxworks-specific std modules) - rust-lang#128687 (interpret: refactor function call handling to be better-abstracted) - rust-lang#128692 (Add a triagebot mention for `library/Cargo.lock`) - rust-lang#128710 (Don't ICE when getting an input file name's stem fails) - rust-lang#128718 (Consider `cfg_attr` checked by `CheckAttrVisitor`) - rust-lang#128751 (std::thread: set_name implementation proposal for vxWorks.) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 7, 2024
Rollup merge of rust-lang#128687 - RalfJung:interpret-call-refactor, r=WaffleLapkin interpret: refactor function call handling to be better-abstracted Add a new function `init_stack_frame` that pushes a stack frame and passes the arguments, and use that basically everywhere that the raw underlying `push_stack_frame` used to be called. This splits the previous monster function `eval_fn_call` into two parts: figuring out the MIR to call and the arguments to pass, and then actually setting up the stack frame. Also re-organize the files a bit: - The previous `terminator.rs` is split into a new `call.rs` with all the argument-passing logic, and the rest goes into `step.rs` where the other main dispatcher functions already live (in particular, `eval_statement`). - All the stack frame handling from `eval_context.rs` is moved to a new `stack.rs`.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new function
init_stack_framethat pushes a stack frame and passes the arguments, and use that basically everywhere that the raw underlyingpush_stack_frameused to be called. This splits the previous monster functioneval_fn_callinto two parts: figuring out the MIR to call and the arguments to pass, and then actually setting up the stack frame.Also re-organize the files a bit:
terminator.rsis split into a newcall.rswith all the argument-passing logic, and the rest goes intostep.rswhere the other main dispatcher functions already live (in particular,eval_statement).eval_context.rsis moved to a newstack.rs.