Temporal: Remove calendars and time zones
Categories
(Core :: JavaScript: Standard Library, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox133 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(63 external files)
Implement the spec updates from https://github.com/tc39/proposal-temporal/commit/b889242067a7bc1d3a433ec9fa7149a72c18a533.
| Assignee | ||
Comment 1•2 years ago
|
||
Request for test262 coverage: https://github.com/tc39/test262/issues/4237
| Assignee | ||
Comment 2•2 years ago
|
||
Update step references to match editorial changes from:
https://github.com/tc39/proposal-temporal/commit/76440bfa7bf62bdb85bb17a8a046a2c9d916dd66
https://github.com/tc39/proposal-temporal/commit/7eaf609975f78f5525711843931f1f62f5332e34
https://github.com/tc39/proposal-temporal/commit/1d9c564006d3251f175373bd6cb6ad46bd08b486
https://github.com/tc39/proposal-temporal/commit/ad3b688e562c4617ac8db5a9f39b9d897af922a9
https://github.com/tc39/proposal-temporal/commit/ff8659f9f90fd2bcc227e5149adbaf0ea6ac4ab1
https://github.com/tc39/proposal-temporal/commit/fbbd540e8c412e870ec57bb6335a3168bfdc6f41
| Assignee | ||
Comment 3•2 years ago
|
||
| Assignee | ||
Comment 4•2 years ago
|
||
| Assignee | ||
Comment 5•2 years ago
|
||
| Assignee | ||
Comment 6•2 years ago
|
||
| Assignee | ||
Comment 7•2 years ago
|
||
As a first step remove the Calendar and TimeZone properties from the
Temporal object. Actual code removal happens in later patches.
| Assignee | ||
Comment 8•2 years ago
|
||
The only supported object is Temporal.ZonedDateTime.
Part of https://github.com/tc39/proposal-temporal/commit/b889242067a7bc1d3a433ec9fa7149a72c18a533.
| Assignee | ||
Comment 9•2 years ago
|
||
| Assignee | ||
Comment 10•2 years ago
|
||
The previous two parts removed all references to TimeZoneObject, so we can
now remove that class and all of Temporal.TimeZone.
| Assignee | ||
Comment 11•2 years ago
|
||
Merge TimeZoneObjectMaybeBuiltin with its only subclass BuiltinTimeZoneObject.
| Assignee | ||
Comment 12•2 years ago
|
||
Remove the time zone method lookups and also directly call the built-in
function.
Part 14 will remove the TimeZoneRecord class.
| Assignee | ||
Comment 13•2 years ago
|
||
Temporal.TimeZone and user-defined time zone objects no longer exist, so we
can remove their support from TimeZoneValue.
| Assignee | ||
Comment 14•2 years ago
|
||
Replace TimeZoneRecord with TimeZoneValue everywhere and then remove
TimeZoneRecord.
| Assignee | ||
Comment 15•2 years ago
|
||
Remove object allocations which only needed to happen to ensure object identity
when calling user-defined time zones. Now that Temporal.TimeZone and user-defined
time zone objects are no longer a thing, we can replace these objects with simple
stack allocated values.
| Assignee | ||
Comment 16•2 years ago
|
||
Simplifies the code now that we no longer have to worry about possibly
calling an id accessor property when comparing time zones.
| Assignee | ||
Comment 17•2 years ago
|
||
Similar to part 8, but this time for calendars instead of time zones.
| Assignee | ||
Comment 18•2 years ago
|
||
This optimisation doesn't apply anymore when Temporal.Calendar is removed.
| Assignee | ||
Comment 19•2 years ago
|
||
This removes Temporal.Calendar with all its methods. The next patches will
perform additional clean-ups.
| Assignee | ||
Comment 20•2 years ago
|
||
Similar to part 12. Removes the method lookups and calls to user-defined
functions. Removing CalendarRecord will happen in a later patch in this
stack.
| Assignee | ||
Comment 21•2 years ago
|
||
Temporal.Calendar and user-defined calendar objects no longer exist, so we
can remove their support from CalendarValue.
| Assignee | ||
Comment 22•2 years ago
|
||
Remove CallCalendarMethod and update call calendar operations to use
PlainDate instead of passing the various Temporal.Plain* objects.
| Assignee | ||
Comment 23•2 years ago
|
||
Similar to part 16.
Simplifies the code now that we no longer have to worry about possibly
calling an id accessor property when comparing calendars.
| Assignee | ||
Comment 24•2 years ago
|
||
Pass the calendar identifier as std::string_view to avoid allocating a JSString.
And sync step comments.
| Assignee | ||
Comment 25•2 years ago
|
||
Also a part of this commit:
https://github.com/tc39/proposal-temporal/commit/b889242067a7bc1d3a433ec9fa7149a72c18a533
| Assignee | ||
Comment 26•2 years ago
|
||
Including updates to CalendarDateFromFields and CalendarDateUntil.
| Assignee | ||
Comment 27•2 years ago
|
||
The removal of calendar objects and SnapshotOwnProperties allows to change
ToTemporalDateTime to always return PlainDateTimeWithCalendar, because
object identity is no longer observable. This simplifies the implementation
and avoids object allocations.
| Assignee | ||
Comment 28•2 years ago
|
||
Also adds PlainMonthDayWithCalendar to avoid eagerly allocating
PlainMonthDayObject objects.
| Assignee | ||
Comment 29•2 years ago
|
||
| Assignee | ||
Comment 30•2 years ago
|
||
| Assignee | ||
Comment 31•2 years ago
|
||
| Assignee | ||
Comment 32•2 years ago
|
||
Still part of the "Remove calendars and time zones" commit.
| Assignee | ||
Comment 33•2 years ago
|
||
Use CalendarValue instead of CalendarRecord and replace options with
TemporalOverflow.
| Assignee | ||
Comment 34•2 years ago
|
||
Replace Wrapped<PlainDateObject*> with PlainDateWithCalendar because object
identity is no longer observable.
| Assignee | ||
Comment 35•2 years ago
|
||
| Assignee | ||
Comment 36•2 years ago
|
||
| Assignee | ||
Comment 37•2 years ago
|
||
This exact approach no longer applies, we should revisit this later. Remove this
code for now, so it doesn't interfere with other clean-ups.
| Assignee | ||
Comment 38•2 years ago
|
||
| Assignee | ||
Comment 39•2 years ago
|
||
| Assignee | ||
Comment 40•2 years ago
|
||
All callers have already been updated in previous patches, so all that's left
to do is removing the CalendarDateFromFields definition. Also remove some no
longer needed forward declarations.
| Assignee | ||
Comment 41•2 years ago
|
||
Callers were already updated, so this is a plain removal.
| Assignee | ||
Comment 42•2 years ago
|
||
| Assignee | ||
Comment 43•2 years ago
|
||
The CalendarFieldNames vector is now only used in "TemporalFields.cpp", so
move it into that file.
| Assignee | ||
Comment 44•2 years ago
|
||
Good riddance!
| Assignee | ||
Comment 45•2 years ago
|
||
All field names are now spec-internal names, which allows to replace the vector
with an enumset. This is faster and we no longer have to worry about keep the
sort order when appending new entries.
| Assignee | ||
Comment 46•2 years ago
|
||
The object allocations in PrepareTemporalFields and PreparePartialTemporalFields
are no longer necessary, because user-defined calendars can no longer add custom
field names. This allows to use stack-allocated TemporalFields everywhere.
Later spec proposal changes will refactor PrepareTemporalFields again, but let's
remove the JSObject allocations first. (This patch also adds a couple of fixme
notes which will get resolved in later spec proposal changes.)
| Assignee | ||
Comment 47•2 years ago
|
||
Still not done with the "Normative: Remove calendars and time zones" spec PR. The
constructors also no longer call ToCalendarValue or ToTemporalTimeZone.
| Assignee | ||
Comment 48•2 years ago
|
||
https://github.com/tc39/proposal-temporal/pull/2943 should address the fixme note.
| Assignee | ||
Comment 49•2 years ago
|
||
| Assignee | ||
Comment 50•2 years ago
|
||
Actual removal in part 51.
| Assignee | ||
Comment 51•2 years ago
|
||
| Assignee | ||
Comment 52•2 years ago
|
||
| Assignee | ||
Comment 53•2 years ago
|
||
Clean-up "Duration.h" header file.
| Assignee | ||
Comment 54•2 years ago
|
||
| Assignee | ||
Comment 55•2 years ago
|
||
Using PlainDateTime avoids rooting PlainDateTimeWithCalendar.
| Assignee | ||
Comment 56•2 years ago
|
||
| Assignee | ||
Comment 57•2 years ago
|
||
| Assignee | ||
Comment 58•2 years ago
|
||
Note: Later spec PRs will change this again.
| Assignee | ||
Comment 59•2 years ago
|
||
| Assignee | ||
Comment 60•2 years ago
|
||
| Assignee | ||
Comment 61•2 years ago
|
||
| Assignee | ||
Comment 62•2 years ago
|
||
This avoids using JSString::ensureLinearString() in multiple places, so the
methods can all be changed to be infallible.
| Assignee | ||
Comment 63•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
Comment 64•2 years ago
|
||
Comment 65•2 years ago
|
||
Comment 66•2 years ago
|
||
Comment 67•2 years ago
|
||
| Assignee | ||
Updated•2 years ago
|
Comment 68•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/75430ad783ac
https://hg.mozilla.org/mozilla-central/rev/7ff849c408a6
https://hg.mozilla.org/mozilla-central/rev/5b180eff11ec
https://hg.mozilla.org/mozilla-central/rev/ebbccc0d0252
https://hg.mozilla.org/mozilla-central/rev/587ebdf6f856
https://hg.mozilla.org/mozilla-central/rev/5f746077910e
https://hg.mozilla.org/mozilla-central/rev/ef023754bb7d
https://hg.mozilla.org/mozilla-central/rev/63569709f437
https://hg.mozilla.org/mozilla-central/rev/7545bd11d727
https://hg.mozilla.org/mozilla-central/rev/35f79c75ee4f
https://hg.mozilla.org/mozilla-central/rev/85b88e8c4b10
https://hg.mozilla.org/mozilla-central/rev/85e0af8c0496
https://hg.mozilla.org/mozilla-central/rev/026e06bb17c8
https://hg.mozilla.org/mozilla-central/rev/9fdd39380be7
https://hg.mozilla.org/mozilla-central/rev/1a1f4c790be2
https://hg.mozilla.org/mozilla-central/rev/3e92d0869dc8
https://hg.mozilla.org/mozilla-central/rev/5cd53678e5d4
https://hg.mozilla.org/mozilla-central/rev/b3680be15e6f
https://hg.mozilla.org/mozilla-central/rev/99f119d32769
https://hg.mozilla.org/mozilla-central/rev/36240485d15f
https://hg.mozilla.org/mozilla-central/rev/17bedf295f7c
https://hg.mozilla.org/mozilla-central/rev/d6ed03f9e0ec
https://hg.mozilla.org/mozilla-central/rev/1a0d9ed19138
https://hg.mozilla.org/mozilla-central/rev/f4629e5bb997
https://hg.mozilla.org/mozilla-central/rev/f50174176e6b
https://hg.mozilla.org/mozilla-central/rev/d0de41762757
https://hg.mozilla.org/mozilla-central/rev/1de9d82ae23d
https://hg.mozilla.org/mozilla-central/rev/9aafcf82540d
https://hg.mozilla.org/mozilla-central/rev/0189182b83e0
https://hg.mozilla.org/mozilla-central/rev/e04ee6d5701d
https://hg.mozilla.org/mozilla-central/rev/c4ba92c70858
https://hg.mozilla.org/mozilla-central/rev/07c626e0e407
https://hg.mozilla.org/mozilla-central/rev/53770328c9b7
https://hg.mozilla.org/mozilla-central/rev/4682c8da468f
https://hg.mozilla.org/mozilla-central/rev/8ae2f778a3c3
https://hg.mozilla.org/mozilla-central/rev/eb6503420c90
https://hg.mozilla.org/mozilla-central/rev/b04ad3b0b5be
https://hg.mozilla.org/mozilla-central/rev/126e731356bf
https://hg.mozilla.org/mozilla-central/rev/555b80e2bb5e
https://hg.mozilla.org/mozilla-central/rev/c1e68a5a3d07
https://hg.mozilla.org/mozilla-central/rev/f5fe8114d5d5
https://hg.mozilla.org/mozilla-central/rev/8b9542c994c2
https://hg.mozilla.org/mozilla-central/rev/c0eedf5b6ed5
https://hg.mozilla.org/mozilla-central/rev/e226a5e289ca
https://hg.mozilla.org/mozilla-central/rev/0cf5a39aba64
https://hg.mozilla.org/mozilla-central/rev/971dbe22931a
https://hg.mozilla.org/mozilla-central/rev/d2fdb7e06acb
https://hg.mozilla.org/mozilla-central/rev/de7fc134aa46
https://hg.mozilla.org/mozilla-central/rev/13c8ea94002d
https://hg.mozilla.org/mozilla-central/rev/924273c2a46c
https://hg.mozilla.org/mozilla-central/rev/4e872db3f4fe
https://hg.mozilla.org/mozilla-central/rev/3aa13e988267
https://hg.mozilla.org/mozilla-central/rev/8e27c98071eb
https://hg.mozilla.org/mozilla-central/rev/0ed2c19fa8a6
https://hg.mozilla.org/mozilla-central/rev/c83e30c11bb1
https://hg.mozilla.org/mozilla-central/rev/b892183ecf72
https://hg.mozilla.org/mozilla-central/rev/8e9bd367ff9a
https://hg.mozilla.org/mozilla-central/rev/8f78980c140d
https://hg.mozilla.org/mozilla-central/rev/d8359ea14575
https://hg.mozilla.org/mozilla-central/rev/51bbcb5aea0c
https://hg.mozilla.org/mozilla-central/rev/f60b95fa39f3
https://hg.mozilla.org/mozilla-central/rev/a5edc91cbb2d
https://hg.mozilla.org/mozilla-central/rev/687e61ce4b1d
Description
•