diff --git a/VM/src/ldebug.cpp b/VM/src/ldebug.cpp index 44da57c2b..2f53f4d3e 100644 --- a/VM/src/ldebug.cpp +++ b/VM/src/ldebug.cpp @@ -12,6 +12,8 @@ #include #include +LUAU_FASTFLAGVARIABLE(LuauActivationRecordStopDeadnaming) + static const char* getfuncname(Closure* f); static int currentpc(lua_State* L, CallInfo* ci) @@ -121,7 +123,10 @@ static Closure* auxgetinfo(lua_State* L, const char* what, lua_Debug* ar, Closur { TString* source = f->l.p->source; ar->source = getstr(source); - ar->what = "Lua"; + if (FFlag::LuauActivationRecordStopDeadnaming) + ar->what = "Luau"; + else + ar->what = "Lua"; ar->linedefined = f->l.p->linedefined; ar->short_src = luaO_chunkid(ar->ssbuf, sizeof(ar->ssbuf), getstr(source), source->len); } diff --git a/tests/Conformance.test.cpp b/tests/Conformance.test.cpp index 04a996f6b..f60b04052 100644 --- a/tests/Conformance.test.cpp +++ b/tests/Conformance.test.cpp @@ -46,6 +46,7 @@ LUAU_FASTFLAG(LuauMathIsNanInfFinite) LUAU_FASTFLAG(LuauCompileMathIsNanInfFinite) LUAU_FASTFLAG(LuauTypeCheckerMathIsNanInfFinite) LUAU_FASTFLAG(LuauCodegenChainedSpills) +LUAU_FASTFLAG(LuauActivationRecordStopDeadnaming) static lua_CompileOptions defaultOptions() { @@ -2499,11 +2500,14 @@ TEST_CASE("IfElseExpression") // Optionally returns debug info for the first Luau stack frame that is encountered on the callstack. static std::optional getFirstLuauFrameDebugInfo(lua_State* L) { - static std::string_view kLua = "Lua"; + static std::string_view kLuau = "Lua"; + if (FFlag::LuauActivationRecordStopDeadnaming) + kLuau = "Luau"; + lua_Debug ar; for (int i = 0; lua_getinfo(L, i, "sl", &ar); i++) { - if (kLua == ar.what) + if (kLuau == ar.what) return ar; } return std::nullopt;