mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibJS: Remove js_bigint(Interpreter&, ...)
This commit is contained in:
parent
a61ede51e2
commit
adf0a537af
Notes:
sideshowbarker
2024-07-19 02:10:13 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/adf0a537aff
3 changed files with 3 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -45,9 +45,4 @@ BigInt* js_bigint(Heap& heap, Crypto::SignedBigInteger big_integer)
|
|||
return heap.allocate_without_global_object<BigInt>(move(big_integer));
|
||||
}
|
||||
|
||||
BigInt* js_bigint(Interpreter& interpreter, Crypto::SignedBigInteger big_integer)
|
||||
{
|
||||
return js_bigint(interpreter.heap(), move(big_integer));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -47,6 +47,5 @@ private:
|
|||
};
|
||||
|
||||
BigInt* js_bigint(Heap&, Crypto::SignedBigInteger);
|
||||
BigInt* js_bigint(Interpreter&, Crypto::SignedBigInteger);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue