diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-05-15 10:07:25 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-05-15 10:07:25 -0300 |
commit | 934e77a286aeb97ca02badf56956ccc78217e9d0 (patch) | |
tree | 6994a5bc3d625d1d37156895a5b21bebb46f36a8 /lvm.c | |
parent | 6443185167c77adcc8552a3fee7edab7895db1a9 (diff) | |
download | lua-934e77a286aeb97ca02badf56956ccc78217e9d0.tar.gz lua-934e77a286aeb97ca02badf56956ccc78217e9d0.tar.bz2 lua-934e77a286aeb97ca02badf56956ccc78217e9d0.zip |
Details
- Better comments about short strings in opcodes.
- luaH_newkey made static.
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1253,7 +1253,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1253 | const TValue *slot; | 1253 | const TValue *slot; |
1254 | TValue *upval = cl->upvals[GETARG_B(i)]->v.p; | 1254 | TValue *upval = cl->upvals[GETARG_B(i)]->v.p; |
1255 | TValue *rc = KC(i); | 1255 | TValue *rc = KC(i); |
1256 | TString *key = tsvalue(rc); /* key must be a string */ | 1256 | TString *key = tsvalue(rc); /* key must be a short string */ |
1257 | if (luaV_fastget(L, upval, key, slot, luaH_getshortstr)) { | 1257 | if (luaV_fastget(L, upval, key, slot, luaH_getshortstr)) { |
1258 | setobj2s(L, ra, slot); | 1258 | setobj2s(L, ra, slot); |
1259 | } | 1259 | } |
@@ -1296,7 +1296,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1296 | const TValue *slot; | 1296 | const TValue *slot; |
1297 | TValue *rb = vRB(i); | 1297 | TValue *rb = vRB(i); |
1298 | TValue *rc = KC(i); | 1298 | TValue *rc = KC(i); |
1299 | TString *key = tsvalue(rc); /* key must be a string */ | 1299 | TString *key = tsvalue(rc); /* key must be a short string */ |
1300 | if (luaV_fastget(L, rb, key, slot, luaH_getshortstr)) { | 1300 | if (luaV_fastget(L, rb, key, slot, luaH_getshortstr)) { |
1301 | setobj2s(L, ra, slot); | 1301 | setobj2s(L, ra, slot); |
1302 | } | 1302 | } |
@@ -1309,7 +1309,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1309 | TValue *upval = cl->upvals[GETARG_A(i)]->v.p; | 1309 | TValue *upval = cl->upvals[GETARG_A(i)]->v.p; |
1310 | TValue *rb = KB(i); | 1310 | TValue *rb = KB(i); |
1311 | TValue *rc = RKC(i); | 1311 | TValue *rc = RKC(i); |
1312 | TString *key = tsvalue(rb); /* key must be a string */ | 1312 | TString *key = tsvalue(rb); /* key must be a short string */ |
1313 | if (luaV_fastget(L, upval, key, slot, luaH_getshortstr)) { | 1313 | if (luaV_fastget(L, upval, key, slot, luaH_getshortstr)) { |
1314 | luaV_finishfastset(L, upval, slot, rc); | 1314 | luaV_finishfastset(L, upval, slot, rc); |
1315 | } | 1315 | } |
@@ -1352,7 +1352,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1352 | const TValue *slot; | 1352 | const TValue *slot; |
1353 | TValue *rb = KB(i); | 1353 | TValue *rb = KB(i); |
1354 | TValue *rc = RKC(i); | 1354 | TValue *rc = RKC(i); |
1355 | TString *key = tsvalue(rb); /* key must be a string */ | 1355 | TString *key = tsvalue(rb); /* key must be a short string */ |
1356 | if (luaV_fastget(L, s2v(ra), key, slot, luaH_getshortstr)) { | 1356 | if (luaV_fastget(L, s2v(ra), key, slot, luaH_getshortstr)) { |
1357 | luaV_finishfastset(L, s2v(ra), slot, rc); | 1357 | luaV_finishfastset(L, s2v(ra), slot, rc); |
1358 | } | 1358 | } |