Rework of the Register type and removal of Op1Source: op0, dst & op1 should be handled the same way as registers. (op1Source might be renamed top op1Register for clarity)
Instruction decoding has been cleaned up to compute the different flags and enforce the use of switch cases for each flag.
Move away from the computeX()/deduceX() methods from the Python andRust VMs. Use a switch on two variables instead (opcode and resLogic, as Cairo instructions are like opcode(dst, res) with res = res_logic(op0, op1)), suggested by @ClementWalter
Solves #54, #40
Register
type and removal ofOp1Source
:op0
,dst
&op1
should be handled the same way as registers. (op1Source might be renamed top op1Register for clarity)computeX()
/deduceX()
methods from the Python andRust VMs. Use aswitch
on two variables instead (opcode and resLogic, as Cairo instructions are likeopcode(dst, res)
withres = res_logic(op0, op1)
), suggested by @ClementWalter