-
Notifications
You must be signed in to change notification settings - Fork 824
Description
I just followed the code by eye, so if I'm wrong or that's the intended behavior, please ignore it.
-
two consecutive
FETCH_XXX()fromiseqmayWhile
OP_DEBUGis defined as operand typeBBBininclude/mruby/ops.h, it is defined as operand typeZinsrc/vm.cfollowed byFETCH_BBB().
I assume thatOP_DEBUGalways intends toFETCH_BBB(), but if the operand is extended with instructionOP_EXT3, for example,FETCH_SSB()is performed followed byFETCH_BBB().If this is not the intention, it is better to change
OP_DEBUGinsrc/vm.ctoBBBorOP_DEBUGininclude/mruby/ops.htoZ. -
inconsistency when the configuration macro
MRB_USE_DEBUG_HOOKis definedIn normal instructions,
mrb->debug_op_hook()is called before decoding the operand.
ForOP_DEBUG,mrb->debug_op_hook()is called again afterFETCH_BBB(). In addition,NULLcheck ofmrb->debug_op_hookis not performed at this time.