1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 11:55:08 +00:00

LibJS: Remove js_bigint(Interpreter&, ...)

This commit is contained in:
Andreas Kling 2020-09-27 20:00:38 +02:00
parent a61ede51e2
commit adf0a537af
3 changed files with 3 additions and 9 deletions

View file

@ -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