diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-09-17 07:49:47 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-09-17 07:49:47 +0900 |
| commit | 7c99df8416aa866725c11e5ced7f2c5a818a8c74 (patch) | |
| tree | 827ad7d0074e44eb28672ca8b41788a3c1bc28a4 /doc | |
| parent | 6f044de578bd9b1056e59bb499d49a5dc7ebef2b (diff) | |
| download | mruby-7c99df8416aa866725c11e5ced7f2c5a818a8c74.tar.gz mruby-7c99df8416aa866725c11e5ced7f2c5a818a8c74.zip | |
ops.h: add `OP_ARYPUSH_N` instruction.
Add n elements at once. Reduces instructions for huge array
initialization. In addition, `gen_value` function in `codegen.c` was
refactored and clarified.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/opcode.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/opcode.md b/doc/opcode.md index f6e3b7604..2a0363f55 100644 --- a/doc/opcode.md +++ b/doc/opcode.md @@ -98,6 +98,7 @@ sign) of operands. | `OP_ARRAY2` | `BBB` | `R(a) = ary_new(R(b),R(b+1)..R(b+c))` | | `OP_ARYCAT` | `B` | `ary_cat(R(a),R(a+1))` | | `OP_ARYPUSH` | `B` | `ary_push(R(a),R(a+1))` | +| `OP_ARYPUSH_N` | `BB` | `ary_push(R(a),R(a+1)..R(a+b))` | | `OP_ARYDUP` | `B` | `R(a) = ary_dup(R(a))` | | `OP_AREF` | `BBB` | `R(a) = R(b)[c]` | | `OP_ASET` | `BBB` | `R(a)[c] = R(b)` | |
