mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 22:35:43 +08:00
transplant game engine fix for memory safety issues in normalization into OSS changes
This commit is contained in:
parent
0f1973954c
commit
5aa6d99340
@ -2631,6 +2631,9 @@ struct TypeChecker2
|
|||||||
for (const auto& [ty, _negations] : norm->classes.classes)
|
for (const auto& [ty, _negations] : norm->classes.classes)
|
||||||
{
|
{
|
||||||
fetch(ty);
|
fetch(ty);
|
||||||
|
|
||||||
|
if (!normValid)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2644,9 +2647,16 @@ struct TypeChecker2
|
|||||||
fetch(builtinTypes->stringType);
|
fetch(builtinTypes->stringType);
|
||||||
if (normValid)
|
if (normValid)
|
||||||
fetch(norm->threads);
|
fetch(norm->threads);
|
||||||
for (TypeId ty : norm->tables)
|
if (normValid)
|
||||||
if (normValid)
|
{
|
||||||
|
for (TypeId ty : norm->tables)
|
||||||
|
{
|
||||||
fetch(ty);
|
fetch(ty);
|
||||||
|
|
||||||
|
if (!normValid)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (normValid && norm->functions.isTop)
|
if (normValid && norm->functions.isTop)
|
||||||
fetch(builtinTypes->functionType);
|
fetch(builtinTypes->functionType);
|
||||||
else if (normValid && !norm->functions.isNever())
|
else if (normValid && !norm->functions.isNever())
|
||||||
@ -2672,6 +2682,9 @@ struct TypeChecker2
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
fetch(tyvar);
|
fetch(tyvar);
|
||||||
|
|
||||||
|
if (!normValid)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user