diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-03 06:40:05 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-03 06:40:05 +0900 |
| commit | d9a8981c26829aae0908244c3728f17e06a88ee2 (patch) | |
| tree | 1f3d18efc90edb0002b3139e251909dd6ae58cfa /doc | |
| parent | a624da6fdb160b9a70a96c1ffe9dec017d7f5cb4 (diff) | |
| download | mruby-d9a8981c26829aae0908244c3728f17e06a88ee2.tar.gz mruby-d9a8981c26829aae0908244c3728f17e06a88ee2.zip | |
vm.c: `OP_DEF` to push a symbol to `a` register.
The code generator no longer need to emit `OP_LOADSYM` after `OP_DEF`.
`doc/opcode.md` is also updated.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/opcode.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/opcode.md b/doc/opcode.md index 21dc2ef9d..3cc95af92 100644 --- a/doc/opcode.md +++ b/doc/opcode.md @@ -117,7 +117,7 @@ sign) of operands. | `OP_CLASS` | `BB` | `R(a) = newclass(R(a),Syms(b),R(a+1))` | | `OP_MODULE` | `BB` | `R(a) = newmodule(R(a),Syms(b))` | | `OP_EXEC` | `BB` | `R(a) = blockexec(R(a),SEQ[b])` | -| `OP_DEF` | `BB` | `R(a).newmethod(Syms(b),R(a+1))` | +| `OP_DEF` | `BB` | `R(a).newmethod(Syms(b),R(a+1)); R(a) = Syms(b)` | | `OP_ALIAS` | `BB` | `alias_method(target_class,Syms(a),Syms(b))` | | `OP_UNDEF` | `B` | `undef_method(target_class,Syms(a))` | | `OP_SCLASS` | `B` | `R(a) = R(a).singleton_class` | |
