pub fn load(&self, src: LTerm, hp: &heap::Heap) -> LTerm {
    if src.is_immediate3() {
      let v = src.value;
      match immediate::get_imm3_tag(v) {
        immediate::TAG_IMM3_XREG => return self.regs[immediate::get_imm3_value(v)],
        immediate::TAG_IMM3_YREG => {
          let y_index = immediate::get_imm3_value(v);
          let y_result = hp.stack_get_y(y_index);
          return y_result.unwrap();
        }
        _ => panic!("{}Don't know how to ctx.load from {}", module(), src)
      }
    }
    // otherwise return unchanged
    src
  }
/// Read a register otherwise term is returned unchanged.
// TODO: Optimize - separate load constant from load register instruction
Read a register otherwise term is returned unchanged.
TODO: Optimize - separate load constant from load register instruction
Read a register otherwise term is returned unchanged . TODO : Optimize - separate load constant from load register instruction
pub fn load(&self, src: LTerm, hp: &heap::Heap) -> LTerm {
    if src.is_immediate3() {
      let v = src.value;
      match immediate::get_imm3_tag(v) {
        immediate::TAG_IMM3_XREG => return self.regs[immediate::get_imm3_value(v)],
        immediate::TAG_IMM3_YREG => {
          let y_index = immediate::get_imm3_value(v);
          let y_result = hp.stack_get_y(y_index);
          return y_result.unwrap();
        }
        _ => panic!("{}Don't know how to ctx.load from {}", module(), src)
      }
    }
    // otherwise return unchanged
    src
  }
pub fn load ( & self , src : LTerm , hp : & heap :: Heap ) -> LTerm { if src . is_immediate3 ( ) { let v = src . value ; match immediate :: get_imm3_tag ( v ) { immediate :: TAG_IMM3_XREG => return self . regs [ immediate :: get_imm3_value ( v ) ] , immediate :: TAG_IMM3_YREG => { let y_index = immediate :: get_imm3_value ( v ) ; let y_result = hp . stack_get_y ( y_index ) ; return y_result . unwrap ( ) ; } _ => panic ! ( " " module ( ) src ) } } // otherwise return unchanged src }
Read a register otherwise term is returned unchanged.
Read a register otherwise term is returned unchanged .
&self
src
LTerm
hp
&heap::Heap