From 8bfa99975c8fc9ed171549b0710cab7a395116c5 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 18 Sep 2021 12:29:58 +0900 Subject: codegen.c: unify `OP_ARYPUSH` and `OP_ARYPUSH_N`. - `OP_ARYPUSH` now takes operand for the number of pushing elements - the code generator consume the stack no more than `64` for `mruby/c` --- src/vm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/vm.c') diff --git a/src/vm.c b/src/vm.c index 5690684cb..b50354061 100644 --- a/src/vm.c +++ b/src/vm.c @@ -2546,12 +2546,7 @@ RETRY_TRY_BLOCK: NEXT; } - CASE(OP_ARYPUSH, B) { - mrb_ary_push(mrb, regs[a], regs[a+1]); - NEXT; - } - - CASE(OP_ARYPUSH_N, BB) { + CASE(OP_ARYPUSH, BB) { for (mrb_int i=0; i