Timothy Flynn
29b6c22384
LibJS: Reorder and reduce steps of InitializeDateTimeFormat
...
These are editorial changes in the Intl spec. See:
https://github.com/tc39/ecma402/commit/7d0326c
https://github.com/tc39/ecma402/commit/05a299b
https://github.com/tc39/ecma402/commit/8c24ea7
https://github.com/tc39/ecma402/commit/fd8dea9
2022-04-06 20:58:12 -04:00
Linus Groh
5b48912d35
LibJS: Remove a bunch of gratuitous JS namespace qualifiers
2022-04-03 15:19:33 +01:00
Timothy Flynn
4fd463dae0
LibJS: Normalize mathematical references to negative zero
...
This is an editorial change in the Intl spec. See:
https://github.com/tc39/ecma402/commit/d4be24e
2022-03-30 14:24:32 +01:00
Timothy Flynn
41df4c6353
LibJS: Modernize InitializeDateTimeFormat and simplify error handling
...
This is an editorial change in the Intl spec. See:
https://github.com/tc39/ecma402/commit/4cf1d2c
2022-03-30 14:24:32 +01:00
Timothy Flynn
066352c9aa
LibJS+LibUnicode: Align ECMA-402 "sanctioned" terminology with UTS 35
...
This is an editorial change in the Intl spec. See:
https://github.com/tc39/ecma402/commit/087995c
https://github.com/tc39/ecma402/commit/233d29c
This also adds a missing spec link for the sanctioned units and fixes a
broken spec link for IsSanctionedSingleUnitIdentifier. In LibUnicode,
the NumberFormat generator is updated to use the constexpr helper to
retrieve sanctioned units.
2022-03-30 14:24:32 +01:00
Timothy Flynn
1a76839e8d
LibJS: Use consistent ASCII case-transformation and string language
...
Also update the incorrect spec link for IsWellFormedCurrencyCode.
These are editorial changes in the Intl spec. See:
https://github.com/tc39/ecma402/commit/6939b44
https://github.com/tc39/ecma402/commit/3a775eb
https://github.com/tc39/ecma402/commit/97a7940
https://github.com/tc39/ecma402/commit/129c790
https://github.com/tc39/ecma402/commit/42ec908
https://github.com/tc39/ecma402/commit/ea25c36
2022-03-30 14:24:32 +01:00
Timothy Flynn
72674d7905
LibJS: Set DateTimeFormat's [[HourCycle]] internal slot only once
...
This is an editorial change in the Intl spec. See:
https://github.com/tc39/ecma402/commit/8081868
2022-03-30 14:24:32 +01:00
Timothy Flynn
f8e7701cf3
LibJS: Disallow calendar display names which contain an underscore
...
This is a normative change in the Intl spec. See:
https://github.com/tc39/ecma402/commit/2703d06
2022-03-30 14:24:32 +01:00
Timothy Flynn
7c41e6058a
LibJS: Explicitly indicate infallible incovations
...
These are editorial changes in the Intl spec.
See:
https://github.com/tc39/ecma402/commit/6804096
https://github.com/tc39/ecma402/commit/6361167
https://github.com/tc39/ecma402/commit/8718171
https://github.com/tc39/ecma402/commit/fd37cb4
https://github.com/tc39/ecma402/commit/00fcfb0
https://github.com/tc39/ecma402/commit/913f832
2022-03-30 14:24:32 +01:00
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