LibJS: Update spec numbers for the Intl.DurationFormat proposal

This proposal has reached stage 4 and was merged into the ECMA-402 spec.
See: 3ff3cc7
This commit is contained in:
Timothy Flynn 2025-02-28 08:54:42 -05:00 committed by Andreas Kling
commit 5764eeab05
Notes: github-actions[bot] 2025-03-01 13:50:56 +00:00
38 changed files with 208 additions and 220 deletions

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2022, Idan Horowitz <idan.horowitz@serenityos.org>
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
* Copyright (c) 2023-2025, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -13,13 +13,13 @@ namespace JS::Intl {
GC_DEFINE_ALLOCATOR(Segmenter);
// 18 Segmenter Objects, https://tc39.es/ecma402/#segmenter-objects
// 19 Segmenter Objects, https://tc39.es/ecma402/#segmenter-objects
Segmenter::Segmenter(Object& prototype)
: Object(ConstructWithPrototypeTag::Tag, prototype)
{
}
// 18.7.1 CreateSegmentDataObject ( segmenter, string, startIndex, endIndex ), https://tc39.es/ecma402/#sec-createsegmentdataobject
// 19.7.1 CreateSegmentDataObject ( segmenter, string, startIndex, endIndex ), https://tc39.es/ecma402/#sec-createsegmentdataobject
ThrowCompletionOr<GC::Ref<Object>> create_segment_data_object(VM& vm, Unicode::Segmenter const& segmenter, Utf16View const& string, size_t start_index, size_t end_index)
{
auto& realm = *vm.current_realm();
@ -67,7 +67,7 @@ ThrowCompletionOr<GC::Ref<Object>> create_segment_data_object(VM& vm, Unicode::S
return result;
}
// 18.8.1 FindBoundary ( segmenter, string, startIndex, direction ), https://tc39.es/ecma402/#sec-findboundary
// 19.8.1 FindBoundary ( segmenter, string, startIndex, direction ), https://tc39.es/ecma402/#sec-findboundary
size_t find_boundary(Unicode::Segmenter& segmenter, Utf16View const& string, size_t start_index, Direction direction)
{
// 1. Let len be the length of string.