Support default params
@@ -799,10 +799,22 @@ static inline int op_send( mrbc_vm *vm, mrbc_value *regs )
@param regs pointer to regs
@retval 0 No error.
*/
+#define MRB_ASPEC_REQ(a) (((a) >> 18) & 0x1f)
+#define MRB_ASPEC_OPT(a) (((a) >> 13) & 0x1f)
+#define MRB_ASPEC_REST(a) (((a) >> 12) & 0x1)
+#define MRB_ASPEC_POST(a) (((a) >> 7) & 0x1f)
+#define MRB_ASPEC_KEY(a) (((a) >> 2) & 0x1f)
+#define MRB_ASPEC_KDICT(a) ((a) & (1<<1))
+#define MRB_ASPEC_BLOCK(a) ((a) & 1)
static inline int op_enter( mrbc_vm *vm, mrbc_value *regs )
{
FETCH_W();
+ int m1 = MRB_ASPEC_REQ(a);
+
+ int argc = vm->callinfo_tail->n_args;
+ vm->inst += (argc - m1) * 3;
+
return 0;
}
