WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
213155
[JSC] el(Greek) characters' upper-case conversion is locale-sensitive
https://bugs.webkit.org/show_bug.cgi?id=213155
Summary
[JSC] el(Greek) characters' upper-case conversion is locale-sensitive
Yusuke Suzuki
Reported
2020-06-12 16:34:05 PDT
[JSC] el(Greek) characters' upper-case conversion is locale-sensitive
Attachments
Patch
(5.07 KB, patch)
2020-06-12 16:37 PDT
,
Yusuke Suzuki
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2020-06-12 16:37:31 PDT
Created
attachment 401801
[details]
Patch
Yusuke Suzuki
Comment 2
2020-06-12 16:37:34 PDT
<
rdar://problem/55018467
>
Darin Adler
Comment 3
2020-06-12 16:43:09 PDT
Comment on
attachment 401801
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=401801&action=review
> Source/JavaScriptCore/runtime/StringPrototype.cpp:1586 > + const HashSet<String> availableLocales({ "az"_s, "el"_s , "lt"_s, "tr"_s });
Seems that our implementation is far too literal. Making a HashSet here seems so inefficient. And repeating this information here instead of getting it from ICU also seems weak. Anyway, not a comment about this patch, I suppose.
Yusuke Suzuki
Comment 4
2020-06-12 17:23:07 PDT
Comment on
attachment 401801
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=401801&action=review
>> Source/JavaScriptCore/runtime/StringPrototype.cpp:1586 >> + const HashSet<String> availableLocales({ "az"_s, "el"_s , "lt"_s, "tr"_s }); > > Seems that our implementation is far too literal. Making a HashSet here seems so inefficient. And repeating this information here instead of getting it from ICU also seems weak. > > Anyway, not a comment about this patch, I suppose.
Yeah, for HashSet thing, I think just iterating with array is better since each string is so small & there is only 4 elements. Maybe that is faster. Changed.
Darin Adler
Comment 5
2020-06-12 17:23:48 PDT
Comment on
attachment 401801
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=401801&action=review
>>> Source/JavaScriptCore/runtime/StringPrototype.cpp:1586 >>> + const HashSet<String> availableLocales({ "az"_s, "el"_s , "lt"_s, "tr"_s }); >> >> Seems that our implementation is far too literal. Making a HashSet here seems so inefficient. And repeating this information here instead of getting it from ICU also seems weak. >> >> Anyway, not a comment about this patch, I suppose. > > Yeah, for HashSet thing, I think just iterating with array is better since each string is so small & there is only 4 elements. Maybe that is faster. Changed.
Yes and it can be an array of const char* or ASCIILiteral.
Yusuke Suzuki
Comment 6
2020-06-12 17:24:09 PDT
Comment on
attachment 401801
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=401801&action=review
>>> Source/JavaScriptCore/runtime/StringPrototype.cpp:1586 >>> + const HashSet<String> availableLocales({ "az"_s, "el"_s , "lt"_s, "tr"_s }); >> >> Seems that our implementation is far too literal. Making a HashSet here seems so inefficient. And repeating this information here instead of getting it from ICU also seems weak. >> >> Anyway, not a comment about this patch, I suppose. > > Yeah, for HashSet thing, I think just iterating with array is better since each string is so small & there is only 4 elements. Maybe that is faster. Changed.
Ah, but for now, I leave it since availableLocales code relies on HashSet and availableLocales is used by the other places.
Yusuke Suzuki
Comment 7
2020-06-12 17:24:34 PDT
Comment on
attachment 401801
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=401801&action=review
>>>>> Source/JavaScriptCore/runtime/StringPrototype.cpp:1586 >>>>> + const HashSet<String> availableLocales({ "az"_s, "el"_s , "lt"_s, "tr"_s }); >>>> >>>> Seems that our implementation is far too literal. Making a HashSet here seems so inefficient. And repeating this information here instead of getting it from ICU also seems weak. >>>> >>>> Anyway, not a comment about this patch, I suppose. >>> >>> Yeah, for HashSet thing, I think just iterating with array is better since each string is so small & there is only 4 elements. Maybe that is faster. Changed. >> >> Yes and it can be an array of const char* or ASCIILiteral. > > Ah, but for now, I leave it since availableLocales code relies on HashSet and availableLocales is used by the other places.
I'll file a bug for this.
Darin Adler
Comment 8
2020-06-12 17:24:55 PDT
Comment on
attachment 401801
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=401801&action=review
>>>>> Source/JavaScriptCore/runtime/StringPrototype.cpp:1586 >>>>> + const HashSet<String> availableLocales({ "az"_s, "el"_s , "lt"_s, "tr"_s }); >>>> >>>> Seems that our implementation is far too literal. Making a HashSet here seems so inefficient. And repeating this information here instead of getting it from ICU also seems weak. >>>> >>>> Anyway, not a comment about this patch, I suppose. >>> >>> Yeah, for HashSet thing, I think just iterating with array is better since each string is so small & there is only 4 elements. Maybe that is faster. Changed. >> >> Yes and it can be an array of const char* or ASCIILiteral. > > Ah, but for now, I leave it since availableLocales code relies on HashSet and availableLocales is used by the other places.
Yes, no pressure to do it right now. Just a little concerned that we aren’t making judicious choices about algorithms.
Yusuke Suzuki
Comment 9
2020-06-12 17:26:19 PDT
Comment on
attachment 401801
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=401801&action=review
>>>>>>> Source/JavaScriptCore/runtime/StringPrototype.cpp:1586 >>>>>>> + const HashSet<String> availableLocales({ "az"_s, "el"_s , "lt"_s, "tr"_s }); >>>>>> >>>>>> Seems that our implementation is far too literal. Making a HashSet here seems so inefficient. And repeating this information here instead of getting it from ICU also seems weak. >>>>>> >>>>>> Anyway, not a comment about this patch, I suppose. >>>>> >>>>> Yeah, for HashSet thing, I think just iterating with array is better since each string is so small & there is only 4 elements. Maybe that is faster. Changed. >>>> >>>> Yes and it can be an array of const char* or ASCIILiteral. >>> >>> Ah, but for now, I leave it since availableLocales code relies on HashSet and availableLocales is used by the other places. >> >> I'll file a bug for this. > > Yes, no pressure to do it right now. Just a little concerned that we aren’t making judicious choices about algorithms.
Right. Filed in
https://bugs.webkit.org/show_bug.cgi?id=213158
Yusuke Suzuki
Comment 10
2020-06-12 17:26:40 PDT
Comment on
attachment 401801
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=401801&action=review
>>>>>>>> Source/JavaScriptCore/runtime/StringPrototype.cpp:1586 >>>>>>>> + const HashSet<String> availableLocales({ "az"_s, "el"_s , "lt"_s, "tr"_s }); >>>>>>> >>>>>>> Seems that our implementation is far too literal. Making a HashSet here seems so inefficient. And repeating this information here instead of getting it from ICU also seems weak. >>>>>>> >>>>>>> Anyway, not a comment about this patch, I suppose. >>>>>> >>>>>> Yeah, for HashSet thing, I think just iterating with array is better since each string is so small & there is only 4 elements. Maybe that is faster. Changed. >>>>> >>>>> Yes and it can be an array of const char* or ASCIILiteral. >>>> >>>> Ah, but for now, I leave it since availableLocales code relies on HashSet and availableLocales is used by the other places. >>> >>> I'll file a bug for this. >> >> Yes, no pressure to do it right now. Just a little concerned that we aren’t making judicious choices about algorithms. > > Right. Filed in
https://bugs.webkit.org/show_bug.cgi?id=213158
And I'll put FIXME with
https://bugs.webkit.org/show_bug.cgi?id=213158
Yusuke Suzuki
Comment 11
2020-06-12 18:09:52 PDT
webaudio/webaudio-gc.html in mac-debug-wk1 is unrelated. Landing.
Yusuke Suzuki
Comment 12
2020-06-12 18:15:27 PDT
Committed
r262992
: <
https://trac.webkit.org/changeset/262992
>
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