Linus Groh
b4c6fd51be
LibJS: Use single page spec link for BoundFunctionCreate
2022-04-11 19:44:56 +01:00
Linus Groh
231acda7f8
LibJS: Fix two bogus spec links
2022-04-11 19:44:33 +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
Timothy Flynn
13d05403ff
LibJS: Move DetachArrayBuffer implementation to the ArrayBuffer object
...
The spec notes that this AO is unused by ECMA-262, but is provided for
ECMAScript hosts. Move the definition to a common location to allow
test-js to also use it.
2022-04-08 11:15:16 +01:00
Linus Groh
e109b967a1
LibJS: Make options object const in more Temporal AOs
2022-04-08 00:43:17 +01:00
Linus Groh
2844a2c448
LibJS: Handle undefined options in MergeLargestUnitOption
...
This is an editorial change in the Temporal spec.
See: 5e161a2
2022-04-08 00:43:17 +01:00
Linus Groh
151eb8606d
LibJS: Consistently call observable Temporal AOs with undefined options
...
This is a normative change in the Temporal spec.
See: 6fa5b9d
2022-04-07 12:58:39 +01:00
Timothy Flynn
29b6c22384
LibJS: Reorder and reduce steps of InitializeDateTimeFormat
...
These are editorial changes in the Intl spec. See:
7d0326c
05a299b
8c24ea7
fd8dea9
2022-04-06 20:58:12 -04:00
Timothy Flynn
f3f3e3cdc3
LibJS: Remove outdated FIXME from String.prototype.localeCompare
...
This FIXME was addressed in 0975eba724
.
2022-04-06 20:58:12 -04:00
Linus Groh
421d9a6361
LibJS: Fix typo in a variable name in get_substitution()
2022-04-04 20:35:57 +01:00
Linus Groh
0057d489bd
LibJS: Fix some clang-tidy warnings in Temporal
...
- Remove unused declarations of removed functions
- Remove unused includes
- Declare pointer values as `auto*`
2022-04-04 19:22:58 +01:00
Linus Groh
f0523aa098
LibJS: Use MUST() instead of TRY() for two infallible Temporal AOs
...
These were incorrectly used during the conversion from exception checks
to completions.
2022-04-04 19:04:07 +01:00
Linus Groh
5b48912d35
LibJS: Remove a bunch of gratuitous JS namespace qualifiers
2022-04-03 15:19:33 +01:00
Linus Groh
83e8dfae38
LibJS: Use AK::Time in system_utc_epoch_nanoseconds()
...
This also uses <time.h> APIs internally, but wraps them in a much nicer
interface.
2022-04-03 01:10:31 +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
Idan Horowitz
086969277e
Everywhere: Run clang-format
2022-04-01 21:24:45 +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
cfb04765fa
LibJS: Correct PlainYearMonth arithmetic for non-ISO calendars
...
This is a normative change in the Temporal spec.
See: 61e8dd0
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
Linus Groh
29aa938fa5
LibJS: Fix Duration.compare() for dates with unusual number of hours
...
This is a normative change in the Temporal spec.
See:
- 08bcd53
- e962797
2022-03-31 17:09:10 +01:00
Hendiadyoin1
c79e4961f6
LibJS: Add explicit default copy+move constructors to ThrowCompletionOr
...
This stops clangd from complaining about not being able to determine the
copy-constructibility of ThrowCompletionOr and Completion.
2022-03-31 09:25:17 -04:00
Timothy Flynn
4fd463dae0
LibJS: Normalize mathematical references to negative zero
...
This is an editorial change in the Intl spec. See:
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:
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:
087995c
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:
6939b44
3a775eb
97a7940
129c790
42ec908
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:
8081868
2022-03-30 14:24:32 +01:00
Timothy Flynn
0975eba724
LibJS: Mark an invocation to RequireObjectCoercible as fallible
...
This is an editorial change in the Intl spec. See:
6939b44
2022-03-30 14:24:32 +01:00
Timothy Flynn
36bff95f15
LibJS: Use the new TransformCase AO for locale-aware case conversions
...
This is an editorial change in the Intl spec. See:
6939b44
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:
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:
6804096
6361167
8718171
fd37cb4
00fcfb0
913f832
2022-03-30 14:24:32 +01:00
Linus Groh
68ee193464
LibJS: Check type of ShadowRealm.prototype.importValue() 2nd argument
...
This is a normative change in the ShadowRealm spec.
See: 2b45a15
2022-03-29 23:48:25 +01:00
Linus Groh
f1d744e11a
LibJS: Fix sign in PlainYearMonth.prototype.subtract()
...
This is a normative change in the Temporal spec.
See: 6cf421b
2022-03-29 23:21:17 +01:00
Linus Groh
e4fe60b972
LibJS: Update incorrect spec comment in ToRelativeTemporalObject
...
This is a normative change in the Temporal spec.
See: 4cb192d
2022-03-29 22:56:03 +01:00
Idan Horowitz
9cfbbfd8d8
LibJS: Implement the EnumerateObjectProperties AO
2022-03-29 14:34:08 +03:00
Linus Groh
a5ea066693
LibJS: Fix number types in GetISOPartsFromEpoch
...
This is an editorial change in the Temporal spec.
See: c5b645d
This means we now have to pass a global object and construct a BigInt
object just for the assertion, but oh well. We might want to have an
assertion macro that's optimized away in release builds at a later
point, however.
2022-03-25 18:33:55 +00:00
Linus Groh
9950f06623
LibJS: Update spec comment in BuiltinTimeZoneGetPlainDateTimeFor
...
This is an editorial change in the Temporal spec from a long time ago.
See: e480d40
2022-03-25 18:30:33 +00:00
Linus Groh
ff3256792d
LibJS: Change nanoseconds_to_days() argument from a JS to Crypto BigInt
...
This is an editorial change in the Temporal spec.
See: 0b1346c
2022-03-19 19:28:49 +00:00
Linus Groh
039cb9f189
LibJS: Change nanoseconds_to_days() result from a JS to Crypto BigInt
...
Similar to the preceding commit(s).
2022-03-19 19:28:49 +00:00
Linus Groh
360c65e92b
LibJS: Change balance_duration() nanoseconds from a JS to Crypto BigInt
...
Similar to the preceding commit.
2022-03-19 19:28:49 +00:00
Linus Groh
48856498f0
LibJS: Change total_duration_nanoseconds() from JS to Crypto BigInts
...
This removes a bunch of silly wrapping and unwrapping of Crypto
SignedBigInteger values in JS BigInt objects, which isn't even intended
by the spec - it just wants us to take an integer value, not a BigInt
specifically. Nice opportunity to remove a couple of allocations. :^)
2022-03-19 19:28:49 +00:00
Lenny Maiorani
a0367aa43b
DevTools+LibJS+LibWeb: Change class_name to use StringView
...
This helps make the overall codebase consistent. `class_name()` in
`Kernel` is always `StringView`, but not elsewhere.
Additionally, this results in the `strlen` (which needs to be done
when printing or other operations) always being computed at
compile-time.
2022-03-19 00:20:46 +00:00
Lenny Maiorani
4c5e9f5633
Everywhere: Deduplicate day/month name constants
...
Day and month name constants are defined in numerous places. This
pulls them together into a single place and eliminates the
duplication. It also ensures they are `constexpr`.
2022-03-18 23:48:50 +00:00
Lenny Maiorani
f912a48315
Userland: Change static const variables to static constexpr
...
`static const` variables can be computed and initialized at run-time
during initialization or the first time a function is called. Change
them to `static constexpr` to ensure they are computed at
compile-time.
This allows some removal of `strlen` because the length of the
`StringView` can be used which is pre-computed at compile-time.
2022-03-18 19:58:57 +01:00
Linus Groh
9422ae9bb2
LibJS: Add infallible variant of VM::push_execution_context()
...
It makes no sense to require passing a global object and doing a stack
space check in some cases where running out of stack is highly unlikely,
we can't recover from errors, and currently ignore the result anyway.
This is most commonly in constructors and when setting things up, rather
than regular function calls.
2022-03-18 01:12:12 +01:00
Timothy Flynn
157d16f049
LibJS: Update specification steps for RegExp Match Indices
...
This proposal was implemented in Stage 3 in commit:
6c67de8186
It is now Stage 4 and has been merged into the main ECMA-262 spec:
0209d85
2022-03-17 11:29:51 -04:00
Linus Groh
619794dfa7
LibJS: Fix fraction substring in ParseTimeZoneOffsetString
...
This is a normative change in the Temporal spec.
See:
- 97d553c
- d53af7f
Note that we already implemented this correctly, so the only change is
updating the spec comment.
2022-03-16 21:49:38 +00:00
Linus Groh
356fa2dca1
LibJS: Remove unused code in DifferenceISODate
...
This is an editorial change in the Temporal spec.
See: 056f695
2022-03-16 21:49:38 +00:00
Linus Groh
2ad69d789b
LibJS: Remove the ConstrainToRange AO
...
This is an editorial change in the Temporal spec.
See: 537b3e6
2022-03-16 21:49:38 +00:00
Linus Groh
1521c5f55c
LibJS: Remove argument type assertion from ParseTemporalDurationString
...
This is an editorial change in the Temporal spec.
See: 8615b41
2022-03-16 21:49:38 +00:00