fix setup_call_cleanup bug

This commit is contained in:
Mark Thom
2018-02-01 23:39:03 -07:00
parent 7b5a2786da
commit 9c2e8dfd72
4 changed files with 17 additions and 12 deletions

View File

@@ -246,7 +246,7 @@ impl<'a, TermMarker: Allocator<'a>> CodeGenerator<'a, TermMarker>
{
match qt {
&QueryTerm::SetupCallCleanup(_) =>
code.push(goto_call!(294, 3)),
code.push(goto_call!(294, 3)),
&QueryTerm::Arg(_) => {
let call = ControlInstruction::ArgCall;
code.push(Line::Control(call));
@@ -495,7 +495,7 @@ impl<'a, TermMarker: Allocator<'a>> CodeGenerator<'a, TermMarker>
let mut code = Vec::new();
if let &QueryTerm::Term(ref term) = p0 {
self.marker.reset_arg(term.arity());
self.marker.reset_arg(term.arity());
self.compile_seq_prelude(&conjunct_info, &mut code);
if let &Term::Clause(..) = term {
@@ -508,7 +508,7 @@ impl<'a, TermMarker: Allocator<'a>> CodeGenerator<'a, TermMarker>
}
self.marker.reset_arg_at_head(term);
let iter = ChunkedIterator::from_rule_body(p1, clauses);
try!(self.compile_seq(iter, &conjunct_info, &mut code, false));