You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a new spec type, Calendar Methods Record, which stores a
calendar object's methods once they have been observably looked up. The
record is passed around into abstract operations instead of the calendar
object itself.
The mechanism doesn't currently allow for storing all Temporal.Calendar
methods, only the ones that are explicitly called internally in other
places than the Zoned and Plain types' methods of the same name, as part
of a different API call.
Some methods not included in the record are only called by the same-named
methods on other Temporal types (example, Calendar.p.dayOfWeek is only
called by ZonedDateTime.p.dayOfWeek, PlainDateTime.p.dayOfWeek, and
PlainDate.p.dayOfWeek.)
Other methods not included in the record are potentially called through
lookups in PrepareTemporalFields, so it's not possible to pre-fetch them
without making polyfilling difficult. (Example, Calendar.p.monthCode is
called in `plainYearMonth.toPlainDate(...)` by looking up the
`plainYearMonth.monthCode` property in PrepareTemporalFields. Shortcutting
that lookup would mean that PlainDate.p.monthCode could never be
polyfilled.)
This is a large commit but most of it is mechanical replacement of
Temporal.Calendar variables with Calendar Methods Record variables.
0 commit comments