2020-06-06 01:14:10 +01:00
|
|
|
/*
|
2022-12-13 20:49:50 +00:00
|
|
|
* Copyright (c) 2020-2022, Linus Groh <linusg@serenityos.org>
|
2020-06-06 01:14:10 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-06-06 01:14:10 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/BigInt.h>
|
|
|
|
#include <LibJS/Runtime/Object.h>
|
|
|
|
|
|
|
|
namespace JS {
|
|
|
|
|
|
|
|
class BigIntObject final : public Object {
|
2020-06-21 15:14:02 +02:00
|
|
|
JS_OBJECT(BigIntObject, Object);
|
2023-11-19 09:45:05 +01:00
|
|
|
JS_DECLARE_ALLOCATOR(BigIntObject);
|
2020-06-21 15:14:02 +02:00
|
|
|
|
2020-06-06 01:14:10 +01:00
|
|
|
public:
|
2022-12-13 20:49:50 +00:00
|
|
|
static NonnullGCPtr<BigIntObject> create(Realm&, BigInt&);
|
2020-06-06 01:14:10 +01:00
|
|
|
|
2022-03-14 10:25:06 -06:00
|
|
|
virtual ~BigIntObject() override = default;
|
2020-06-06 01:14:10 +01:00
|
|
|
|
2021-10-18 19:44:46 +01:00
|
|
|
BigInt const& bigint() const { return m_bigint; }
|
|
|
|
BigInt& bigint() { return m_bigint; }
|
|
|
|
|
2020-06-06 01:14:10 +01:00
|
|
|
private:
|
2022-08-28 23:51:28 +02:00
|
|
|
BigIntObject(BigInt&, Object& prototype);
|
|
|
|
|
2020-11-28 14:33:36 +01:00
|
|
|
virtual void visit_edges(Visitor&) override;
|
2020-06-06 01:14:10 +01:00
|
|
|
|
2023-02-26 16:09:02 -07:00
|
|
|
NonnullGCPtr<BigInt> m_bigint;
|
2020-06-06 01:14:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|