pub fn opcode_swap(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 2 {
            print_error(chunk, i, "swap requires two arguments");
            return 0;
        }
        let first_rr = self.stack.pop().unwrap();
        let second_rr = self.stack.pop().unwrap();
        self.stack.push(first_rr);
        self.stack.push(second_rr);
        return 1;
    }
/// Swap the top two elements from the stack.
Swap the top two elements from the stack.
Swap the top two elements from the stack .
pub fn opcode_swap(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 2 {
            print_error(chunk, i, "swap requires two arguments");
            return 0;
        }
        let first_rr = self.stack.pop().unwrap();
        let second_rr = self.stack.pop().unwrap();
        self.stack.push(first_rr);
        self.stack.push(second_rr);
        return 1;
    }
pub fn opcode_swap ( & mut self , chunk : & Chunk , i : usize ) -> i32 { if self . stack . len ( ) < 2 { print_error ( chunk , i , " " ) ; return 0 ; } let first_rr = self . stack . pop ( ) . unwrap ( ) ; let second_rr = self . stack . pop ( ) . unwrap ( ) ; self . stack . push ( first_rr ) ; self . stack . push ( second_rr ) ; return 1 ; }
Swap the top two elements from the stack.
Swap the top two elements from the stack .
&mut self
chunk
&Chunk
i
usize