false // for now, we don't enforce validity
}
- fn find_fn(
+ fn find_mir_or_eval_fn(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
instance: ty::Instance<'tcx>,
args: &[OpTy<'tcx>],
ret: Option<(PlaceTy<'tcx>, mir::BasicBlock)>,
_unwind: Option<mir::BasicBlock> // unwinding is not supported in consts
) -> InterpResult<'tcx, Option<&'mir mir::Body<'tcx>>> {
- debug!("eval_fn_call: {:?}", instance);
+ debug!("find_mir_or_eval_fn: {:?}", instance);
// If this function is a `const fn` then as an optimization we can query this
// evaluation immediately.
/// nor just jump to `ret`, but instead push their own stack frame.)
/// Passing `dest`and `ret` in the same `Option` proved very annoying when only one of them
/// was used.
- fn find_fn(
+ fn find_mir_or_eval_fn(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
instance: ty::Instance<'tcx>,
args: &[OpTy<'tcx, Self::PointerTag>],
ty::InstanceDef::CloneShim(..) |
ty::InstanceDef::Item(_) => {
// We need MIR for this fn
- let body = match M::find_fn(self, instance, args, ret, unwind)? {
+ let body = match M::find_mir_or_eval_fn(self, instance, args, ret, unwind)? {
Some(body) => body,
None => return Ok(()),
};
false
}
- fn find_fn(
+ fn find_mir_or_eval_fn(
_ecx: &mut InterpCx<'mir, 'tcx, Self>,
_instance: ty::Instance<'tcx>,
_args: &[OpTy<'tcx>],