mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-15 12:39:13 +00:00
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:
parent
12dc771186
commit
c87122eb32
Notes:
github-actions[bot]
2025-08-14 08:28:33 +00:00
Author: https://github.com/trflynn89
Commit: c87122eb32
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5845
Reviewed-by: https://github.com/gmta ✅
3 changed files with 7 additions and 2 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue