Timothy Flynn
04bb17ca94
LibJS: Reorganize spec steps for Intl.RelativeTimeFormat
...
This is an editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/a3ae343
2022-03-15 17:30:58 +01:00
Timothy Flynn
8941d0b49e
LibJS: Reorganize spec steps for Intl.PluralRules
...
This is an editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/d7c7157
2022-03-15 17:30:58 +01:00
Timothy Flynn
812d3a7ef8
LibJS: Reorganize spec steps for Intl.NumberFormat
...
This is an editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/110cb1f
2022-03-15 17:30:58 +01:00
Timothy Flynn
d6868d1e9d
LibJS: Reorganize spec steps for Intl.Locale
...
This is an editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/31f6003
2022-03-15 17:30:58 +01:00
Timothy Flynn
6677e03a52
LibJS: Reorganize spec steps for Intl.ListFormat
...
This is an editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/61bc370
2022-03-15 17:30:58 +01:00
Timothy Flynn
72462bed2f
LibJS: Reorganize spec steps for Intl.DisplayNames
...
This is an editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/5b51804
2022-03-15 17:30:58 +01:00
Timothy Flynn
1f9c5c186f
LibJS: Reorganize spec steps for Intl.DateTimeFormat
...
This is an editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/97e1ecc
2022-03-15 17:30:58 +01:00
Timothy Flynn
194ca06f78
LibJS: Reorganize spec steps for Intl.Collator
...
This is an editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/7c13db4
This also normalizes the spelling of the "Internal slots" heading in
Intl.Collator, which is another editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/ec064bd
2022-03-15 17:30:58 +01:00
Timothy Flynn
96459e4b3a
LibJS: Define the Intl.Collator's compare function name to be empty
2022-02-21 16:30:19 +00:00
Idan Horowitz
6558f4ae6b
LibJS: Implement get Intl.Collator.prototype.compare
2022-02-20 22:05:59 -05:00
Idan Horowitz
0bdb293262
LibJS: Add an initial implementation of Collator Compare Functions
...
This commit adds an initial implementation (without any real locale
support) of Collator Compare Functions, as well as the matching
CompareStrings AO. These two are used to implement the ECMA402 version
of String.localeCompare() and Int.Collator.compare().
2022-02-20 22:05:59 -05:00
Timothy Flynn
89ead8c00a
LibJS+LibUnicode: Parse Unicode keywords from the BCP 47 CLDR package
...
We have a fair amount of hard-coded keywords / aliases that can now be
replaced with real data from BCP 47. As a result, the also changes the
awkward way we were previously generating keys. Before, we were more or
less generating keywords as a CSV list of keys, e.g. for the "nu" key,
we'd generate "latn,arab,grek" (ordered by locale preference). Then at
runtime, we'd split on the comma. We now just generate spans of keywords
directly.
2022-02-16 07:23:07 -05:00
Linus Groh
bc183dbbcb
LibJS: Replace uses of MarkedValueList with MarkedVector<Value>
...
This is effectively a drop-in replacement.
2022-02-09 12:25:27 +00:00
Idan Horowitz
2cd3d4a287
LibJS: Implement Intl %SegmentIteratorPrototype%.next ( )
2022-01-31 21:05:04 +02:00
Idan Horowitz
366468f1de
LibJS: Implement Intl %SegmentsPrototype%.containing
2022-01-31 21:05:04 +02:00
Idan Horowitz
96af50bbba
LibJS: Implement the Intl CreateSegmentDataObject AO
2022-01-31 21:05:04 +02:00
Idan Horowitz
cea6c81c77
LibJS: Implement the Intl.Segmenter FindBoundary AO
2022-01-31 21:05:04 +02:00
Idan Horowitz
b1d19b5917
LibJS: Convert Intl.Segmenter, Segments and SegmentIterator to Utf16
...
This is a precursor to implementing the FindBoundary AO, which operates
on Utf16 code unit indexes.
2022-01-31 21:05:04 +02:00
Timothy Flynn
6efbafa6e0
Everywhere: Update copyrights with my new serenityos.org e-mail :^)
2022-01-31 18:23:22 +00:00
Timothy Flynn
fb08a5a896
LibJS: Implement Intl.supportedValuesOf
...
This is a stage 3 ECMA-402 proposal:
https://tc39.es/proposal-intl-enumeration/
2022-01-31 00:32:41 +00:00
Timothy Flynn
a120e85596
LibJS: Provide public access to list of sanctioned unit identifiers
2022-01-31 00:32:41 +00:00
Timothy Flynn
d6e926e5b1
LibJS: Support BigInt number formatting with Intl.NumberFormat
2022-01-30 20:05:27 +00:00
Timothy Flynn
a0253af8c1
LibJS: Generalize Intl.NumberFormat to operate on Value types
...
Intl.NumberFormat is meant to format both Number and BigInt types. To
prepare for formatting BigInt types, this generalizes our NumberFormat
implementation to operate on Value instances rather than doubles. All
arithmetic is moved to static helpers that can now be updated with
BigInt semantics.
2022-01-30 20:05:27 +00:00
Idan Horowitz
4ba4e4c777
LibJS: Implement Intl %SegmentsPrototype%[@@iterator]
2022-01-30 19:47:01 +00:00
Idan Horowitz
6c26a02aa8
LibJS: Start implementing Intl Segment Iterator objects
2022-01-30 19:47:01 +00:00
Idan Horowitz
9001a8cbe1
LibJS: Implement Intl.Segmenter.prototype.segment
2022-01-30 19:47:01 +00:00
Idan Horowitz
bbacea255f
LibJS: Start implementing Intl Segments objects
2022-01-30 19:47:01 +00:00
Idan Horowitz
891dfd9cbb
LibJS: Implement Intl.Segmenter.prototype.resolvedOptions
2022-01-30 19:47:01 +00:00
Idan Horowitz
6b8dfefc20
LibJS: Implement Intl.Segmenter.supportedLocalesOf
2022-01-30 19:47:01 +00:00
Idan Horowitz
a3bc06bb23
LibJS: Start implementing Intl.Segmenter
2022-01-30 19:47:01 +00:00
Timothy Flynn
4a99170cd2
LibJS: Implement Intl.Collator.prototype.resolvedOptions
2022-01-29 20:27:24 +00:00
Timothy Flynn
17306078b5
LibJS: Implement Intl.Collator.supportedLocalesOf
2022-01-29 20:27:24 +00:00
Timothy Flynn
06a6100b12
LibJS: Implement the Intl.Collator constructor
2022-01-29 20:27:24 +00:00
Timothy Flynn
1607a05d4c
LibJS: Add co, kf, and kn Unicode locale keywords to ResolveLocale
2022-01-29 20:27:24 +00:00
Timothy Flynn
4a3e142d55
LibJS: Implement a nearly empty Intl.Collator object
...
This adds plumbing for the Intl.Collator object, constructor, and
prototype.
2022-01-29 20:27:24 +00:00
Timothy Flynn
74939eb943
LibJS: Implement Intl.PluralRules.prototype.resolvedOptions
2022-01-28 19:38:47 +00:00
Timothy Flynn
8b3f49ff84
LibJS: Implement Intl.PluralRules.supportedLocalesOf
2022-01-28 19:38:47 +00:00
Timothy Flynn
348059bffd
LibJS: Implement the Intl.PluralRules constructor
2022-01-28 19:38:47 +00:00
Timothy Flynn
0087804d10
LibJS: Implement a nearly empty Intl.PluralRules object
...
This adds plumbing for the Intl.PluralRules object, constructor, and
prototype.
2022-01-28 19:38:47 +00:00
Timothy Flynn
ac3e42a8de
LibJS: Move some Intl.NumberFormat fields into a NumberFormatBase class
...
Other Intl objects, such as PluralRules, are to be treated as a
NumberFormat object in some AOs. There's only a handful of fields which
are to be shared between those objects - move them to a base class for
shared reuse.
This also updates the couple of NumberFormat AOs that are meant to
operate on these NumberFormat-like objects.
Alternatively, we could just have objects like PluralRules inherit from
NumberFormat directly. But that messes up the is<NumberFormat> runtime
checks, so this feels safer.
2022-01-28 19:38:47 +00:00
Timothy Flynn
a2e791277e
LibJS: Implement Intl.RelativeTimeFormat.prototype.formatToParts
2022-01-27 21:16:44 +00:00
Timothy Flynn
9c5d7e515c
LibJS: Implement Intl.RelativeTimeFormat.prototype.format
2022-01-27 21:16:44 +00:00
Timothy Flynn
8098eb273a
LibJS: Add explicit constructors for PatternPartition
...
This is to enable emplacing this struct in containers. GCC is fine with
emplacing without this constructor, but Clang raises an error.
2022-01-27 21:16:44 +00:00
Timothy Flynn
236fd0a2cb
LibJS: Change RelativeTimeFormat::number_format to return a reference
...
In the one place this will be used, we will know that the NumberFormat
object is non-null. So return a reference, as the AO it is passed off to
also expects a reference.
2022-01-27 21:16:44 +00:00
Timothy Flynn
90e68bca6a
LibJS: Add missing spec link for InitializeRelativeTimeFormat
2022-01-27 21:16:44 +00:00
Timothy Flynn
cf92bc42a2
LibJS: Respect per-locale minimum grouping digits when number formatting
2022-01-27 20:30:52 +00:00
Timothy Flynn
59ca435172
LibJS: Use new construct AO overload where easily applicable
2022-01-25 22:09:13 +00:00
Timothy Flynn
0c630d5687
LibJS: Implement Intl.RelativeTimeFormat.prototype.resolvedOptions
2022-01-25 19:02:59 +00:00
Timothy Flynn
cf166c1d93
LibJS: Implement Intl.RelativeTimeFormat.supportedLocalesOf
2022-01-25 19:02:59 +00:00
Timothy Flynn
a2e31ed736
LibJS: Implement the Intl.RelativeTimeFormat constructor
2022-01-25 19:02:59 +00:00