]> Repositorios git - scryer-prolog.git/commitdiff
add missing default RevJmpBy arm to thread_choice_instr_at_to (prompted by #922)
authorMark Thom <[email protected]>
Wed, 5 May 2021 17:16:33 +0000 (11:16 -0600)
committerMark Thom <[email protected]>
Wed, 5 May 2021 17:16:39 +0000 (11:16 -0600)
src/machine/compile.rs

index e88dc605e1161e688ea6ec6fd541856fc3627cd6..b0242aaca278eb9e59129f517a5d88782ae24031 100644 (file)
@@ -682,6 +682,9 @@ fn thread_choice_instr_at_to(
                 *o = instr_loc - target_loc;
                 return;
             }
+            &mut Line::Control(ControlInstruction::RevJmpBy(o)) => {
+                instr_loc -= o;
+            }
             &mut Line::Choice(ChoiceInstruction::DynamicElse(birth, death, ref mut fail))
                 if target_loc >= instr_loc =>
             {
@@ -733,12 +736,6 @@ fn thread_choice_instr_at_to(
                 instr_loc += *o;
             }
             _ => {
-                println!("failing code: \n");
-
-                for index in instr_loc - 40..instr_loc + 40 {
-                    println!("{:07} | {}", index, code[index]);
-                }
-
                 unreachable!()
             }
         }