pub unsafe fn disasm_op(ip0: *const Word,
                        code_server: &CodeServer) -> *const Word {
  let mut ip = ip0;

  let op = opcode::from_memory_ptr(ip);
  assert!(op < gen_op::OPCODE_MAX);

  if let Some(mfa) = code_server.code_reverse_lookup(CodePtr::new(ip)) {
    print!("{} ", mfa)
  }

  print!("{:p}: {} ", ip, gen_op::opcode_name(op as u8));
  ip = ip.offset(1);

  let n_args = gen_op::opcode_arity(op as u8) as Word;
  disasm_op_args(ip, n_args);

  println!();

  ip.offset(n_args as isize)
}
/// Given an IP code pointer which points to the opcode - print the opcode and
/// args. Returns updated IP which points at the next opcode.
Given an IP code pointer which points to the opcode - print the opcode and
args. Returns updated IP which points at the next opcode.
Given an IP code pointer which points to the opcode - print the opcode and args . Returns updated IP which points at the next opcode .
pub unsafe fn disasm_op(ip0: *const Word,
                        code_server: &CodeServer) -> *const Word {
  let mut ip = ip0;
  let op = opcode::from_memory_ptr(ip);
  assert!(op < gen_op::OPCODE_MAX);
  if let Some(mfa) = code_server.code_reverse_lookup(CodePtr::new(ip)) {
    print!("{} ", mfa)
  }
  print!("{:p}: {} ", ip, gen_op::opcode_name(op as u8));
  ip = ip.offset(1);
  let n_args = gen_op::opcode_arity(op as u8) as Word;
  disasm_op_args(ip, n_args);
  println!();
  ip.offset(n_args as isize)
}
pub unsafe fn disasm_op ( ip0 : * const Word , code_server : & CodeServer ) -> * const Word { let mut ip = ip0 ; let op = opcode :: from_memory_ptr ( ip ) ; assert ! ( op gen_op OPCODE_MAX ) ; if let Some ( mfa ) = code_server . code_reverse_lookup ( CodePtr :: new ( ip ) ) { print ! ( " " mfa ) } print ! ( " " ip gen_op opcode_name ( op as u8 ) ) ; ip = ip . offset ( 1 ) ; let n_args = gen_op :: opcode_arity ( op as u8 ) as Word ; disasm_op_args ( ip , n_args ) ; println ! ( ) ; ip . offset ( n_args as isize ) }
Given an IP code pointer which points to the opcode - print the opcode and
args.
Given an IP code pointer which points to the opcode - print the opcode and args .
ip0
*const Word
code_server
&CodeServer