Remove setpvaluefast

This commit is contained in:
Petri Häkkinen 2023-11-08 10:20:16 +02:00
parent 6c5785b35e
commit 9301d7fe11
3 changed files with 4 additions and 11 deletions

View file

@ -71,7 +71,7 @@ bool forgLoopTableIter(lua_State* L, Table* h, int index, TValue* ra)
if (!ttisnil(e))
{
setpvaluefast(ra + 2, reinterpret_cast<void*>(uintptr_t(index + 1)), LU_TAG_ITERATOR);
setpvalue(ra + 2, reinterpret_cast<void*>(uintptr_t(index + 1)), LU_TAG_ITERATOR);
setnvalue(ra + 3, double(index + 1));
setobj2s(L, ra + 4, e);
@ -90,7 +90,7 @@ bool forgLoopTableIter(lua_State* L, Table* h, int index, TValue* ra)
if (!ttisnil(gval(n)))
{
setpvaluefast(ra + 2, reinterpret_cast<void*>(uintptr_t(index + 1)), LU_TAG_ITERATOR);
setpvalue(ra + 2, reinterpret_cast<void*>(uintptr_t(index + 1)), LU_TAG_ITERATOR);
getnodekey(L, ra + 3, n);
setobj(L, ra + 4, gval(n));

View file

@ -134,13 +134,6 @@ typedef struct lua_TValue
i_o->tt = LUA_TLIGHTUSERDATA; \
}
#define setpvaluefast(obj, x, tag) \
{ \
TValue* i_o = (obj); \
LUAU_ASSERT(i_o->tt == LUA_TLIGHTUSERDATA && lightuserdatatag(i_o) == tag); \
i_o->value.p = (x); \
}
#define setbvalue(obj, x) \
{ \
TValue* i_o = (obj); \

View file

@ -2354,7 +2354,7 @@ reentry:
if (!ttisnil(e))
{
setpvaluefast(ra + 2, reinterpret_cast<void*>(uintptr_t(index + 1)), LU_TAG_ITERATOR);
setpvalue(ra + 2, reinterpret_cast<void*>(uintptr_t(index + 1)), LU_TAG_ITERATOR);
setnvalue(ra + 3, double(index + 1));
setobj2s(L, ra + 4, e);
@ -2375,7 +2375,7 @@ reentry:
if (!ttisnil(gval(n)))
{
setpvaluefast(ra + 2, reinterpret_cast<void*>(uintptr_t(index + 1)), LU_TAG_ITERATOR);
setpvalue(ra + 2, reinterpret_cast<void*>(uintptr_t(index + 1)), LU_TAG_ITERATOR);
getnodekey(L, ra + 3, n);
setobj2s(L, ra + 4, gval(n));