1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

Everywhere: Hoist the Libraries folder to the top-level

This commit is contained in:
Timothy Flynn 2024-11-09 12:25:08 -05:00 committed by Andreas Kling
parent 950e819ee7
commit 93712b24bf
Notes: github-actions[bot] 2024-11-10 11:51:52 +00:00
4547 changed files with 104 additions and 113 deletions

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2020-2022, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Error.h>
#include <AK/String.h>
#include <AK/StringView.h>
#include <LibCrypto/BigInt/SignedBigInteger.h>
#include <LibJS/Heap/Cell.h>
#include <LibJS/Heap/CellAllocator.h>
namespace JS {
class BigInt final : public Cell {
JS_CELL(BigInt, Cell);
JS_DECLARE_ALLOCATOR(BigInt);
public:
[[nodiscard]] static NonnullGCPtr<BigInt> create(VM&, Crypto::SignedBigInteger);
virtual ~BigInt() override = default;
Crypto::SignedBigInteger const& big_integer() const { return m_big_integer; }
ErrorOr<String> to_string() const;
ByteString to_byte_string() const { return ByteString::formatted("{}n", m_big_integer.to_base_deprecated(10)); }
private:
explicit BigInt(Crypto::SignedBigInteger);
Crypto::SignedBigInteger m_big_integer;
};
ThrowCompletionOr<BigInt*> number_to_bigint(VM&, Value);
}