LibJS: Make Value inherit from a NanBoxedValue

NanBoxedValue is intended to be a GC-allocatable type which is not
specific to javascript, towards the effort of factoring out the GC
implementation from LibJS.
This commit is contained in:
Shannon Booth 2024-11-14 19:40:36 +13:00 committed by Andreas Kling
commit 0bf2a8362a
Notes: github-actions[bot] 2024-11-14 14:39:52 +00:00
6 changed files with 132 additions and 108 deletions

View file

@ -6,7 +6,7 @@
#include <LibJS/Heap/Cell.h>
#include <LibJS/Heap/Heap.h>
#include <LibJS/Runtime/Value.h>
#include <LibJS/Heap/NanBoxedValue.h>
namespace JS {
@ -14,7 +14,7 @@ void JS::Cell::initialize(JS::Realm&)
{
}
void JS::Cell::Visitor::visit(JS::Value value)
void JS::Cell::Visitor::visit(NanBoxedValue const& value)
{
if (value.is_cell())
visit_impl(value.as_cell());