Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Issue 2533983006: Optimize case conversion with icu_case_mapping (Closed)

Created:
4 years ago by jungshik at Google
Modified:
4 years ago
Reviewers:
Dan Ehrenberg, Yang
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Optimize case conversion with icu_case_mapping Use FastAsciiConvert (as used by Unibrow) for i18n-aware case conversion with --icu_case_mapping. Move FastAsciiConvert to src/string-case.cc so that it can be used by both runtime-{string,i18n}. Add more tests. BUG=v8:4477, v8:4476 TEST=intl/general/case* Review-Url: https://codereview.chromium.org/2533983006 Cr-Commit-Position: refs/heads/master@{#41821} Committed: https://chromium.googlesource.com/v8/v8/+/af38272dd94ed287fda9abd285d6071d96a7118f

Patch Set 1 #

Patch Set 2 : index_to_first_upper fix #

Patch Set 3 : handle short strings first for lowercase #

Patch Set 4 : make runtim-i18n.cc identical to runtime-string.cc for lowercasing for ascii strings #

Patch Set 5 : test for runtime-i18n vs runtime-string: do not check for new.target in i18n.js #

Patch Set 6 : drop DEFINED(new.target) check in i18n.js; go back to ps3 #

Patch Set 7 : do not use ASSIGN_RETURN_FAILURE_ON_EXCEPTION in ToUpper #

Total comments: 11

Patch Set 8 : move FastAsciiConvert to src/string-case* and do not check for exception #

Patch Set 9 : a bit more refactoring #

Patch Set 10 : fix a bug with index_to_first_unprocessed #

Patch Set 11 : remove unnecessary and potentially expensive casting #

Patch Set 12 : more tweaking ... #

Patch Set 13 : a bit more refactoring #

Patch Set 14 : fix v8.gyp #

Patch Set 15 : a little tweak for Uppercase() with Latin-1; don't affect ASCII or Lower #

Patch Set 16 : update comments with TODO #

Total comments: 6

Patch Set 17 : drop an unused variable: -Wunused-variable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -201 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M src/js/i18n.js View 1 2 3 4 5 2 chunks +2 lines, -16 lines 0 comments Download
M src/runtime/runtime-i18n.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +84 lines, -65 lines 0 comments Download
M src/runtime/runtime-strings.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +4 lines, -119 lines 0 comments Download
M src/runtime/runtime-utils.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A src/string-case.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +17 lines, -0 lines 0 comments Download
A src/string-case.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +130 lines, -0 lines 0 comments Download
M src/v8.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M test/intl/general/case-mapping.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +24 lines, -1 line 0 comments Download

Messages

Total messages: 55 (34 generated)
jungshik at Google
Earlier iterations were uploaded to another CL by mistake. https://codereview.chromium.org/2533033003/
4 years ago (2016-11-30 17:51:22 UTC) #3
jungshik at Google
The latest PS still needs a bit clean up/refactoring, but I have a couple of ...
4 years ago (2016-12-02 06:45:01 UTC) #7
jungshik at Google
https://codereview.chromium.org/2533983006/diff/120001/src/js/i18n.js File src/js/i18n.js (left): https://codereview.chromium.org/2533983006/diff/120001/src/js/i18n.js#oldcode2126 src/js/i18n.js:2126: } WIth this check in place, the JS portion ...
4 years ago (2016-12-02 06:52:38 UTC) #8
jungshik at Google
https://codereview.chromium.org/2533983006/diff/120001/src/runtime/runtime-utils.cc File src/runtime/runtime-utils.cc (right): https://codereview.chromium.org/2533983006/diff/120001/src/runtime/runtime-utils.cc#newcode32 src/runtime/runtime-utils.cc:32: template <bool is_lower> Initially, |is_lower| is a function argument, ...
4 years ago (2016-12-02 06:54:42 UTC) #9
Dan Ehrenberg
https://codereview.chromium.org/2533983006/diff/120001/src/js/i18n.js File src/js/i18n.js (left): https://codereview.chromium.org/2533983006/diff/120001/src/js/i18n.js#oldcode2126 src/js/i18n.js:2126: } On 2016/12/02 06:52:38, jungshik at google wrote: > ...
4 years ago (2016-12-02 23:35:08 UTC) #10
Dan Ehrenberg
https://codereview.chromium.org/2533983006/diff/120001/src/runtime/runtime-utils.cc File src/runtime/runtime-utils.cc (right): https://codereview.chromium.org/2533983006/diff/120001/src/runtime/runtime-utils.cc#newcode1 src/runtime/runtime-utils.cc:1: // Copyright 2016 the V8 project authors. All rights ...
4 years ago (2016-12-02 23:37:39 UTC) #11
Yang
https://codereview.chromium.org/2533983006/diff/120001/src/runtime/runtime-i18n.cc File src/runtime/runtime-i18n.cc (right): https://codereview.chromium.org/2533983006/diff/120001/src/runtime/runtime-i18n.cc#newcode1099 src/runtime/runtime-i18n.cc:1099: // shorter than a machine-word without any memory allocation ...
4 years ago (2016-12-05 19:19:30 UTC) #12
jungshik at Google
Thank you, Yang and Dan, for the replies. I've done a lot of little tweaks. ...
4 years ago (2016-12-13 23:32:08 UTC) #29
Dan Ehrenberg
lgtm
4 years ago (2016-12-14 01:39:29 UTC) #30
Dan Ehrenberg
On 2016/12/14 at 01:39:29, Dan Ehrenberg wrote: > lgtm You probably wan to modify the ...
4 years ago (2016-12-14 01:39:50 UTC) #31
jungshik at Google
On 2016/12/14 01:39:50, Dan Ehrenberg wrote: > On 2016/12/14 at 01:39:29, Dan Ehrenberg wrote: > ...
4 years ago (2016-12-15 18:45:20 UTC) #33
Dan Ehrenberg
https://codereview.chromium.org/2533983006/diff/300001/src/runtime/runtime-i18n.cc File src/runtime/runtime-i18n.cc (right): https://codereview.chromium.org/2533983006/diff/300001/src/runtime/runtime-i18n.cc#newcode1047 src/runtime/runtime-i18n.cc:1047: int* sharp_s_count) { Using a pointer rather than a ...
4 years ago (2016-12-15 19:24:25 UTC) #34
jungshik at Google
See my reply below. Thanks again for taking a look. https://codereview.chromium.org/2533983006/diff/300001/src/runtime/runtime-i18n.cc File src/runtime/runtime-i18n.cc (right): https://codereview.chromium.org/2533983006/diff/300001/src/runtime/runtime-i18n.cc#newcode1047 ...
4 years ago (2016-12-16 00:37:56 UTC) #35
Yang
On 2016/12/16 00:37:56, jungshik at google wrote: > See my reply below. Thanks again for ...
4 years ago (2016-12-16 12:44:56 UTC) #36
Yang
https://codereview.chromium.org/2533983006/diff/300001/src/js/i18n.js File src/js/i18n.js (left): https://codereview.chromium.org/2533983006/diff/300001/src/js/i18n.js#oldcode2125 src/js/i18n.js:2125: throw %make_type_error(kOrdinaryFunctionCalledAsConstructor); Is this a spec change? So this ...
4 years ago (2016-12-16 14:02:21 UTC) #37
jungshik at Google
Thank you for taking a look. Below is my answer to the question. https://codereview.chromium.org/2533983006/diff/300001/src/js/i18n.js File ...
4 years ago (2016-12-16 18:12:36 UTC) #38
jungshik at Google
On 2016/12/16 18:12:36, jungshik at google wrote: > Thank you for taking a look. Below ...
4 years ago (2016-12-16 18:17:05 UTC) #41
Dan Ehrenberg
https://codereview.chromium.org/2533983006/diff/300001/src/js/i18n.js File src/js/i18n.js (left): https://codereview.chromium.org/2533983006/diff/300001/src/js/i18n.js#oldcode2125 src/js/i18n.js:2125: throw %make_type_error(kOrdinaryFunctionCalledAsConstructor); On 2016/12/16 18:12:36, jungshik at google wrote: ...
4 years ago (2016-12-17 00:42:19 UTC) #48
jungshik at Google
Thank you for confirming, Dan ! https://codereview.chromium.org/2533983006/diff/300001/src/js/i18n.js File src/js/i18n.js (left): https://codereview.chromium.org/2533983006/diff/300001/src/js/i18n.js#oldcode2125 src/js/i18n.js:2125: throw %make_type_error(kOrdinaryFunctionCalledAsConstructor); On ...
4 years ago (2016-12-19 06:38:56 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2533983006/320001
4 years ago (2016-12-19 17:49:03 UTC) #52
commit-bot: I haz the power
4 years ago (2016-12-19 18:44:03 UTC) #55
Message was sent while issue was closed.
Committed patchset #17 (id:320001) as
https://chromium.googlesource.com/v8/v8/+/af38272dd94ed287fda9abd285d6071d96a...

Powered by Google App Engine
This is Rietveld 408576698