2020-06-05 21:14:10 -03:00
|
|
|
/*
|
2021-04-22 17:51:19 -03:00
|
|
|
* Copyright (c) 2020, Linus Groh <linusg@serenityos.org>
|
2020-06-05 21:14:10 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-06-05 21:14:10 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/BigIntObject.h>
|
|
|
|
|
#include <LibJS/Runtime/GlobalObject.h>
|
|
|
|
|
|
|
|
|
|
namespace JS {
|
|
|
|
|
|
|
|
|
|
BigIntObject* BigIntObject::create(GlobalObject& global_object, BigInt& bigint)
|
|
|
|
|
{
|
2020-06-20 10:40:48 -03:00
|
|
|
return global_object.heap().allocate<BigIntObject>(global_object, bigint, *global_object.bigint_prototype());
|
2020-06-05 21:14:10 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BigIntObject::BigIntObject(BigInt& bigint, Object& prototype)
|
2020-06-23 12:21:53 -03:00
|
|
|
: Object(prototype)
|
2020-06-05 21:14:10 -03:00
|
|
|
, m_bigint(bigint)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BigIntObject::~BigIntObject()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-28 10:33:36 -03:00
|
|
|
void BigIntObject::visit_edges(Cell::Visitor& visitor)
|
2020-06-05 21:14:10 -03:00
|
|
|
{
|
2021-09-11 09:05:12 -03:00
|
|
|
Base::visit_edges(visitor);
|
2020-06-05 21:14:10 -03:00
|
|
|
visitor.visit(&m_bigint);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|