[JSC] el(Greek) characters' upper-case conversion is locale-sensitive
Created attachment 401801 [details] Patch
<rdar://problem/55018467>
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.
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.
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.
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.
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.
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.
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
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
webaudio/webaudio-gc.html in mac-debug-wk1 is unrelated. Landing.
Committed r262992: <https://trac.webkit.org/changeset/262992>