summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-09-18 12:29:58 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-09-19 09:07:20 +0900
commit8bfa99975c8fc9ed171549b0710cab7a395116c5 (patch)
treecf503ae6e95eb5730bb3a898f047f11ebef1a1ee /include
parent7c99df8416aa866725c11e5ced7f2c5a818a8c74 (diff)
downloadmruby-8bfa99975c8fc9ed171549b0710cab7a395116c5.tar.gz
mruby-8bfa99975c8fc9ed171549b0710cab7a395116c5.zip
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`
Diffstat (limited to 'include')
-rw-r--r--include/mruby/ops.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/mruby/ops.h b/include/mruby/ops.h
index 8fe9e5df7..9b9fefeb0 100644
--- a/include/mruby/ops.h
+++ b/include/mruby/ops.h
@@ -85,8 +85,7 @@ OPCODE(GE, B) /* R(a) = R(a)>=R(a+1) */
OPCODE(ARRAY, BB) /* R(a) = ary_new(R(a),R(a+1)..R(a+b)) */
OPCODE(ARRAY2, BBB) /* R(a) = ary_new(R(b),R(b+1)..R(b+c)) */
OPCODE(ARYCAT, B) /* ary_cat(R(a),R(a+1)) */
-OPCODE(ARYPUSH, B) /* ary_push(R(a),R(a+1)) */
-OPCODE(ARYPUSH_N, BB) /* ary_push(R(a),R(a+1)..R(a+b)) */
+OPCODE(ARYPUSH, BB) /* ary_push(R(a),R(a+1)..R(a+b)) */
OPCODE(ARYDUP, B) /* R(a) = ary_dup(R(a)) */
OPCODE(AREF, BBB) /* R(a) = R(b)[c] */
OPCODE(ASET, BBB) /* R(a)[c] = R(b) */