WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
229651
[JSC] Implement Temporal.Calendar
https://bugs.webkit.org/show_bug.cgi?id=229651
Summary
[JSC] Implement Temporal.Calendar
Yusuke Suzuki
Reported
2021-08-28 16:13:08 PDT
...
Attachments
Patch
(56.80 KB, patch)
2021-08-28 23:21 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(70.41 KB, patch)
2021-08-29 03:41 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(71.79 KB, patch)
2021-08-29 22:42 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(71.83 KB, patch)
2021-08-30 03:00 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(71.83 KB, patch)
2021-08-30 11:56 PDT
,
Yusuke Suzuki
ross.kirsling
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2021-08-28 23:21:48 PDT
Created
attachment 436730
[details]
Patch
Yusuke Suzuki
Comment 2
2021-08-29 03:41:15 PDT
Created
attachment 436735
[details]
Patch
Yusuke Suzuki
Comment 3
2021-08-29 22:42:43 PDT
Created
attachment 436757
[details]
Patch
Yusuke Suzuki
Comment 4
2021-08-30 03:00:33 PDT
Created
attachment 436761
[details]
Patch
Yusuke Suzuki
Comment 5
2021-08-30 11:56:14 PDT
Created
attachment 436799
[details]
Patch
Philip Chimento
Comment 6
2021-08-30 12:24:00 PDT
Comment on
attachment 436799
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=436799&action=review
> Source/JavaScriptCore/runtime/IntlObject.cpp:1594 > + if (string.is8Bit())
I believe all the BCP47 identifiers are ASCII-only, by definition?
> Source/JavaScriptCore/runtime/TemporalCalendarPrototype.cpp:98 > + return throwVMTypeError(globalObject, scope, "Temporal.Calendar.prototype.fields called on value that's not an object initialized as a Calendar"_s);
As in the Duration patch I think the brand check exception message would be clearer to developers without "an object initialized as"
Yusuke Suzuki
Comment 7
2021-08-30 12:45:00 PDT
Comment on
attachment 436799
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=436799&action=review
>> Source/JavaScriptCore/runtime/IntlObject.cpp:1594 >> + if (string.is8Bit()) > > I believe all the BCP47 identifiers are ASCII-only, by definition?
This is8Bit is WTF::String implementation detail, and it is possible that ASCII-only string can get 16bit strings. And it would be possible to make String 16bit internally in some cases (e.g. string is determined to be shared with the existing 16bit string). So putting both cases is better for safety and correctness :)
Ross Kirsling
Comment 8
2021-08-30 18:04:05 PDT
Comment on
attachment 436799
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=436799&action=review
Looks good, given Philip's comments and the resolution of the Slack thread about implementation-definedness.
> Source/WTF/ChangeLog:11 > + * wtf/text/StringImpl.cpp: > + (WTF::StringImpl::createStaticStringImpl): > + * wtf/text/StringImpl.h: > + (WTF::StringImpl::createStaticStringImpl):
I think this deserves a brief explanation. :)
> JSTests/stress/temporal-calendar.js:80 > + password: 'hunter2', // Note: Don't really store passwords like that
🤣
Yusuke Suzuki
Comment 9
2021-08-30 18:23:50 PDT
Comment on
attachment 436799
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=436799&action=review
>> Source/WTF/ChangeLog:11 >> + (WTF::StringImpl::createStaticStringImpl): > > I think this deserves a brief explanation. :)
Added :)
>> Source/JavaScriptCore/runtime/TemporalCalendarPrototype.cpp:98 >> + return throwVMTypeError(globalObject, scope, "Temporal.Calendar.prototype.fields called on value that's not an object initialized as a Calendar"_s); > > As in the Duration patch I think the brand check exception message would be clearer to developers without "an object initialized as"
Changed to drop `an object initialized as...` part :)
Yusuke Suzuki
Comment 10
2021-08-30 18:56:41 PDT
Committed
r281788
(
241125@main
): <
https://commits.webkit.org/241125@main
>
Radar WebKit Bug Importer
Comment 11
2021-08-30 18:57:25 PDT
<
rdar://problem/82559111
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug