BigIntObject.h 660 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2020-2022, Linus Groh <linusg@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibJS/Runtime/BigInt.h>
  8. #include <LibJS/Runtime/Object.h>
  9. namespace JS {
  10. class BigIntObject final : public Object {
  11. JS_OBJECT(BigIntObject, Object);
  12. public:
  13. static NonnullGCPtr<BigIntObject> create(Realm&, BigInt&);
  14. virtual ~BigIntObject() override = default;
  15. BigInt const& bigint() const { return m_bigint; }
  16. BigInt& bigint() { return m_bigint; }
  17. private:
  18. BigIntObject(BigInt&, Object& prototype);
  19. virtual void visit_edges(Visitor&) override;
  20. NonnullGCPtr<BigInt> m_bigint;
  21. };
  22. }