interpret: refactor function call handling to be better-abstracted

This commit is contained in:
Ralf Jung
2024-08-05 17:34:44 +02:00
parent 8c7e0e1608
commit 522af10ccc
22 changed files with 1337 additions and 1316 deletions

View File

@@ -73,7 +73,9 @@ fn eval_body_using_ecx<'tcx, R: InterpretationResult<'tcx>>(
cid.promoted.map_or_else(String::new, |p| format!("::{p:?}"))
);
ecx.push_stack_frame(
// This can't use `init_stack_frame` since `body` is not a function,
// so computing its ABI would fail. It's also not worth it since there are no arguments to pass.
ecx.push_stack_frame_raw(
cid.instance,
body,
&ret.clone().into(),