Timothy Flynn
36abcd820d
LibJS: Implement Intl.PluralRules.prototype.select
2022-07-08 11:51:54 +02:00
Timothy Flynn
f11cb7c075
LibJS: Populate pluralCategories in Intl.PluralRules.resolvedOptions
2022-07-08 11:51:54 +02:00
Timothy Flynn
b3deec061e
LibJS: Implement Intl.Locale.prototype.weekInfo property
2022-07-06 16:56:42 +02:00
Timothy Flynn
88a560dd84
LibJS: Implement Intl.Locale.prototype.textInfo property
2022-07-06 16:56:42 +02:00
Timothy Flynn
814f13bc2a
LibJS: Implement Intl.Locale.prototype.timeZones property
2022-07-06 16:56:42 +02:00
Timothy Flynn
f6aa6a480c
LibJS: Implement Intl.Locale.prototype.numberingSystems property
2022-07-06 16:56:42 +02:00
Timothy Flynn
ee2be5895f
LibJS: Implement Intl.Locale.prototype.hourCycles property
2022-07-06 16:56:42 +02:00
Timothy Flynn
4d32f38a76
LibJS: Partially implement Intl.Locale.prototype.collations property
...
We do not yet parse collation data from the CLDR. This stubs out the
collations property, analogous to Intl.supportedValuesOf.
2022-07-06 16:56:42 +02:00
Timothy Flynn
e9bc35d805
LibJS: Implement Intl.Locale.prototype.calendars property
2022-07-06 16:56:42 +02:00
Linus Groh
028a6b90b1
LibJS: Revert partial resizable ArrayBuffer implementation
...
This is a manual but clean revert of all commits from #12595 .
Adding a partial implementation of the resizable ArrayBuffer proposal
without implementing all the updates to TypedArray infrastructure that
is also covered by the spec introduced a bunch of crashes, so we
decided to revert it for now until a full implementation is completed.
2022-07-06 15:52:57 +02:00
Linus Groh
28a3c064c5
LibJS/Tests: Disable one Array.prototype.toSpliced test for now
...
It keeps failing on i686, and will until we've updated a bunch of size_t
APIs in the codebase to u64.
2022-07-04 18:50:35 +02:00
Linus Groh
4b70ddf5a0
LibJS: Let Array.prototype.toSpliced throw RangeError for len <= 2^53-1
...
This aligns it with the spec again, it was clarified that the additional
range check before ArrayCreate is intentional:
https://github.com/tc39/proposal-change-array-by-copy/issues/94
Also cast the final variable to an u64 instead of size_t after we have
determined that it is safe to do so, as that's what Array::create()
takes now.
2022-07-04 10:10:11 +02:00
Obinna Ikeh
5f726ace53
LibJS: Add tests for %TypedArray%.prototype.toReversed
2022-07-03 01:12:32 +02:00
Idan Horowitz
1ebc5af2f0
LibJS: Set both {minimum, maximum}FractionDigits in Intl.DurationFormat
...
This is a normative change in the Intl.DurationFormat spec.
See: b293603e
2022-07-02 18:32:35 +03:00
Idan Horowitz
fb8c4a724e
LibJS: Disallow mixed-sign durations in Intl.DurationFormat
...
This is a normative change in the Intl.DurationFormat spec.
See: 89ab1855
2022-07-02 18:32:35 +03:00
Idan Horowitz
b6b8356c0c
LibJS: Implement Intl.DurationFormat.prototype.formatToParts
2022-07-01 01:00:05 +03:00
Idan Horowitz
706ff5ac83
LibJS: Implement Intl.DurationFormat.prototype.format
2022-07-01 01:00:05 +03:00
Idan Horowitz
d9a4b3e46a
LibJS: Implement Intl.DurationFormat.prototype.resolvedOptions
2022-07-01 01:00:05 +03:00
Idan Horowitz
b20ef7d640
LibJS: Implement Intl.DurationFormat.supportedLocalesOf
2022-07-01 01:00:05 +03:00
Idan Horowitz
97fe37bcc2
LibJS: Start implementing the stage 3 Intl.DurationFormat proposal
2022-07-01 01:00:05 +03:00
Obinna Ikeh
104330d1a0
LibJS: Add tests cases for %TypedArray%.prototype.toSorted function
2022-06-29 13:36:54 +01:00
Linus Groh
3720f4bd8f
LibJS: Fix production for time zone name in time zone strings
...
This is a normative change in the Temporal spec.
See:
- caf013a
- fb7cfa6
2022-06-29 07:35:42 +01:00
Cyber Gsus
f97e664d8f
LibJS: Check for add overflow in DataViewConstructor
...
Use the Checked type from AK to verify that offset + view_byte_length
is buffer_byte_length at most.
2022-06-27 20:51:00 +01:00
Linus Groh
3beb7fc42f
LibJS/Tests: Correct pluralSmallestPluralDisallowedOptions largestUnit
2022-06-24 22:12:03 +01:00
Idan Horowitz
a79796ea4a
LibJS: Implement stage 3 proposal FinalizationRegistry changes
...
Specifically the 'Symbol as WeakMap Keys Proposal'.
2022-06-23 10:57:52 +03:00
Idan Horowitz
53ed8decaf
LibJS: Implement WeakRef changes from 'Symbol as WeakMap Keys Proposal'
2022-06-23 10:57:52 +03:00
Idan Horowitz
dbd0110721
LibJS: Implement WeakSet changes from 'Symbol as WeakMap Keys Proposal'
2022-06-23 10:57:52 +03:00
Idan Horowitz
a80d3fdf49
LibJS: Implement WeakMap changes from 'Symbol as WeakMap Keys Proposal'
2022-06-23 10:57:52 +03:00
Linus Groh
d9fc09c6e5
LibJS/Tests: Remove outdated FIXME
2022-06-17 21:06:01 +01:00
Linus Groh
569c2dc1d0
LibJS: Adjust order of operations in ISO{Date,MonthDay}FromFields
...
This is a normative change in the Temporal spec.
See: 7dd90dc
2022-06-15 17:49:20 +01:00
Linus Groh
e96df3b7a7
LibJS: Leverage PrepareTemporalFields in ToTemporalTimeRecord
...
This is an editorial change in the Temporal spec.
See: b5ba981
2022-06-15 17:49:20 +01:00
Linus Groh
698062b831
LibJS: Implement Array.prototype.with()
2022-06-13 20:26:54 +01:00
Linus Groh
ae81793f20
LibJS: Implement Array.prototype.toSpliced()
2022-06-13 20:26:54 +01:00
Linus Groh
ce17c868c0
LibJS: Implement Array.prototype.toSorted()
2022-06-13 20:26:54 +01:00
Linus Groh
e4370b7d82
LibJS: Implement Array.prototype.toReversed()
2022-06-13 20:26:54 +01:00
Linus Groh
013e2df858
LibJS: Rename Array.prototype.groupBy{,ToMap} => group{,ToMap}
...
This is a normative change in the Array Grouping spec.
See: 0cf4077
2022-06-13 20:05:24 +01:00
Linus Groh
4c77575ec5
LibJS: Simplify Temporal unit AOs
...
This is an editorial change in the Temporal spec.
See: 1b3d018
2022-06-10 12:39:11 +02:00
stelar7
771e3b9868
LibJS: Stub out String.prototype.normalize
2022-06-02 23:04:27 +01:00
Luke Wilde
2b764b3594
LibJS: Remove faulty assertion in BalanceDurationRelative
...
This is an editorial change in the Temporal spec.
See: 66f7464
2022-05-16 20:48:41 +01:00
Linus Groh
51e01b5a80
LibJS: Remove redundant TemporalDateString production
...
This is an editorial change in the Temporal spec.
See: 41a8a5c
2022-05-16 20:28:26 +01:00
Linus Groh
b751f80166
LibJS: Change internal slots of Duration to store mathematical values
...
This is a normative change in the Temporal spec.
See: 1f3fba8
2022-05-08 01:01:32 +02:00
Idan Horowitz
9098257668
LibJS: Reject -00000 as extended year in Date parsing
2022-04-30 21:36:27 +02:00
Timothy Flynn
4d0315099f
LibJS: Allow TypeArray to become detached in TypedArray.prototype.set
...
This is a normative change in the ECMA-262 spec. See:
4d570c4
2022-04-13 16:02:01 +02:00
Linus Groh
00b8ce4a6d
LibJS: Pass this value to fallback func in Array.prototype.toString()
...
The existing code looks innocently correct, implementing the following
step:
3. If IsCallable(func) is false, set func to the intrinsic function
%Object.prototype.toString%.
as
return ObjectPrototype::to_string(vm, global_object);
However, this misses the fact that the next step calls the function with
the previously ToObject()'d this value (`array`):
4. Return ? Call(func, array).
This doesn't happen in the current implementation, which will use the
unaltered this value from the Array.prototype.toString() call, and make
another, unequal object in %Object.prototype.toString%. Since both that
and Array.prototype.toString() do a Get() call on said object, this
behavior is observable (see newly added test).
Fix this by actually doing what the spec says and calling the fallback
function the regular way.
2022-04-12 00:23:27 +01:00
Timothy Flynn
84a81dd466
LibJS: Do not throw a TypeError when sorting a detached TypedArray
...
This is a normative change in the ECMA-262 spec. See:
e0c74e1
2022-04-08 11:15:16 +01:00
Idan Horowitz
59080f441e
LibJS: Normalize NaN values in Sets and Maps
...
This ensures that different NaN types (e.g. 0/0, 0 * Infinity, etc) are
mapped to the same Set/Map entry.
2022-04-02 14:15:43 +01:00
Linus Groh
8e175b4959
LibJS: Adjust ISO8601 representation for years between 1 BCE and 999 CE
...
This is a normative change in the Temporal spec.
See: 39eeecd
2022-03-31 17:09:10 +01:00
Linus Groh
b020b8eea2
LibJS: Handle Etc/GMT timezones properly in TimeZone{IANA,Bracketed}Name
...
This is a normative change in the Temporal spec.
See: 8c73780
2022-03-31 17:09:10 +01:00
Linus Groh
b5392f9e39
LibJS: Emit reference information for { calendarName: "always" } option
...
This is a normative change in the Temporal spec.
See: 4f7519a
2022-03-31 17:09:10 +01:00
Timothy Flynn
f8e7701cf3
LibJS: Disallow calendar display names which contain an underscore
...
This is a normative change in the Intl spec. See:
2703d06
2022-03-30 14:24:32 +01:00