WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 227830
[JSC] Intl Locale Info
https://bugs.webkit.org/show_bug.cgi?id=227830
Summary
[JSC] Intl Locale Info
Yusuke Suzuki
Reported
2021-07-09 01:35:52 PDT
...
Attachments
Patch
(24.95 KB, patch)
2021-07-10 10:13 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(25.85 KB, patch)
2021-07-10 14:17 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(26.35 KB, patch)
2021-08-06 23:07 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(32.54 KB, patch)
2021-08-20 00:55 PDT
,
Yusuke Suzuki
ross.kirsling
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2021-07-10 10:13:37 PDT
Created
attachment 433259
[details]
Patch
Yusuke Suzuki
Comment 2
2021-07-10 10:43:22 PDT
https://github.com/tc39/proposal-intl-locale-info
Yusuke Suzuki
Comment 3
2021-07-10 14:17:54 PDT
Created
attachment 433274
[details]
Patch
Radar WebKit Bug Importer
Comment 4
2021-07-16 01:36:20 PDT
<
rdar://problem/80674634
>
Yusuke Suzuki
Comment 5
2021-08-06 23:07:44 PDT
Created
attachment 435117
[details]
Patch
Yusuke Suzuki
Comment 6
2021-08-20 00:55:42 PDT
Created
attachment 435948
[details]
Patch
Ross Kirsling
Comment 7
2021-08-20 15:18:12 PDT
Comment on
attachment 435948
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=435948&action=review
r=me with comments
> Source/JavaScriptCore/runtime/IntlLocale.cpp:540 > +static inline JSArray* createArrayFromStringVector(JSGlobalObject* globalObject, Vector<String, 1>&& elements)
Heh, I'm slightly surprised we don't already have something like this.
> Source/JavaScriptCore/runtime/IntlLocale.cpp:581 > + // Ensure aliases used in language tag are allowed.
Maybe put in a shared location so that IntlDateTimeFormat doesn't have to store this knowledge separately?
> Source/JavaScriptCore/runtime/IntlLocale.cpp:627 > + // Map keyword values to BCP 47 equivalents.
Maybe put in a shared location so that IntlCollator doesn't have to store this knowledge separately?
> Source/JavaScriptCore/runtime/IntlLocale.cpp:679 > + unsigned count = 1;
Unused variable? (Seems like it's incremented but never checked.)
> Source/JavaScriptCore/runtime/IntlLocale.cpp:826 > + case UCAL_WEEKEND: > + return UCAL_WEEKEND; > + default: > + return UCAL_WEEKEND; > + } > + return UCAL_WEEKEND;
Why not just a single `return UCAL_WEEKEND;` after the `default:`, instead of three?
Yusuke Suzuki
Comment 8
2021-08-21 06:18:38 PDT
Comment on
attachment 435948
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=435948&action=review
>> Source/JavaScriptCore/runtime/IntlLocale.cpp:826 >> + return UCAL_WEEKEND; > > Why not just a single `return UCAL_WEEKEND;` after the `default:`, instead of three?
Removed the last one. But I think having case UCAL_WEEKEND_CEASE: case UCAL_WEEKEND: is good for readability rather than using `default`, in particular when a new UCalendarWeekdayType is added to ICU.
Yusuke Suzuki
Comment 9
2021-08-21 07:24:15 PDT
Comment on
attachment 435948
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=435948&action=review
>> Source/JavaScriptCore/runtime/IntlLocale.cpp:581 >> + // Ensure aliases used in language tag are allowed. > > Maybe put in a shared location so that IntlDateTimeFormat doesn't have to store this knowledge separately?
Done.
>> Source/JavaScriptCore/runtime/IntlLocale.cpp:627 >> + // Map keyword values to BCP 47 equivalents. > > Maybe put in a shared location so that IntlCollator doesn't have to store this knowledge separately?
Done
>> Source/JavaScriptCore/runtime/IntlLocale.cpp:679 >> + unsigned count = 1; > > Unused variable? (Seems like it's incremented but never checked.)
Removed.
Yusuke Suzuki
Comment 10
2021-08-21 07:33:31 PDT
Committed
r281374
(
240789@main
): <
https://commits.webkit.org/240789@main
>
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