From 9301d7fe1178cabbc29dab1e252a1cce324e4f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petri=20H=C3=A4kkinen?= Date: Wed, 8 Nov 2023 10:20:16 +0200 Subject: [PATCH] Remove setpvaluefast --- CodeGen/src/CodeGenUtils.cpp | 4 ++-- VM/src/lobject.h | 7 ------- VM/src/lvmexecute.cpp | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CodeGen/src/CodeGenUtils.cpp b/CodeGen/src/CodeGenUtils.cpp index 57a0e570..267a912b 100644 --- a/CodeGen/src/CodeGenUtils.cpp +++ b/CodeGen/src/CodeGenUtils.cpp @@ -71,7 +71,7 @@ bool forgLoopTableIter(lua_State* L, Table* h, int index, TValue* ra) if (!ttisnil(e)) { - setpvaluefast(ra + 2, reinterpret_cast(uintptr_t(index + 1)), LU_TAG_ITERATOR); + setpvalue(ra + 2, reinterpret_cast(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(uintptr_t(index + 1)), LU_TAG_ITERATOR); + setpvalue(ra + 2, reinterpret_cast(uintptr_t(index + 1)), LU_TAG_ITERATOR); getnodekey(L, ra + 3, n); setobj(L, ra + 4, gval(n)); diff --git a/VM/src/lobject.h b/VM/src/lobject.h index 0d81e68c..a3864ce9 100644 --- a/VM/src/lobject.h +++ b/VM/src/lobject.h @@ -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); \ diff --git a/VM/src/lvmexecute.cpp b/VM/src/lvmexecute.cpp index 65d69a21..ac868795 100644 --- a/VM/src/lvmexecute.cpp +++ b/VM/src/lvmexecute.cpp @@ -2354,7 +2354,7 @@ reentry: if (!ttisnil(e)) { - setpvaluefast(ra + 2, reinterpret_cast(uintptr_t(index + 1)), LU_TAG_ITERATOR); + setpvalue(ra + 2, reinterpret_cast(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(uintptr_t(index + 1)), LU_TAG_ITERATOR); + setpvalue(ra + 2, reinterpret_cast(uintptr_t(index + 1)), LU_TAG_ITERATOR); getnodekey(L, ra + 3, n); setobj2s(L, ra + 4, gval(n));