/// Takes two values as its arguments, compares them for equality,
/// and places the result onto the stack.
Takes two values as its arguments, compares them for equality,
and places the result onto the stack.
Takes two values as its arguments compares them for equality and places the result onto the stack .
pub fn opcode_eq(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 2 {
            print_error(chunk, i, "= requires two arguments");
            return 0;
        }
        let v1_rr = self.stack.pop().unwrap();
        let v1_rrb = v1_rr.borrow();
        let v2_rr = self.stack.pop().unwrap();
        let v2_rrb = v2_rr.borrow();
        let res = self.opcode_eq_inner(chunk, i, &v1_rrb, &v2_rrb);
        if res == 0 {
            print_error(chunk, i, "= requires two comparable values");
            return 0;
        }
        return 1;
    }
pub fn opcode_eq ( & mut self , chunk : & Chunk , i : usize ) -> i32 { if self . stack . len ( ) < 2 { print_error ( chunk , i , " " ) ; return 0 ; } let v1_rr = self . stack . pop ( ) . unwrap ( ) ; let v1_rrb = v1_rr . borrow ( ) ; let v2_rr = self . stack . pop ( ) . unwrap ( ) ; let v2_rrb = v2_rr . borrow ( ) ; let res = self . opcode_eq_inner ( chunk , i , & v1_rrb , & v2_rrb ) ; if res == 0 { print_error ( chunk , i , " " ) ; return 0 ; } return 1 ; }
Takes two values as its arguments, compares them for equality,
and places the result onto the stack.
Takes two values as its arguments compares them for equality and places the result onto the stack .
&mut self
<not_specific>
chunk
&Chunk
<not_specific>
i
usize
<not_specific>