Blua: OP_SELF can use 'luaV_fastget' specialized for strings, as it is applied only to string keys

https://github.com/lua/lua/commit/257961c601fdec1ea1f9640d460e0d31c39333a1
This commit is contained in:
Alug authored and Alug committed 2026-03-15 18:04:02 +01:00
1 parent 019812db08
commit 7aa4bd6990
1 file changed
+6 -1
+6 -1
View File
@@ -529,11 +529,16 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_SELF: {
TValue *slot;
StkId ra = RA(i);
StkId rb = RB(i);
TValue *rc = RKC(i);
TString *key = rawtsvalue(rc); /* key must be a string */
setobjs2s(L, ra + 1, rb);
gettableProtected(L, rb, rc, ra);
if (luaV_fastget(L, rb, key, slot, luaH_getstr)) {
setobj2s(L, ra, slot);
}
else Protect(luaV_finishget(L, rb, rc, ra, slot));
continue;
}
case OP_ADD: {