Skip to content

Conversation

@catamorphism
Copy link
Contributor

@catamorphism catamorphism commented Nov 28, 2025

883b821

Temporal: Implement valueOf for PlainMonthDay objects
https://bugs.webkit.org/show_bug.cgi?id=303243

Reviewed by Justin Michaud.

Implement valueOf for PlainMonthDay (which always throws).

Also enable a test for PlainDate that passes, which somehow
wasn't enabled in the previous Temporal PR.

* JSTests/stress/temporal-plainmonthday.js:
(shouldBe):
* JSTests/test262/config.yaml:
* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/TemporalPlainMonthDayPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

Canonical link: https://commits.webkit.org/303631@main

469f6ea

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests
✅ 🧪 webkitperl 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ⏳ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-wk2-stress 🛠 playstation
✅ 🛠 tv ✅ 🧪 mac-intel-wk2 ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🛠 mac-safer-cpp 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

@catamorphism catamorphism requested a review from a team as a code owner November 28, 2025 21:25
@catamorphism catamorphism self-assigned this Nov 28, 2025
@catamorphism catamorphism added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Nov 28, 2025
Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a reviewer, but this does implement the intended functionality 😄

Comment on lines +113 to +116
shouldBe(Temporal.PlainMonthDay.prototype.valueOf.length, 0);
{
shouldThrow(() => monthDay.valueOf(), TypeError);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These things are definitely covered in test262 already, though I don't know what the policy is for duplicating coverage in JSTests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've assumed there needs to be a stress test for each commit, but someone correct me if I'm wrong?

@justinmichaud justinmichaud added the merge-queue Applied to send a pull request to merge-queue label Nov 28, 2025
https://bugs.webkit.org/show_bug.cgi?id=303243

Reviewed by Justin Michaud.

Implement valueOf for PlainMonthDay (which always throws).

Also enable a test for PlainDate that passes, which somehow
wasn't enabled in the previous Temporal PR.

* JSTests/stress/temporal-plainmonthday.js:
(shouldBe):
* JSTests/test262/config.yaml:
* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/TemporalPlainMonthDayPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

Canonical link: https://commits.webkit.org/303631@main
@webkit-commit-queue webkit-commit-queue force-pushed the plainmonthday-plainyearmonth-part-7 branch from 469f6ea to 883b821 Compare November 29, 2025 00:02
@webkit-commit-queue
Copy link
Collaborator

Committed 303631@main (883b821): https://commits.webkit.org/303631@main

Reviewed commits have been landed. Closing PR #54563 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 883b821 into WebKit:main Nov 29, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Nov 29, 2025
@ptomato ptomato deleted the plainmonthday-plainyearmonth-part-7 branch November 29, 2025 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants