2022-10-21 18:54:01 +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"
|
|
|
|
|
|
|
|
namespace Luau
|
|
|
|
{
|
|
|
|
|
2022-12-02 18:09:59 +00:00
|
|
|
DefId DefArena::freshCell()
|
2022-10-21 18:54:01 +01:00
|
|
|
{
|
2022-12-02 18:09:59 +00:00
|
|
|
return NotNull{allocator.allocate<Def>(Def{Cell{std::nullopt}})};
|
|
|
|
}
|
|
|
|
|
|
|
|
DefId DefArena::freshCell(DefId parent, const std::string& prop)
|
|
|
|
{
|
|
|
|
return NotNull{allocator.allocate<Def>(Def{Cell{FieldMetadata{parent, prop}}})};
|
2022-10-21 18:54:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Luau
|