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

Issue 3467010: Refactored string search code. (Closed)

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

Description

Refactored string search code. Made string search state explicit for repreated calls (a StringSearch class).

Patch Set 1 #

Total comments: 16

Patch Set 2 : Dropped ids. More objectified. #

Patch Set 3 : Addressed review comments. #

Patch Set 4 : Removed backing-store abstraction. #

Total comments: 14

Patch Set 5 : Addressed review comments. #

Patch Set 6 : Added to xcode project too. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+520 lines, -433 lines) Patch
M src/SConscript View 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 chunks +45 lines, -101 lines 0 comments Download
M src/string-search.h View 1 2 3 4 2 chunks +440 lines, -332 lines 0 comments Download
M tools/gyp/v8.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M tools/v8.xcodeproj/project.pbxproj View 6 chunks +8 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_base.vcproj View 1 chunk +8 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_base_arm.vcproj View 1 chunk +8 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_base_x64.vcproj View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Lasse Reichstein
10 years, 3 months ago (2010-09-22 13:10:52 UTC) #1
Erik Corry
I'm not very keen on this one. The idea of having an array with constants ...
10 years, 3 months ago (2010-09-22 13:36:00 UTC) #2
Lasse Reichstein
I have removed all the strategy-id-code. It wasn't used for anything yet. I'm not storing ...
10 years, 3 months ago (2010-09-24 08:21:21 UTC) #3
Lasse Reichstein
I have removed all the strategy-id-code. It wasn't used for anything yet. I'm not storing ...
10 years, 3 months ago (2010-09-24 08:23:27 UTC) #4
Erik Corry
LGTM http://codereview.chromium.org/3467010/diff/9001/10001 File src/SConscript (right): http://codereview.chromium.org/3467010/diff/9001/10001#newcode103 src/SConscript:103: string-search.cc What about xcode and MSVC? http://codereview.chromium.org/3467010/diff/9001/10003 File ...
10 years, 2 months ago (2010-09-28 13:16:41 UTC) #5
Lasse Reichstein
10 years, 2 months ago (2010-09-29 11:01:20 UTC) #6
http://codereview.chromium.org/3467010/diff/9001/10001
File src/SConscript (right):

http://codereview.chromium.org/3467010/diff/9001/10001#newcode103
src/SConscript:103: string-search.cc
I added the files to the visual-studio projects.
I see no way to manually edit the xcode project.

http://codereview.chromium.org/3467010/diff/9001/10003
File src/string-search.h (right):

http://codereview.chromium.org/3467010/diff/9001/10003#newcode85
src/string-search.h:85: // Table used temporarily while building the BoyerMoore
goodsuffix
On 2010/09/28 13:16:49, Erik Corry wrote:
> goodsuffix -> good suffix

Done.

http://codereview.chromium.org/3467010/diff/9001/10003#newcode121
src/string-search.h:121: // ASCII Needle;
On 2010/09/28 13:16:49, Erik Corry wrote:
> Needle -> needle
> and below.

Done.

http://codereview.chromium.org/3467010/diff/9001/10003#newcode353
src/string-search.h:353: 
Done.

http://codereview.chromium.org/3467010/diff/9001/10003#newcode415
src/string-search.h:415: strategy_ = &BoyerMooreSearch;
Moved to just after the call to Populate...

http://codereview.chromium.org/3467010/diff/9001/10003#newcode498
src/string-search.h:498: strategy_ = &BoyerMooreHorspoolSearch;
Too.

http://codereview.chromium.org/3467010/diff/9001/10003#newcode559
src/string-search.h:559: // object should only be constructed once and then
called multiple times.
The Search function isn't static, nor are the pattern_ and strategy_ fields. An
object should be created.
Rewording the comment to be more clear.

Powered by Google App Engine
This is Rietveld 408576698