diff --git a/VM/src/lobject.cpp b/VM/src/lobject.cpp index 081e3314..514a4359 100644 --- a/VM/src/lobject.cpp +++ b/VM/src/lobject.cpp @@ -48,7 +48,7 @@ int luaO_rawequalObj(const TValue* t1, const TValue* t2) case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); // boolean true must be 1 !! case LUA_TLIGHTUSERDATA: - return pvalue(t1) == pvalue(t2) && (!FFlag::TaggedLuData || lightuserdatatag(t1) == lightuserdatatag(t2)); + return pvalue(t1) == pvalue(t2) && (!FFlag::LuauTaggedLuData || lightuserdatatag(t1) == lightuserdatatag(t2)); default: LUAU_ASSERT(iscollectable(t1)); return gcvalue(t1) == gcvalue(t2); @@ -71,7 +71,7 @@ int luaO_rawequalKey(const TKey* t1, const TValue* t2) case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); // boolean true must be 1 !! case LUA_TLIGHTUSERDATA: - return pvalue(t1) == pvalue(t2) && (!FFlag::TaggedLuData || lightuserdatatag(t1) == lightuserdatatag(t2)); + return pvalue(t1) == pvalue(t2) && (!FFlag::LuauTaggedLuData || lightuserdatatag(t1) == lightuserdatatag(t2)); default: LUAU_ASSERT(iscollectable(t1)); return gcvalue(t1) == gcvalue(t2); diff --git a/VM/src/lobject.h b/VM/src/lobject.h index d236f7e4..9459c6e6 100644 --- a/VM/src/lobject.h +++ b/VM/src/lobject.h @@ -5,6 +5,8 @@ #include "lua.h" #include "lcommon.h" +LUAU_FASTFLAG(LuauTaggedLuData) + /* ** Union of all collectible objects */ @@ -498,5 +500,3 @@ LUAI_FUNC int luaO_str2d(const char* s, double* result); LUAI_FUNC const char* luaO_pushvfstring(lua_State* L, const char* fmt, va_list argp); LUAI_FUNC const char* luaO_pushfstring(lua_State* L, const char* fmt, ...); LUAI_FUNC const char* luaO_chunkid(char* buf, size_t buflen, const char* source, size_t srclen); - -LUAU_FASTFLAG(TaggedLuData) diff --git a/VM/src/ltm.cpp b/VM/src/ltm.cpp index 3a9fddaa..23369027 100644 --- a/VM/src/ltm.cpp +++ b/VM/src/ltm.cpp @@ -129,7 +129,7 @@ const TString* luaT_objtypenamestr(lua_State* L, const TValue* o) if (ttisstring(type)) return tsvalue(type); } - else if (FFlag::TaggedLuData && ttislightuserdata(o)) + else if (FFlag::LuauTaggedLuData && ttislightuserdata(o)) { int tag = lightuserdatatag(o); diff --git a/VM/src/lvmexecute.cpp b/VM/src/lvmexecute.cpp index 1c77fa14..82d8ea7e 100644 --- a/VM/src/lvmexecute.cpp +++ b/VM/src/lvmexecute.cpp @@ -135,7 +135,7 @@ // Does VM support native execution via ExecutionCallbacks? We mostly assume it does but keep the define to make it easy to quantify the cost. #define VM_HAS_NATIVE 1 -LUAU_FASTFLAGVARIABLE(TaggedLuData, false) +LUAU_FASTFLAGVARIABLE(LuauTaggedLuData, false) LUAU_NOINLINE void luau_callhook(lua_State* L, lua_Hook hook, void* userdata) { @@ -1112,7 +1112,7 @@ reentry: VM_NEXT(); case LUA_TLIGHTUSERDATA: - pc += (pvalue(ra) == pvalue(rb) && (!FFlag::TaggedLuData || lightuserdatatag(ra) == lightuserdatatag(rb))) ? LUAU_INSN_D(insn) : 1; + pc += (pvalue(ra) == pvalue(rb) && (!FFlag::LuauTaggedLuData || lightuserdatatag(ra) == lightuserdatatag(rb))) ? LUAU_INSN_D(insn) : 1; LUAU_ASSERT(unsigned(pc - cl->l.p->code) < unsigned(cl->l.p->sizecode)); VM_NEXT(); @@ -1227,7 +1227,7 @@ reentry: VM_NEXT(); case LUA_TLIGHTUSERDATA: - pc += (pvalue(ra) != pvalue(rb) || (FFlag::TaggedLuData && lightuserdatatag(ra) != lightuserdatatag(rb))) ? LUAU_INSN_D(insn) : 1; + pc += (pvalue(ra) != pvalue(rb) || (FFlag::LuauTaggedLuData && lightuserdatatag(ra) != lightuserdatatag(rb))) ? LUAU_INSN_D(insn) : 1; LUAU_ASSERT(unsigned(pc - cl->l.p->code) < unsigned(cl->l.p->sizecode)); VM_NEXT(); diff --git a/VM/src/lvmutils.cpp b/VM/src/lvmutils.cpp index 851d778c..a2186c5f 100644 --- a/VM/src/lvmutils.cpp +++ b/VM/src/lvmutils.cpp @@ -288,7 +288,7 @@ int luaV_equalval(lua_State* L, const TValue* t1, const TValue* t2) case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); // true must be 1 !! case LUA_TLIGHTUSERDATA: - return pvalue(t1) == pvalue(t2) && (!FFlag::TaggedLuData || lightuserdatatag(t1) == lightuserdatatag(t2)); + return pvalue(t1) == pvalue(t2) && (!FFlag::LuauTaggedLuData || lightuserdatatag(t1) == lightuserdatatag(t2)); case LUA_TUSERDATA: { tm = get_compTM(L, uvalue(t1)->metatable, uvalue(t2)->metatable, TM_EQ); diff --git a/tests/Conformance.test.cpp b/tests/Conformance.test.cpp index b530ce55..978656aa 100644 --- a/tests/Conformance.test.cpp +++ b/tests/Conformance.test.cpp @@ -32,7 +32,7 @@ LUAU_FASTFLAG(LuauBufferDefinitions); LUAU_FASTFLAG(LuauCodeGenFixByteLower); LUAU_FASTFLAG(LuauCompileBufferAnnotation); LUAU_FASTFLAG(LuauLoopInterruptFix); -LUAU_FASTFLAG(TaggedLuData); +LUAU_FASTFLAG(LuauTaggedLuData); LUAU_DYNAMIC_FASTFLAG(LuauStricterUtf8); LUAU_FASTINT(CodegenHeuristicsInstructionLimit); @@ -1703,7 +1703,7 @@ TEST_CASE("UserdataApi") TEST_CASE("LightuserdataApi") { - ScopedFastFlag taggedLuData{FFlag::TaggedLuData, true}; + ScopedFastFlag luauTaggedLuData{FFlag::LuauTaggedLuData, true}; StateRef globalState(luaL_newstate(), lua_close); lua_State* L = globalState.get();