Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial?: Use normalized time duration in operations
This introduces Normalized Time Duration Records, which we use to encapsulate 96-bit integer operations on duration times. (In the reference polyfill, the TimeDuration class fulfills the same purpose.) These operations are specified naively in the mathematical value domain, but can be changed in a later editorial commit to correspond to how implementations would write 64+32 bit operations, if we so desire. (The results must be exactly the same, so that can be decided later, outside of a TC39 plenary.) This commit also replaces TotalDurationNanoseconds with NormalizeTimeDuration, and NanosecondsToDays with NormalizedTimeDurationToDays. Several operations are changed to return a Normalized Duration Record, which is a Normalized Time Duration record combined with a Date Duration Record. Having already limited time units of durations in the previous commit, this does not affect any results, nor any existing tests in test262. But I can't prove conclusively that there isn't some edge case somewhere that makes this change observable. (also obsoletes several pre-existing editorial mistakes) Closes: #2536 Closes: #2638 Closes: #2616
- Loading branch information