Truly independent web browser
LibJS+LibCrypto: Remove the big integer modulo and its concept
Shannon Booth1441a871286a
diff --git a/Libraries/LibCrypto/Forward.h b/Libraries/LibCrypto/Forward.hdeleted file mode 100644index de7f805d4b5..00000000000--- a/Libraries/LibCrypto/Forward.h+++ /dev/null@@ -1,19 +0,0 @@-/*- * Copyright (c) 2021, the SerenityOS developers.- *- * SPDX-License-Identifier: BSD-2-Clause- */--#pragma once--#include <AK/StdLibExtraDetails.h>--namespace Crypto {--class SignedBigInteger;-class UnsignedBigInteger;--template<typename T>-concept BigInteger = IsSame<T, SignedBigInteger> || IsSame<T, UnsignedBigInteger>;--}diff --git a/Libraries/LibJS/Runtime/AbstractOperations.h b/Libraries/LibJS/Runtime/AbstractOperations.hindex ffafaad7867..281a6fe9d62 100644--- a/Libraries/LibJS/Runtime/AbstractOperations.h+++ b/Libraries/LibJS/Runtime/AbstractOperations.h@@ -14,7 +14,6 @@#include <AK/Span.h>#include <AK/Utf16FlyString.h>#include <AK/Utf16View.h>-#include <LibCrypto/Forward.h>#include <LibGC/Ptr.h>#include <LibGC/RootVector.h>#include <LibJS/Export.h>@@ -126,13 +125,4 @@ auto modulo(T x, U y)}}-auto modulo(Crypto::BigInteger auto const& x, Crypto::BigInteger auto const& y)-{- VERIFY(!y.is_zero());- auto result = x.remainder(y);- if (result.is_negative())- result = result.plus(y);- return result;-}-}diff --git a/Libraries/LibJS/Runtime/Date.h b/Libraries/LibJS/Runtime/Date.hindex b93b95e6ded..54bb1cf176a 100644--- a/Libraries/LibJS/Runtime/Date.h+++ b/Libraries/LibJS/Runtime/Date.h@@ -9,7 +9,6 @@#include <AK/Utf16String.h>#include <AK/Utf16View.h>-#include <LibCrypto/BigInt/SignedBigInteger.h>#include <LibJS/Export.h>#include <LibJS/Runtime/Object.h>#include <LibUnicode/TimeZone.h>diff --git a/Libraries/LibJS/Runtime/VM.h b/Libraries/LibJS/Runtime/VM.hindex 32bdf30fc81..c5834fad25e 100644--- a/Libraries/LibJS/Runtime/VM.h+++ b/Libraries/LibJS/Runtime/VM.h@@ -26,7 +26,6 @@#include <AK/Variant.h>#include <AK/Vector.h>#include <AK/kmalloc.h>-#include <LibCrypto/Forward.h>#include <LibGC/Function.h>#include <LibGC/Heap.h>#include <LibGC/RootHashMap.h>