use heap_loc to refer to 0-arity atom instead of str_loc
This commit is contained in:
@@ -590,7 +590,7 @@ throw(Ball) :-
|
|||||||
:- non_counted_backtracking '$iterate_find_all'/4.
|
:- non_counted_backtracking '$iterate_find_all'/4.
|
||||||
|
|
||||||
'$iterate_find_all'(Template, Goal, _, LhOffset) :-
|
'$iterate_find_all'(Template, Goal, _, LhOffset) :-
|
||||||
call(Goal),
|
'$call'(Goal),
|
||||||
'$copy_to_lh'(LhOffset, Template),
|
'$copy_to_lh'(LhOffset, Template),
|
||||||
'$fail'.
|
'$fail'.
|
||||||
'$iterate_find_all'(_, _, Solutions, LhOffset) :-
|
'$iterate_find_all'(_, _, Solutions, LhOffset) :-
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use crate::arena::*;
|
use crate::arena::*;
|
||||||
use crate::atom_table::*;
|
use crate::atom_table::*;
|
||||||
use crate::types::*;
|
use crate::types::*;
|
||||||
|
|
||||||
use crate::clause_types::*;
|
use crate::clause_types::*;
|
||||||
use crate::forms::*;
|
use crate::forms::*;
|
||||||
use crate::heap_iter::*;
|
use crate::heap_iter::*;
|
||||||
@@ -3377,11 +3376,15 @@ impl MachineState {
|
|||||||
self.heap.push(atom_as_cell!(name, arity));
|
self.heap.push(atom_as_cell!(name, arity));
|
||||||
|
|
||||||
for i in 0..arity {
|
for i in 0..arity {
|
||||||
self.heap.push(heap_loc_as_cell!(h + i + 1));
|
self.heap.push(heap_loc_as_cell!(h + i + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
str_loc_as_cell!(h)
|
if arity == 0 {
|
||||||
};
|
heap_loc_as_cell!(h)
|
||||||
|
} else {
|
||||||
|
str_loc_as_cell!(h)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
(self.bind_fn)(self, r, f_a);
|
(self.bind_fn)(self, r, f_a);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user