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:
Yukihiro "Matz" Matsumoto
2026-01-23 21:51:01 +09:00
parent 60d981dbc8
commit a1567be5da
6 changed files with 30 additions and 26 deletions
+4
View File
@@ -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
View File
@@ -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]] */