1
Fork 0

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

@ -184,6 +184,7 @@ impl<'tcx, Prov: Provenance> ImmTy<'tcx, Prov> {
#[inline]
pub fn from_scalar(val: Scalar<Prov>, layout: TyAndLayout<'tcx>) -> Self {
debug_assert!(layout.abi.is_scalar(), "`ImmTy::from_scalar` on non-scalar layout");
debug_assert_eq!(val.size(), layout.size);
ImmTy { imm: val.into(), layout }
}