2022-10-21 18:33:43 +01:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
|
|
#include "Luau/Def.h"
|
2023-10-20 21:36:26 +01:00
|
|
|
#include "Luau/Common.h"
|
2022-10-21 18:33:43 +01:00
|
|
|
|
|
|
|
namespace Luau
|
|
|
|
{
|
|
|
|
|
2023-10-20 21:36:26 +01:00
|
|
|
bool containsSubscriptedDefinition(DefId def)
|
2022-10-21 18:33:43 +01:00
|
|
|
{
|
2023-10-20 21:36:26 +01:00
|
|
|
if (auto cell = get<Cell>(def))
|
|
|
|
return cell->subscripted;
|
|
|
|
|
|
|
|
LUAU_ASSERT(!"Phi nodes not implemented yet");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
DefId DefArena::freshCell(bool subscripted)
|
|
|
|
{
|
|
|
|
return NotNull{allocator.allocate(Def{Cell{subscripted}})};
|
2022-10-21 18:33:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Luau
|