}};
}
-static INSTRUCTIONS_PER_INTERRUPT_POLL: usize = 256;
-
impl MachineState {
#[inline(always)]
fn compare(&mut self) -> CallResult {
}
fn verify_attr_dispatch_loop(&mut self) -> Option<std::process::ExitCode> {
+ let mut interrupt_counter = std::num::Wrapping(0u8);
'outer: loop {
- for _ in 0..INSTRUCTIONS_PER_INTERRUPT_POLL {
+ loop {
+ interrupt_counter += 1;
+ if interrupt_counter.0 == 0 {
+ break;
+ }
match self.code[self.machine_st.p] {
Instruction::BreakFromDispatchLoop => {
break 'outer;
}
pub(super) fn dispatch_loop(&mut self) -> std::process::ExitCode {
+ let mut interrupt_counter = std::num::Wrapping(0u8);
'outer: loop {
- for _ in 0..INSTRUCTIONS_PER_INTERRUPT_POLL {
+ loop {
+ interrupt_counter += 1;
+ if interrupt_counter.0 == 0 {
+ break;
+ }
+
match &self.code[self.machine_st.p] {
&Instruction::BreakFromDispatchLoop => {
break 'outer;