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

Issue 11638037: Remove most uses of StringInputBuffer (Closed)

Created:
8 years ago by drcarney
Modified:
7 years, 12 months ago
Reviewers:
Yang
CC:
v8-dev
Visibility:
Public.

Description

Remove most uses of StringInputBuffer R=yangguo@chromium.org BUG= Committed: https://code.google.com/p/v8/source/detail?r=13275

Patch Set 1 #

Patch Set 2 : Last StringInputBuffer instance removed #

Patch Set 3 : last patch set had upload error #

Total comments: 7

Patch Set 4 : cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+322 lines, -247 lines) Patch
M src/api.cc View 1 2 3 6 chunks +7 lines, -9 lines 0 comments Download
M src/codegen.cc View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M src/isolate.h View 5 chunks +12 lines, -12 lines 0 comments Download
M src/isolate.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M src/objects.h View 1 2 3 2 chunks +4 lines, -6 lines 0 comments Download
M src/objects.cc View 1 2 3 14 chunks +186 lines, -122 lines 0 comments Download
M src/objects-inl.h View 1 2 3 1 chunk +17 lines, -7 lines 0 comments Download
M src/runtime.h View 2 chunks +15 lines, -15 lines 0 comments Download
M src/runtime.cc View 9 chunks +40 lines, -41 lines 0 comments Download
M src/string-stream.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M src/v8conversions.cc View 5 chunks +22 lines, -18 lines 0 comments Download
M test/cctest/test-strings.cc View 1 2 3 3 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Yang
8 years ago (2012-12-21 09:21:48 UTC) #1
LGTM with some comments and suggestions.

https://codereview.chromium.org/11638037/diff/11001/src/objects-inl.h
File src/objects-inl.h (right):

https://codereview.chromium.org/11638037/diff/11001/src/objects-inl.h#newcode...
src/objects-inl.h:2859: : op_(op) {
Please initialize is_one_byte_, some compilers whine if it's not.

https://codereview.chromium.org/11638037/diff/11001/src/objects-inl.h#newcode...
src/objects-inl.h:2866: ConsStringIteratorOp* op)
Wouldn't it be cleaner to put offset as last and optional argument?

https://codereview.chromium.org/11638037/diff/11001/src/objects.cc
File src/objects.cc (right):

https://codereview.chromium.org/11638037/diff/11001/src/objects.cc#newcode1542
src/objects.cc:1542: String* string) {
no line break necessary anymore.

https://codereview.chromium.org/11638037/diff/11001/src/objects.cc#newcode7501
src/objects.cc:7501: class RawStringComparator {
You could derive this class from AllStatic.

https://codereview.chromium.org/11638037/diff/11001/src/objects.cc#newcode7534
src/objects.cc:7534: class State {
Since this is another visitor, I was wondering whether it would be better (e.g.
smaller code size) to use virtual methods and abstract classes for Visitor and
ConsOp so that we don't have to templatize String::Visit for all combinations.
Not sure if performance would visibly suffer due to vtable lookup...

https://codereview.chromium.org/11638037/diff/11001/src/objects.h
File src/objects.h (right):

https://codereview.chromium.org/11638037/diff/11001/src/objects.h#newcode7902
src/objects.h:7902: inline void Reset(String* string, unsigned offset);
Save a line using optional argument with default value :)

https://codereview.chromium.org/11638037/diff/11001/src/runtime.h
File src/runtime.h (right):

https://codereview.chromium.org/11638037/diff/11001/src/runtime.h#newcode595
src/runtime.h:595: ConsStringIteratorOp* string_locale_compare_it1() {
Do we really need a second pair of ConsStringIteratorOp? Can't we reuse the
first pair where the second pair is used?

Powered by Google App Engine
This is Rietveld 408576698