LibJS: Add a method to stringify a BigInt to UTF-16

And remove the ByteString variant while we are here.
This commit is contained in:
Timothy Flynn 2025-08-07 16:33:10 -04:00 committed by Jelle Raaijmakers
commit c87122eb32
Notes: github-actions[bot] 2025-08-14 08:28:33 +00:00
3 changed files with 7 additions and 2 deletions

View file

@ -103,7 +103,7 @@ static ByteString format_operand(StringView name, Operand operand, Bytecode::Exe
else if (value.is_double())
builder.appendff("Double({})", value.as_double());
else if (value.is_bigint())
builder.appendff("BigInt({})", value.as_bigint().to_byte_string());
builder.appendff("BigInt({})", MUST(value.as_bigint().to_string()));
else if (value.is_string())
builder.appendff("String(\"{}\")", value.as_string().utf8_string_view());
else if (value.is_undefined())