ladybird/Userland/Libraries/LibJS/Runtime/BigInt.cpp

29 lines
548 B
C++
Raw Normal View History

2020-06-06 01:14:10 +01:00
/*
* Copyright (c) 2020, Linus Groh <linusg@serenityos.org>
2020-06-06 01:14:10 +01:00
*
* SPDX-License-Identifier: BSD-2-Clause
2020-06-06 01:14:10 +01:00
*/
#include <LibCrypto/BigInt/SignedBigInteger.h>
#include <LibJS/Heap/Heap.h>
2020-06-06 01:14:10 +01:00
#include <LibJS/Runtime/BigInt.h>
namespace JS {
BigInt::BigInt(Crypto::SignedBigInteger big_integer)
: m_big_integer(move(big_integer))
{
VERIFY(!m_big_integer.is_invalid());
2020-06-06 01:14:10 +01:00
}
BigInt::~BigInt()
{
}
BigInt* js_bigint(Heap& heap, Crypto::SignedBigInteger big_integer)
{
return heap.allocate_without_global_object<BigInt>(move(big_integer));
2020-06-06 01:14:10 +01:00
}
}