OutOfMemory{..} =>
"could not allocate more memory",
ExecutionTimeLimitReached =>
- "reached the configured maximum execution time",
+ "the expression was too complex to be evaluated or resulted in an infinite loop",
StackFrameLimitReached =>
"reached the configured maximum number of stack frames",
OutOfTls =>
/// The maximum number of stack frames allowed
pub(crate) stack_limit: usize,
- /// The maximum number of operations that may be executed.
+ /// The maximum number of terminators that may be evaluated.
/// This prevents infinite loops and huge computations from freezing up const eval.
/// Remove once halting problem is solved.
pub(crate) steps_remaining: usize,
/// Returns true as long as there are more things to do.
pub fn step(&mut self) -> EvalResult<'tcx, bool> {
- self.inc_step_counter_and_check_limit(1)?;
if self.stack.is_empty() {
return Ok(false);
}
return Ok(true);
}
+ self.inc_step_counter_and_check_limit(1)?;
+
let terminator = basic_block.terminator();
assert_eq!(old_frames, self.cur_frame());
self.terminator(terminator)?;