diff --git a/Libraries/LibJS/AST.cpp b/Libraries/LibJS/AST.cpp index 0313c0aa57..394ff8a9f7 100644 --- a/Libraries/LibJS/AST.cpp +++ b/Libraries/LibJS/AST.cpp @@ -1311,13 +1311,13 @@ Value UpdateExpression::execute(Interpreter& interpreter, GlobalObject& global_o if (old_value.is_number()) new_value = Value(old_value.as_double() + 1); else - new_value = js_bigint(interpreter, old_value.as_bigint().big_integer().plus(Crypto::SignedBigInteger { 1 })); + new_value = js_bigint(interpreter.heap(), old_value.as_bigint().big_integer().plus(Crypto::SignedBigInteger { 1 })); break; case UpdateOp::Decrement: if (old_value.is_number()) new_value = Value(old_value.as_double() - 1); else - new_value = js_bigint(interpreter, old_value.as_bigint().big_integer().minus(Crypto::SignedBigInteger { 1 })); + new_value = js_bigint(interpreter.heap(), old_value.as_bigint().big_integer().minus(Crypto::SignedBigInteger { 1 })); break; default: ASSERT_NOT_REACHED(); @@ -1623,7 +1623,7 @@ Value NumericLiteral::execute(Interpreter&, GlobalObject&) const Value BigIntLiteral::execute(Interpreter& interpreter, GlobalObject&) const { - return js_bigint(interpreter, Crypto::SignedBigInteger::from_base10(m_value.substring(0, m_value.length() - 1))); + return js_bigint(interpreter.heap(), Crypto::SignedBigInteger::from_base10(m_value.substring(0, m_value.length() - 1))); } Value BooleanLiteral::execute(Interpreter&, GlobalObject&) const diff --git a/Libraries/LibJS/Runtime/BigInt.cpp b/Libraries/LibJS/Runtime/BigInt.cpp index 9c7a4a06fd..b2badfce8c 100644 --- a/Libraries/LibJS/Runtime/BigInt.cpp +++ b/Libraries/LibJS/Runtime/BigInt.cpp @@ -45,9 +45,4 @@ BigInt* js_bigint(Heap& heap, Crypto::SignedBigInteger big_integer) return heap.allocate_without_global_object(move(big_integer)); } -BigInt* js_bigint(Interpreter& interpreter, Crypto::SignedBigInteger big_integer) -{ - return js_bigint(interpreter.heap(), move(big_integer)); -} - } diff --git a/Libraries/LibJS/Runtime/BigInt.h b/Libraries/LibJS/Runtime/BigInt.h index 895fb28ee4..0fcc16982d 100644 --- a/Libraries/LibJS/Runtime/BigInt.h +++ b/Libraries/LibJS/Runtime/BigInt.h @@ -47,6 +47,5 @@ private: }; BigInt* js_bigint(Heap&, Crypto::SignedBigInteger); -BigInt* js_bigint(Interpreter&, Crypto::SignedBigInteger); }