.get_name_and_arity();
if n1 == n2 && a1 == a2 {
- for idx in 0..a1 {
+ for idx in (0..a1).rev() {
self.pdl.push(heap_loc_as_cell!(s2+1+idx));
self.pdl.push(heap_loc_as_cell!(s1+1+idx));
}
}
(HeapCellValueTag::Lis, l2) => {
if a1 == 2 && n1 == atom!(".") {
- for idx in 0..2 {
+ for idx in (0..2).rev() {
self.pdl.push(heap_loc_as_cell!(l2+1+idx));
self.pdl.push(heap_loc_as_cell!(s1+1+idx));
}
fn unify_list(&mut self, l1: usize, d2: HeapCellValue) {
read_heap_cell!(d2,
(HeapCellValueTag::Lis, l2) => {
- for idx in 0..2 {
+ for idx in (0..2).rev() {
self.pdl.push(heap_loc_as_cell!(l2 + idx));
self.pdl.push(heap_loc_as_cell!(l1 + idx));
}
.get_name_and_arity();
if a2 == 2 && n2 == atom!(".") {
- for idx in 0..2 {
+ for idx in (0..2).rev() {
self.pdl.push(heap_loc_as_cell!(s2+1+idx));
self.pdl.push(heap_loc_as_cell!(l1+idx));
}
.get_name_and_arity();
if n1 == n2 && a1 == a2 {
- for idx in 0..a1 {
+ for idx in (0..a1).rev() {
self.pdl.push(heap_loc_as_cell!(s2+1+idx));
self.pdl.push(heap_loc_as_cell!(s1+1+idx));
}
}
(HeapCellValueTag::Lis, l2) => {
if a1 == 2 && n1 == atom!(".") {
- for idx in 0..2 {
+ for idx in (0..2).rev() {
self.pdl.push(heap_loc_as_cell!(l2+idx));
self.pdl.push(heap_loc_as_cell!(s1+1+idx));
}
) {
read_heap_cell!(d2,
(HeapCellValueTag::Lis, l2) => {
- for idx in 0..2 {
+ for idx in (0..2).rev() {
self.pdl.push(heap_loc_as_cell!(l2+idx));
self.pdl.push(heap_loc_as_cell!(l1+idx));
}
.get_name_and_arity();
if a2 == 2 && n2 == atom!(".") {
- for idx in 0..2 {
+ for idx in (0..2).rev() {
self.pdl.push(heap_loc_as_cell!(s2+1+idx));
self.pdl.push(heap_loc_as_cell!(l1+idx));
}