-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Temporal] Implement TemporalDuration::subtract() according to spec #51637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Temporal] Implement TemporalDuration::subtract() according to spec #51637
Conversation
|
EWS run on previous version of this PR (hash a7ae489) Details |
| int32_t y = epochTimeToEpochYear(ms); | ||
| int32_t m = epochTimeToMonthInYear(ms) + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not call WTF::yearMonthDayFromDays directly since it is costly.
Please use JSDateMath's cache.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in bd306a9
|
EWS run on previous version of this PR (hash bd306a9) Details |
Constellation
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
|
This change contains multiple commits which are not squashed together, blocking PR #51637. Please squash the commits to land. |
bd306a9 to
4220184
Compare
|
EWS run on previous version of this PR (hash 4220184) Details |
|
Commit message contains (OOPS!), blocking PR #51637. Details: Build #19507 |
4220184 to
1c11ed3
Compare
|
EWS run on current version of this PR (hash 1c11ed3) Details |
|
@catamorphism does not have committer permissions according to https://raw.githubusercontent.com/WebKit/WebKit/main/metadata/contributors.json. If you do have committer permissions, please ensure that your GitHub username is added to contributors.json. Rejecting 1c11ed3 from merge queue. |
|
You need to remove |
@Constellation I did remove it in the commit message, but didn't remove it in the GitHub summary. I've fixed it now, hopefully it works? |
https://bugs.webkit.org/show_bug.cgi?id=298562 Reviewed by Yusuke Suzuki. Add a new addDurations() operation that TemporalDuration::subtract() calls, as well as some auxiliary classes and ops: * PlainYearMonth class (will be elaborated in a future PR) * balanceISOYearMonth() * balanceISODate() * regulateISODate() Some of the previously-failing tests for Temporal/Duration/prototype/subtract are now enabled. * JSTests/stress/temporal-duration.js: * JSTests/test262/config.yaml: * JSTests/test262/expectations.yaml: * Source/JavaScriptCore/runtime/DateConstructor.cpp: (JSC::makeDate): Deleted. (JSC::makeTime): Deleted. (JSC::makeDay): Deleted. * Source/JavaScriptCore/runtime/DateConstructor.h: (JSC::makeDay): (JSC::makeDate): (JSC::makeTime): * Source/JavaScriptCore/runtime/ISO8601.cpp: (JSC::ISO8601::isValidISODate): (JSC::ISO8601::createISODateRecord): * Source/JavaScriptCore/runtime/ISO8601.h: * Source/JavaScriptCore/runtime/TemporalCalendar.cpp: (JSC::balanceISODateOld): (JSC::epochTimeToEpochYear): (JSC::epochTimeToMonthInYear): (JSC::epochTimeToDate): (JSC::TemporalCalendar::balanceISODate): (JSC::TemporalCalendar::isoDateAdd): (JSC::TemporalCalendar::isoDateDifference): (JSC::TemporalCalendar::balanceISOYearMonth): (JSC::balanceISODate): Deleted. * Source/JavaScriptCore/runtime/TemporalCalendar.h: * Source/JavaScriptCore/runtime/TemporalDuration.cpp: (JSC::TemporalDuration::toInternalDurationRecordWith24HourDays): (JSC::TemporalDuration::regulateISODate): (JSC::TemporalDuration::add const): (JSC::TemporalDuration::addDurations const): (JSC::TemporalDuration::subtract const): * Source/JavaScriptCore/runtime/TemporalDuration.h: * Source/JavaScriptCore/runtime/TemporalObject.h: Canonical link: https://commits.webkit.org/300914@main
1c11ed3 to
0275bce
Compare
|
Committed 300914@main (0275bce): https://commits.webkit.org/300914@main Reviewed commits have been landed. Closing PR #51637 and removing active labels. |
0275bce
1c11ed3
🛠 🧪 merge🛠 playstation