correct allocation bugs.
This commit is contained in:
@@ -574,7 +574,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_at_head(term);
|
||||
self.compile_seq_prelude(&conjunct_info, &mut code);
|
||||
|
||||
if let &Term::Clause(..) = term {
|
||||
@@ -586,7 +586,7 @@ impl<'a, TermMarker: Allocator<'a>> CodeGenerator<'a, TermMarker>
|
||||
}
|
||||
}
|
||||
|
||||
self.marker.reset_arg_at_head(term);
|
||||
// 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));
|
||||
|
||||
@@ -517,7 +517,7 @@ fn compile_decl<'a, 'b: 'a>(wam: &'a mut Machine, tl: &'b TopLevel, queue: &'b V
|
||||
if let Err(e) = compile_appendix(&mut code, queue) {
|
||||
return EvalSession::from(e);
|
||||
};
|
||||
|
||||
|
||||
if !code.is_empty() {
|
||||
if let Some(name) = tl.name() {
|
||||
wam.add_user_code(name, tl.arity(), code)
|
||||
|
||||
Reference in New Issue
Block a user