“Bea” Kode Jawaban

Bea

OpCase(move_cx):
{
  BeamInstr next_pf = BeamCodeAddr(I[2]);
  xb(BeamExtraData(I[0])) = I[1];
  I += 2;
  ASSERT(VALID_INSTR(next_pf));
  GotoPF(next_pf);
}
Lovely Leopard

Bea

increment.fetch(Src) {
    increment_reg_val = $Src;
}
Lovely Leopard

Bea

OpCase(jump_f):
{
  BeamInstr next_pf = BeamCodeAddr(I[1]);
  ASSERT(VALID_INSTR(*(I + (fb(BeamExtraData(I[0]))) + 0)));
  I += fb(BeamExtraData(I[0])) + 0;;
  Goto(*I);;
  I += 1;
  ASSERT(VALID_INSTR(next_pf));
  GotoPF(next_pf);
}
Lovely Leopard

Bea

jump(Fail) {
    $JUMP($Fail);
}

// From macros.tab
JUMP(Fail) {
    //| -no_next
    $SET_I_REL($Fail);
    Goto(*I);
}
Lovely Leopard

Bea

OpCase(move_xy):
{
  Eterm tmp_packed1 = BeamExtraData(I[0]);
  BeamInstr next_pf = BeamCodeAddr(I[1]);
  yb((tmp_packed1>>BEAM_TIGHT_SHIFT)) = xb(tmp_packed1&BEAM_TIGHT_MASK);
  I += 1;
  ASSERT(VALID_INSTR(next_pf));
  GotoPF(next_pf);
}
Lovely Leopard

Bea

is_atom(Fail, Src) {
    if (is_not_atom($Src)) {
        $FAIL($Fail);
    }
}

// From macros.tab
FAIL(Fail) {
    //| -no_prefetch
    $SET_I_REL($Fail);
    Goto(*I);
}
Lovely Leopard

Bea

# In ops.tab
move2 x y x y

// In instrs.tab
move2(S1, D1, S2, D2) {
    Eterm V1, V2;
    V1 = $S1;
    V2 = $S2;
    $D1 = V1;
    $D2 = V2;
}
Lovely Leopard

Bea

move_cx id 5
move_xx 3 0
move_xy 2 1
Lovely Leopard

Bea

OpCase(i_call_f):
{
    ASSERT(VALID_INSTR(*(I+2)));
    *E = (BeamInstr) (I+2);;

    /* ... dispatch code intentionally left out ... */
}
Lovely Leopard

Bea

move X1=x Y1=y | move X2=x Y2=y | move X3=x Y3=y => \
     move3 X1 Y1 X2 Y2 X3 Y3
Lovely Leopard

Jawaban yang mirip dengan “Bea”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya