mirror of
https://github.com/urbit/ares.git
synced 2024-12-26 23:02:44 +03:00
[ares] comment explaining why unifying equality does not, in fact, infinite loop
This commit is contained in:
parent
9d97c2d29f
commit
223b946199
@ -671,6 +671,13 @@ pub unsafe fn unifying_equality(stack: &mut NockStack, a: *mut Noun, b: *mut Nou
|
||||
stack.reclaim_in_previous_frame::<(*mut Noun, *mut Noun)>();
|
||||
continue;
|
||||
} else {
|
||||
/* THIS ISN'T AN INFINITE LOOP
|
||||
* If we discover a disequality in either side, we will
|
||||
* short-circuit the entire loop and reset the work stack.
|
||||
*
|
||||
* If both sides are equal, then we will discover pointer
|
||||
* equality when we return and unify the cell.
|
||||
*/
|
||||
*(stack.alloc_in_previous_frame()) =
|
||||
(x_cell.tail_as_mut(), y_cell.tail_as_mut());
|
||||
*(stack.alloc_in_previous_frame()) =
|
||||
|
Loading…
Reference in New Issue
Block a user