mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
ops.h: rename OP_LOADT/OP_LOADF to OP_LOADTRUE/OP_LOADFALSE
Rename boolean load opcodes for consistency with LOADNIL/LOADSELF. Backward compatibility aliases are provided in opcode.h. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,10 @@ enum mrb_insn {
|
||||
#undef OPCODE
|
||||
};
|
||||
|
||||
/* backward compatibility aliases */
|
||||
#define OP_LOADT OP_LOADTRUE
|
||||
#define OP_LOADF OP_LOADFALSE
|
||||
|
||||
#define OP_L_STRICT 1
|
||||
#define OP_L_CAPTURE 2
|
||||
#define OP_L_METHOD OP_L_STRICT
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ OPCODE(LOADI32, BSS) /* R[a] = mrb_int((b<<16)+c) */
|
||||
OPCODE(LOADSYM, BB) /* R[a] = Syms[b] */
|
||||
OPCODE(LOADNIL, B) /* R[a] = nil */
|
||||
OPCODE(LOADSELF, B) /* R[a] = self */
|
||||
OPCODE(LOADT, B) /* R[a] = true */
|
||||
OPCODE(LOADF, B) /* R[a] = false */
|
||||
OPCODE(LOADTRUE, B) /* R[a] = true */
|
||||
OPCODE(LOADFALSE, B) /* R[a] = false */
|
||||
OPCODE(GETGV, BB) /* R[a] = getglobal(Syms[b]) */
|
||||
OPCODE(SETGV, BB) /* setglobal(Syms[b], R[a]) */
|
||||
OPCODE(GETSV, BB) /* R[a] = Special[Syms[b]] */
|
||||
|
||||
Reference in New Issue
Block a user