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

Issue 42115: Faster string.replace with regexp pattern. (Closed)

Created:
11 years, 9 months ago by Lasse Reichstein
Modified:
9 years, 6 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

String.replace implemented in C++.

Patch Set 1 #

Total comments: 33

Patch Set 2 : Addressed review comments #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+637 lines, -127 lines) Patch
M src/jsregexp.h View 1 5 chunks +19 lines, -9 lines 0 comments Download
M src/jsregexp.cc View 3 chunks +17 lines, -71 lines 0 comments Download
M src/objects.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-debug.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M src/objects-inl.h View 1 1 chunk +13 lines, -0 lines 0 comments Download
M src/regexp-delay.js View 1 chunk +3 lines, -3 lines 0 comments Download
M src/regexp-macro-assembler-ia32.h View 1 chunk +6 lines, -0 lines 0 comments Download
M src/regexp-macro-assembler-ia32.cc View 1 1 chunk +73 lines, -0 lines 0 comments Download
M src/runtime.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 1 chunk +497 lines, -0 lines 10 comments Download
M src/string.js View 1 1 chunk +4 lines, -39 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Lasse Reichstein
Review, please.
11 years, 9 months ago (2009-03-12 09:06:30 UTC) #1
Erik Corry
http://codereview.chromium.org/42115/diff/1/5 File src/objects-inl.h (right): http://codereview.chromium.org/42115/diff/1/5#newcode2321 Line 2321: case ATOM: return 0; Indentation is wrong here. ...
11 years, 9 months ago (2009-03-12 10:13:00 UTC) #2
Lasse Reichstein
Addressed review comments, with significant changes. Please rereview. http://codereview.chromium.org/42115/diff/1/5 File src/objects-inl.h (right): http://codereview.chromium.org/42115/diff/1/5#newcode2321 Line 2321: ...
11 years, 9 months ago (2009-03-13 08:36:51 UTC) #3
Erik Corry
LGTM if it lints, passes tests and compiles on ARM. http://codereview.chromium.org/42115/diff/1/10 File src/runtime.cc (right): http://codereview.chromium.org/42115/diff/1/10#newcode1435 ...
11 years, 9 months ago (2009-03-13 09:12:34 UTC) #4
Lasse Reichstein
9 years, 6 months ago (2011-06-14 11:51:17 UTC) #5
http://codereview.chromium.org/42115/diff/1/src/string.js
File src/string.js (right):

http://codereview.chromium.org/42115/diff/1/src/string.js#newcode254
src/string.js:254: // the result.
True. I'll leave it as-is for now, expecting that we will want to move
string.replace(string,string) to C++ and remove it completely.

http://codereview.chromium.org/42115/diff/17/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/42115/diff/17/src/runtime.cc#newcode1207
src/runtime.cc:1207: if (length < (1 << 11) && from < (1 << 19)) {
Fixed to use BitField<int,0,11> and BitField<int,11,19>.

http://codereview.chromium.org/42115/diff/17/src/runtime.cc#newcode1211
src/runtime.cc:1211: Handle<String> slice = Factory::NewStringSlice(subject_,
from, to);
Probably not. Lets make sure.
Some extra string.replace-tests added.

http://codereview.chromium.org/42115/diff/17/src/runtime.cc#newcode1309
src/runtime.cc:1309: void Compile(Handle<String> replacement,
Refactored outside. Just after, but outside.

http://codereview.chromium.org/42115/diff/17/src/runtime.cc#newcode1351
src/runtime.cc:1351: void Apply(ReplacementStringBuilder* builder,
On 2009/03/13 09:12:34, Erik Corry wrote:
> Ditto.

Done.

http://codereview.chromium.org/42115/diff/17/src/runtime.cc#newcode1590
src/runtime.cc:1590: // Guessing the number of parts that the final result
string is build
On 2009/03/13 09:12:34, Erik Corry wrote:
> built

Done.

Powered by Google App Engine
This is Rietveld 408576698