LibJS: Replace some use of ByteString with String

1.19x speedup on MicroBench/for-in-indexed-properties.js
This commit is contained in:
Andreas Kling 2025-05-02 14:16:21 +02:00 committed by Andreas Kling
parent 2ef2e75cdc
commit 0ef6444824
Notes: github-actions[bot] 2025-05-03 06:08:59 +00:00
3 changed files with 29 additions and 29 deletions

View file

@ -57,7 +57,7 @@ static Value property_key_to_value(VM& vm, PropertyKey const& property_key)
return PrimitiveString::create(vm, property_key.as_string());
VERIFY(property_key.is_number());
return PrimitiveString::create(vm, ByteString::number(property_key.as_number()));
return PrimitiveString::create(vm, String::number(property_key.as_number()));
}
// 10.5.1 [[GetPrototypeOf]] ( ), https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof