From 3b2ec0103892ff0ddb8c74476a006b4f9ce37cc4 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 29 Jan 2022 16:25:20 -0500 Subject: [PATCH] LibJS: Update spec numbers for ECMA-402 Intl.Segmenter is now section 18; bump the "Locale Sensitive Functions". --- Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp | 2 +- Userland/Libraries/LibJS/Runtime/DatePrototype.cpp | 6 +++--- Userland/Libraries/LibJS/Runtime/NumberPrototype.cpp | 2 +- Userland/Libraries/LibJS/Runtime/StringPrototype.cpp | 4 ++-- Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp index 7a7b96a426..3640a69fa8 100644 --- a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp @@ -392,7 +392,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::to_string) return TRY(call(global_object, join_function.as_function(), this_object)); } -// 18.5.1 Array.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-array.prototype.tolocalestring +// 19.5.1 Array.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-array.prototype.tolocalestring JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::to_locale_string) { auto locales = vm.argument(0); diff --git a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp index c2ed435de4..2e7e52df3a 100644 --- a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp @@ -894,7 +894,7 @@ static ThrowCompletionOr construct_date_time_format(Globa } // 21.4.4.38 Date.prototype.toLocaleDateString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-date.prototype.tolocaledatestring -// 18.4.2 Date.prototype.toLocaleDateString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-date.prototype.tolocaledatestring +// 19.4.2 Date.prototype.toLocaleDateString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-date.prototype.tolocaledatestring JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_date_string) { auto locales = vm.argument(0); @@ -919,7 +919,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_date_string) } // 21.4.4.39 Date.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-date.prototype.tolocalestring -// 18.4.1 Date.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-date.prototype.tolocalestring +// 19.4.1 Date.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-date.prototype.tolocalestring JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_string) { auto locales = vm.argument(0); @@ -944,7 +944,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_string) } // 21.4.4.40 Date.prototype.toLocaleTimeString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-date.prototype.tolocaletimestring -// 18.4.3 Date.prototype.toLocaleTimeString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-date.prototype.tolocaletimestring +// 19.4.3 Date.prototype.toLocaleTimeString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-date.prototype.tolocaletimestring JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_locale_time_string) { auto locales = vm.argument(0); diff --git a/Userland/Libraries/LibJS/Runtime/NumberPrototype.cpp b/Userland/Libraries/LibJS/Runtime/NumberPrototype.cpp index 64505754d8..58b79ef83c 100644 --- a/Userland/Libraries/LibJS/Runtime/NumberPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/NumberPrototype.cpp @@ -281,7 +281,7 @@ JS_DEFINE_NATIVE_FUNCTION(NumberPrototype::to_fixed) return js_string(vm, String::formatted("{:0.{1}}", number, static_cast(fraction_digits))); } -// 18.2.1 Number.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-number.prototype.tolocalestring +// 19.2.1 Number.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-number.prototype.tolocalestring JS_DEFINE_NATIVE_FUNCTION(NumberPrototype::to_locale_string) { auto locales = vm.argument(0); diff --git a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp index 0cc985bfa7..b3546af3ec 100644 --- a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp @@ -354,7 +354,7 @@ static ThrowCompletionOr resolve_best_locale(GlobalObject& global_object return locale; } -// 18.1.2 String.prototype.toLocaleLowerCase ( [ locales ] ), https://tc39.es/ecma402/#sup-string.prototype.tolocalelowercase +// 19.1.2 String.prototype.toLocaleLowerCase ( [ locales ] ), https://tc39.es/ecma402/#sup-string.prototype.tolocalelowercase JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_locale_lowercase) { auto string = TRY(ak_string_from(vm, global_object)); @@ -363,7 +363,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_locale_lowercase) return js_string(vm, move(lowercase)); } -// 18.1.3 String.prototype.toLocaleUpperCase ( [ locales ] ), https://tc39.es/ecma402/#sup-string.prototype.tolocaleuppercase +// 19.1.3 String.prototype.toLocaleUpperCase ( [ locales ] ), https://tc39.es/ecma402/#sup-string.prototype.tolocaleuppercase JS_DEFINE_NATIVE_FUNCTION(StringPrototype::to_locale_uppercase) { auto string = TRY(ak_string_from(vm, global_object)); diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp index 0ba83b5e1c..3b660367fc 100644 --- a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp @@ -1290,7 +1290,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::map) } // 23.2.3.29 %TypedArray%.prototype.toLocaleString ( [ reserved1 [ , reserved2 ] ] ), https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring -// 18.5.1 Array.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-array.prototype.tolocalestring +// 19.5.1 Array.prototype.toLocaleString ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sup-array.prototype.tolocalestring JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::to_locale_string) { auto locales = vm.argument(0);