From: Mark Thom Date: Sun, 6 Mar 2022 22:48:54 +0000 (-0700) Subject: fix compare/3 (#1327) X-Git-Tag: v0.9.1~128 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=2744989cf1364cf686273f05e162cf6fcf24238c;p=scryer-prolog.git fix compare/3 (#1327) --- diff --git a/src/machine/dispatch.rs b/src/machine/dispatch.rs index 830eedb7..f8ee8c6b 100644 --- a/src/machine/dispatch.rs +++ b/src/machine/dispatch.rs @@ -58,12 +58,11 @@ impl MachineState { let a3 = self.registers[3]; read_heap_cell!(a1, - (HeapCellValueTag::Str, s) => { - let (name, arity) = cell_as_atom_cell!(self.heap[s]) - .get_name_and_arity(); + (HeapCellValueTag::Atom, (name, arity)) => { + debug_assert_eq!(arity, 0); match name { - atom!(">") | atom!("<") | atom!("=") if arity == 2 => { + atom!(">") | atom!("<") | atom!("=") => { } _ => { let err = self.domain_error(DomainErrorType::Order, a1);