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

Issue 377006: Remove unnecessary buffer doubling and content copying. (Closed)

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

Description

Remove unnecessary buffer doubling and content copying.

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -26 lines) Patch
M src/scanner.h View 1 5 chunks +31 lines, -12 lines 0 comments Download
M src/scanner.cc View 1 5 chunks +12 lines, -14 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein
Please review. This reduces copying by buffer-growth in a certain test suite from 17Mb to ...
11 years, 1 month ago (2009-11-06 14:18:19 UTC) #1
Lasse Reichstein
http://codereview.chromium.org/377006/diff/1/2 File src/objects.h (right): http://codereview.chromium.org/377006/diff/1/2#newcode3927 Line 3927: inline bool IsTwoByte(); Woops, unrelated change that survived ...
11 years, 1 month ago (2009-11-06 15:31:51 UTC) #2
Christian Plesner Hansen
Lgtm http://codereview.chromium.org/377006/diff/1/3 File src/scanner.cc (right): http://codereview.chromium.org/377006/diff/1/3#newcode386 Line 386: literal_buffer = Please add a comment that ...
11 years, 1 month ago (2009-11-09 08:40:50 UTC) #3
Lasse Reichstein
11 years, 1 month ago (2009-11-09 11:46:53 UTC) #4
http://codereview.chromium.org/377006/diff/1/3
File src/scanner.cc (right):

http://codereview.chromium.org/377006/diff/1/3#newcode386
Line 386: literal_buffer =
Good thing you asked me to comment it. It makes more sense if rearranged a
little.
I've moved this code to StartLiteral() and the setting of next_.literal_buffer
to NULL to Next(). This avoids testing on each added character (the completely
empty literal, i.e., the empty string, doesn't occur often enough to make a
special case of it).
And I've added a comment.

Powered by Google App Engine
This is Rietveld 408576698