-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Temporal] Add PlainMonthDay #52010
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] Add PlainMonthDay #52010
Conversation
EWS run on previous version of this PR (hash ea57bb2) |
ea57bb2
to
d2bab08
Compare
EWS run on previous version of this PR (hash d2bab08) |
: year(y), month(m) { } | ||
}; | ||
|
||
class PlainMonthDay { |
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.
Also, that PlainDate's year's double looks bad. It must be int32_t and out of range year should be represented via special Int32. Using double is supper slow. Can you add a FIXME? I think we cannot enable Temporal until it gets fixed.
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.
Added a FIXME -- also, what do you mean by "special Int32"?
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.
Indicating Out-of-range via INT32_MIN for example.
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.
Yeah this is changed in f1cf8d2, this is not OK. This is hard blocker for enablement definitely.
d2bab08
to
299221f
Compare
EWS run on current version of this PR (hash 299221f) |
https://bugs.webkit.org/show_bug.cgi?id=300389 Reviewed by Yusuke Suzuki. Add basic support for Temporal PlainMonthDay type, without most methods yet. Test: JSTests/stress/temporal-plainmonthday.js * JSTests/stress/temporal-plainmonthday.js: Added. (shouldBe): (shouldThrow): (const.monthDay.new.Temporal.PlainMonthDay): * JSTests/test262/config.yaml: * Source/JavaScriptCore/CMakeLists.txt: * Source/JavaScriptCore/DerivedSources.make: * Source/JavaScriptCore/Sources.txt: * Source/JavaScriptCore/runtime/ISO8601.h: * Source/JavaScriptCore/runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::init): (JSC::JSGlobalObject::visitChildrenImpl): * Source/JavaScriptCore/runtime/JSGlobalObject.h: (JSC::JSGlobalObject::plainMonthDayStructure): * Source/JavaScriptCore/runtime/TemporalObject.cpp: (JSC::createPlainMonthDayConstructor): (JSC::toTemporalOverflow): * Source/JavaScriptCore/runtime/TemporalObject.h: * Source/JavaScriptCore/runtime/TemporalPlainMonthDay.cpp: Added. (JSC::TemporalPlainMonthDay::create): (JSC::TemporalPlainMonthDay::createStructure): (JSC::TemporalPlainMonthDay::TemporalPlainMonthDay): (JSC::TemporalPlainMonthDay::finishCreation): (JSC::TemporalPlainMonthDay::visitChildrenImpl): (JSC::TemporalPlainMonthDay::tryCreateIfValid): (JSC::TemporalPlainMonthDay::monthCode const): * Source/JavaScriptCore/runtime/TemporalPlainMonthDay.h: Added. * Source/JavaScriptCore/runtime/TemporalPlainMonthDayConstructor.cpp: Added. (JSC::TemporalPlainMonthDayConstructor::create): (JSC::TemporalPlainMonthDayConstructor::createStructure): (JSC::TemporalPlainMonthDayConstructor::TemporalPlainMonthDayConstructor): (JSC::TemporalPlainMonthDayConstructor::finishCreation): (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/runtime/TemporalPlainMonthDayConstructor.h: Added. * Source/JavaScriptCore/runtime/TemporalPlainMonthDayPrototype.cpp: Added. (JSC::TemporalPlainMonthDayPrototype::create): (JSC::TemporalPlainMonthDayPrototype::createStructure): (JSC::TemporalPlainMonthDayPrototype::TemporalPlainMonthDayPrototype): (JSC::TemporalPlainMonthDayPrototype::finishCreation): (JSC::JSC_DEFINE_CUSTOM_GETTER): * Source/JavaScriptCore/runtime/TemporalPlainMonthDayPrototype.h: Added. Canonical link: https://commits.webkit.org/301244@main
299221f
to
dab2cf7
Compare
Committed 301244@main (dab2cf7): https://commits.webkit.org/301244@main Reviewed commits have been landed. Closing PR #52010 and removing active labels. |
dab2cf7
299221f
🧪 win-tests🛠 playstation