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
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/BigInt.h>
|
|
|
|
|
#include <LibJS/Runtime/Object.h>
|
|
|
|
|
|
|
|
|
|
namespace JS {
|
|
|
|
|
|
|
|
|
|
class BigIntObject final : public Object {
|
2020-06-21 10:14:02 -03:00
|
|
|
JS_OBJECT(BigIntObject, Object);
|
|
|
|
|
|
2020-06-05 21:14:10 -03:00
|
|
|
public:
|
2022-08-15 20:20:49 -03:00
|
|
|
static BigIntObject* create(Realm&, BigInt&);
|
2020-06-05 21:14:10 -03:00
|
|
|
|
2022-03-14 13:25:06 -03:00
|
|
|
virtual ~BigIntObject() override = default;
|
2020-06-05 21:14:10 -03:00
|
|
|
|
2021-10-18 15:44:46 -03:00
|
|
|
BigInt const& bigint() const { return m_bigint; }
|
|
|
|
|
BigInt& bigint() { return m_bigint; }
|
|
|
|
|
|
2020-06-05 21:14:10 -03:00
|
|
|
private:
|
2022-08-28 18:51:28 -03:00
|
|
|
BigIntObject(BigInt&, Object& prototype);
|
|
|
|
|
|
2020-11-28 10:33:36 -03:00
|
|
|
virtual void visit_edges(Visitor&) override;
|
2020-06-05 21:14:10 -03:00
|
|
|
|
|
|
|
|
BigInt& m_bigint;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|