From d9a8981c26829aae0908244c3728f17e06a88ee2 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 3 Jul 2021 06:40:05 +0900 Subject: 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. --- include/mruby/ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/mruby/ops.h b/include/mruby/ops.h index 8d62f007f..3388d171e 100644 --- a/include/mruby/ops.h +++ b/include/mruby/ops.h @@ -105,7 +105,7 @@ OPCODE(OCLASS, B) /* R(a) = ::Object */ OPCODE(CLASS, BB) /* R(a) = newclass(R(a),Syms(b),R(a+1)) */ OPCODE(MODULE, BB) /* R(a) = newmodule(R(a),Syms(b)) */ OPCODE(EXEC, BB) /* R(a) = blockexec(R(a),SEQ[b]) */ -OPCODE(DEF, BB) /* R(a).newmethod(Syms(b),R(a+1)) */ +OPCODE(DEF, BB) /* R(a).newmethod(Syms(b),R(a+1)); R(a) = Syms(b) */ OPCODE(ALIAS, BB) /* alias_method(target_class,Syms(a),Syms(b)) */ OPCODE(UNDEF, B) /* undef_method(target_class,Syms(a)) */ OPCODE(SCLASS, B) /* R(a) = R(a).singleton_class */ -- cgit v1.2.3