LibJS: Allow JS::Value to store a non-object Cell

This will allow us to refer to non-object Cells more readily in bytecode
and opens up for some nice optimizations.
This commit is contained in:
Andreas Kling 2025-03-22 11:45:40 -05:00 committed by Andreas Kling
commit 1d88c4529c
Notes: github-actions[bot] 2025-03-22 22:00:41 +00:00

View file

@ -214,6 +214,11 @@ public:
{
}
Value(Cell const* cell)
: Value(GC::IS_CELL_BIT << GC::TAG_SHIFT, reinterpret_cast<void const*>(cell))
{
}
Value(Object const* object)
: Value(OBJECT_TAG << GC::TAG_SHIFT, reinterpret_cast<void const*>(object))
{