Update Temporal implementation for Duration normalization, part 2
Categories
(Core :: JavaScript: Standard Library, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox127 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(38 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
Bug 1874684 - Part 19: Fix simplify bool-return warnings from clang-tidy. r=#spidermonkey-reviewers!
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Update Temporal for the changes from https://github.com/tc39/proposal-temporal/pull/2727.
| Assignee | ||
Comment 1•2 years ago
|
||
Division operations in Temporal will soon be limited to int128 values. Introduce
Int128 and Uint128 to avoid BigInt allocations for these divisions.
Int128 and Uint128 are both implemented as a pair of uint64_t values. All
basic algorithmic operations are supported. Non-trivial operations were
implemented using the algorithms described in Hacker's Delight, except for
Uint128::toDouble() which was implemented by copying and then adjusting the
code for BigInt::numberValue().
| Assignee | ||
Comment 2•2 years ago
|
||
Changes from the two commits:
- Normative: Limit time portion of durations to <2⁵³ seconds
- Editorial?: Use normalized time duration in operations
The "Use normalized time duration in operations" commit changes many operations
to use NormalizedTimeDuration instead of Duration. This is a massiv change,
but also allows to remove all BigInt code when extended precision was needed.
Depends on D198534
| Assignee | ||
Comment 3•2 years ago
|
||
Depends on D198535
| Assignee | ||
Comment 4•2 years ago
|
||
Consistently use const references instead of sometimes copying Instant values.
Depends on D198536
| Assignee | ||
Comment 5•2 years ago
|
||
This matches other methods and makes the code a bit smaller.
Depends on D198537
| Assignee | ||
Comment 6•2 years ago
|
||
Changes from:
- <commit> here
This also allows to change NormalizedTimeAndDays::{time,dayLength} to use
int64_t values instead of NormalizedTimeDuration.
Depends on D198538
| Assignee | ||
Comment 7•2 years ago
|
||
Changes from:
- <commit>
Depends on D198539
| Assignee | ||
Comment 8•2 years ago
|
||
The previous changes make it possible to switch most TimeDuration fields to
use int64_t instead of double.
Depends on D198541
| Assignee | ||
Comment 9•2 years ago
|
||
Similar to previous part, prefer int64_t rather than double for DateDuration.
Depends on D198542
| Assignee | ||
Comment 10•2 years ago
|
||
Use Int128 instead of BigInt in RoundNumberToIncrement to avoid duplicated
code for the BigInt code path.
Depends on D198543
| Assignee | ||
Comment 11•2 years ago
|
||
The value restrictions from the previous parts allow to remove the BigInt code
paths from TemporalDurationToString.
Depends on D198544
| Assignee | ||
Comment 12•2 years ago
|
||
This reduces the differences between the spec and the implementation, so
we have fewer steps which are annotated with "Not applicable in our implementation".
Depends on D198545
| Assignee | ||
Comment 13•2 years ago
|
||
Prefer DateDuration to avoid unnecessary DateDuration -> Duration -> DateDuration conversions.
Depends on D198546
| Assignee | ||
Comment 14•2 years ago
|
||
Similar to the previous part, prefer DateDuration to avoid unnecessary
int64_t -> double -> int64_t conversions.
Depends on D198547
| Assignee | ||
Comment 15•2 years ago
|
||
Switch to int64_t to avoid some unnecessary int64_t -> double -> int64_t conversions.
Depends on D198548
| Assignee | ||
Comment 16•2 years ago
|
||
Depends on D198549
| Assignee | ||
Comment 17•2 years ago
|
||
Depends on D198550
| Assignee | ||
Comment 18•2 years ago
|
||
Depends on D198551
| Assignee | ||
Comment 19•2 years ago
|
||
Depends on D198552
| Assignee | ||
Comment 20•2 years ago
|
||
Depends on D198553
| Assignee | ||
Comment 21•2 years ago
|
||
Depends on D198554
| Assignee | ||
Comment 22•2 years ago
|
||
Required to pass the tests from https://github.com/tc39/test262/pull/3978.
Depends on D198555
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 23•2 years ago
|
||
Changes from:
- https://github.com/tc39/proposal-temporal/commit/3a7b3272420a239eda204e30b510bc69f9febbde
- https://github.com/tc39/proposal-temporal/commit/0cd94ebdd6700e4a5d407ae62a6d510b609fabe4
- https://github.com/tc39/proposal-temporal/commit/02e28d43d01263ad570951089889e1ef95a49baf
- https://github.com/tc39/proposal-temporal/commit/3c6072652aec57fa3523c34120f569a91ee2b8fb
- https://github.com/tc39/proposal-temporal/commit/a59d180bb9ce6292a0f02372f75143c7f961a7dc
- https://github.com/tc39/proposal-temporal/commit/1e6f2bb470cc352d1b03da936c197554fec443b2
- https://github.com/tc39/proposal-temporal/commit/42eca97e3a223fc317794fecf7d05c2c4902bf5b
- https://github.com/tc39/proposal-temporal/commit/c4b17d87f54a985dadd4bf0baf3d7b8956c09d2d
- https://github.com/tc39/proposal-temporal/commit/4d612417e7bf70b767a8138eea3fd56bd5d55927
- https://github.com/tc39/proposal-temporal/commit/5b1c732f37a9673594567b194d8d311a2bf3cdbf
- https://github.com/tc39/proposal-temporal/commit/ae85b3c695b7a93c39e9704ce751d36a5c01a1ca
- https://github.com/tc39/proposal-temporal/commit/de5b7ea045a3980eeadd280b33ad520383fb5578
- https://github.com/tc39/proposal-temporal/commit/652ecdd7d059cdd09c1e16e674af19a45fd83e54
- https://github.com/tc39/proposal-temporal/commit/85bf0275ad4f1a8d7f8554a038527161e481a062
- https://github.com/tc39/proposal-temporal/commit/2bdf565cf2b66ef1aabcb6184a8c9e37cd90e425
Depends on D198556
| Assignee | ||
Comment 24•2 years ago
|
||
Changes from:
https://github.com/tc39/proposal-temporal/commit/5e723bb6899a9378bff99ddccc9e06110e1774cf
Depends on D204387
| Assignee | ||
Comment 25•2 years ago
|
||
Changes from:
- https://github.com/tc39/proposal-temporal/commit/b3e2fba5f749d623177c2451e933d16c8b44f357
- https://github.com/tc39/proposal-temporal/commit/307aeee38dcb554913b93a9c35b4b4f4ecfc9f23
- https://github.com/tc39/proposal-temporal/commit/c5ad0c88be7178a9e41ef14b0009a8109117b9e7
- https://github.com/tc39/proposal-temporal/commit/61b6df0c90d0f20985d0e849cf6fa3eaf6301b42
- https://github.com/tc39/proposal-temporal/commit/11a383a9ff64d9778a84bd943b6e8615613fe972
- https://github.com/tc39/proposal-temporal/commit/452b5ac451ccad6234a1a9ddc1cf4a814062cd1b
- https://github.com/tc39/proposal-temporal/commit/a3ef6ce08e9e9607a76506fed43c85fe6b828999
- https://github.com/tc39/proposal-temporal/commit/6d152d19fcf69ca04e91adc81a42d25f5555ede4
Depends on D204388
| Assignee | ||
Comment 26•2 years ago
|
||
Changes from:
Depends on D204389
| Assignee | ||
Comment 27•2 years ago
|
||
epochDays is only used in debug-assertions.
Depends on D204390
| Assignee | ||
Comment 28•2 years ago
|
||
Callers of DifferenceISODateTime only need the date-duration part.
Depends on D204391
| Assignee | ||
Comment 29•2 years ago
|
||
Add/Remove fix-me notes about spec issues.
Depends on D204392
| Assignee | ||
Comment 30•2 years ago
|
||
BalanceTimeDuration is fallible, cf. https://github.com/tc39/proposal-temporal/issues/2785.
Depends on D204393
| Assignee | ||
Comment 31•2 years ago
|
||
Some RoundDuration calls were incorrectly treated as infallible.
Depends on D204394
| Assignee | ||
Comment 32•2 years ago
|
||
Move the DefineDataProperty call into the CalendarDateUntilSlow slow-path.
Depends on D204395
| Assignee | ||
Comment 33•2 years ago
|
||
Move the options object allocation into CalendarDateFromFields. Also filed a
spec issue about removing the options object allocation from the spec.
Depends on D204396
| Assignee | ||
Comment 34•2 years ago
|
||
Move the PlainDateObject allocation into the CalendarDateUntilSlow slow path.
Depends on D204397
| Assignee | ||
Comment 35•2 years ago
|
||
CalendarDateUntil only care about the date-duration parts.
Depends on D204398
| Assignee | ||
Comment 36•2 years ago
|
||
Add a AddDate overload which can be called with a DateDuration.
Depends on D204399
| Assignee | ||
Comment 37•2 years ago
|
||
Fix unified compilation when FILES_PER_UNIFIED_FILE is set to a larger value.
Depends on D204400
| Assignee | ||
Comment 38•2 years ago
|
||
Drive-by fix:
- Move exclusions into the correct section.
Depends on D204401
Comment 39•1 year ago
|
||
Comment 40•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b02a78c0db03
https://hg.mozilla.org/mozilla-central/rev/bb9cad9d5457
https://hg.mozilla.org/mozilla-central/rev/adece94b6cd5
https://hg.mozilla.org/mozilla-central/rev/2434d6217427
https://hg.mozilla.org/mozilla-central/rev/6c39d283c5ba
https://hg.mozilla.org/mozilla-central/rev/50c1e95cd589
https://hg.mozilla.org/mozilla-central/rev/c85519789ab4
https://hg.mozilla.org/mozilla-central/rev/1e18f460744f
https://hg.mozilla.org/mozilla-central/rev/55bd9a447858
https://hg.mozilla.org/mozilla-central/rev/87bc0f5d7800
https://hg.mozilla.org/mozilla-central/rev/76c0db2530fc
https://hg.mozilla.org/mozilla-central/rev/ee087036bfde
https://hg.mozilla.org/mozilla-central/rev/b0d05a8b8e22
https://hg.mozilla.org/mozilla-central/rev/5afebcb036e1
https://hg.mozilla.org/mozilla-central/rev/9b6b98d5fead
https://hg.mozilla.org/mozilla-central/rev/a0a290e457e9
https://hg.mozilla.org/mozilla-central/rev/e820dca92042
https://hg.mozilla.org/mozilla-central/rev/61e7759827c2
https://hg.mozilla.org/mozilla-central/rev/56187d5fb5f9
https://hg.mozilla.org/mozilla-central/rev/a07feca4e7ae
https://hg.mozilla.org/mozilla-central/rev/692afcdee786
https://hg.mozilla.org/mozilla-central/rev/8f7571c34491
https://hg.mozilla.org/mozilla-central/rev/c74cb3d432e4
https://hg.mozilla.org/mozilla-central/rev/2b81b1c6fe87
https://hg.mozilla.org/mozilla-central/rev/3b5ac166e3a7
https://hg.mozilla.org/mozilla-central/rev/6e19977bc705
https://hg.mozilla.org/mozilla-central/rev/0f8568982d17
https://hg.mozilla.org/mozilla-central/rev/d6e5a4455a39
https://hg.mozilla.org/mozilla-central/rev/4b588f331ab3
https://hg.mozilla.org/mozilla-central/rev/3e5f57928b39
https://hg.mozilla.org/mozilla-central/rev/cb3bd9361fa4
https://hg.mozilla.org/mozilla-central/rev/6ec0be1f4d48
https://hg.mozilla.org/mozilla-central/rev/3298e3f5d4a3
https://hg.mozilla.org/mozilla-central/rev/387995a61693
https://hg.mozilla.org/mozilla-central/rev/572a85726123
https://hg.mozilla.org/mozilla-central/rev/f4db6404bf94
https://hg.mozilla.org/mozilla-central/rev/09c240f8a039
https://hg.mozilla.org/mozilla-central/rev/7918b3068b6c
Description
•