This commit is contained in:
@@ -3190,6 +3190,9 @@ impl Machine {
|
||||
(self.machine_st.increment_call_count_fn)(&mut self.machine_st)
|
||||
);
|
||||
}
|
||||
&IndexedChoiceInstruction::DefaultRetry(l) => {
|
||||
self.retry(l);
|
||||
}
|
||||
&IndexedChoiceInstruction::Trust(l) => {
|
||||
self.trust(l);
|
||||
|
||||
@@ -3198,6 +3201,9 @@ impl Machine {
|
||||
(self.machine_st.increment_call_count_fn)(&mut self.machine_st)
|
||||
);
|
||||
}
|
||||
&IndexedChoiceInstruction::DefaultTrust(l) => {
|
||||
self.trust(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
IndexingLine::DynamicIndexedChoice(_) => {
|
||||
@@ -5192,11 +5198,6 @@ impl Machine {
|
||||
|
||||
if self.machine_st.fail {
|
||||
self.machine_st.backtrack();
|
||||
} else {
|
||||
try_or_throw!(
|
||||
self.machine_st,
|
||||
(self.machine_st.increment_call_count_fn)(&mut self.machine_st)
|
||||
);
|
||||
}
|
||||
}
|
||||
&Instruction::ExecuteFastCallN(arity) => {
|
||||
@@ -5208,11 +5209,6 @@ impl Machine {
|
||||
|
||||
if self.machine_st.fail {
|
||||
self.machine_st.backtrack();
|
||||
} else {
|
||||
try_or_throw!(
|
||||
self.machine_st,
|
||||
(self.machine_st.increment_call_count_fn)(&mut self.machine_st)
|
||||
);
|
||||
}
|
||||
}
|
||||
&Instruction::CallGetClauseP => {
|
||||
|
||||
@@ -753,14 +753,16 @@ impl Machine {
|
||||
match &indexing_lines[self.machine_st.oip as usize] {
|
||||
IndexingLine::IndexedChoice(indexed_choice) => {
|
||||
match &indexed_choice[(self.machine_st.iip + inner_offset) as usize] {
|
||||
&IndexedChoiceInstruction::Retry(o) => {
|
||||
&IndexedChoiceInstruction::Retry(o) |
|
||||
&IndexedChoiceInstruction::DefaultRetry(o) => {
|
||||
if self.next_clause_applicable(self.machine_st.p + o) {
|
||||
return Some(inner_offset);
|
||||
}
|
||||
|
||||
inner_offset += 1;
|
||||
}
|
||||
&IndexedChoiceInstruction::Trust(o) => {
|
||||
&IndexedChoiceInstruction::Trust(o) |
|
||||
&IndexedChoiceInstruction::DefaultTrust(o) => {
|
||||
return if self.next_clause_applicable(self.machine_st.p + o) {
|
||||
Some(inner_offset)
|
||||
} else {
|
||||
@@ -1268,4 +1270,4 @@ impl Machine {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1205,11 +1205,13 @@ impl Machine {
|
||||
|
||||
match &indexed_choice[p] {
|
||||
&IndexedChoiceInstruction::Try(offset) |
|
||||
&IndexedChoiceInstruction::Retry(offset) => {
|
||||
&IndexedChoiceInstruction::Retry(offset) |
|
||||
&IndexedChoiceInstruction::DefaultRetry(offset) => {
|
||||
let clause_clause_loc = skeleton.core.clause_clause_locs[p];
|
||||
(clause_clause_loc, bp + offset)
|
||||
}
|
||||
&IndexedChoiceInstruction::Trust(_) => {
|
||||
&IndexedChoiceInstruction::Trust(_) |
|
||||
&IndexedChoiceInstruction::DefaultTrust(_) => {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user