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

Issue 11593007: Replace the use CharacterStreams in Heap::AllocateSymbolInternal and String::ComputeHash (Closed)

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

Description

Replace the use CharacterStreams in Heap::AllocateSymbolInternal and String::ComputeHash R=yangguo@chromium.org BUG= Committed: https://code.google.com/p/v8/source/detail?r=13242

Patch Set 1 #

Total comments: 2

Patch Set 2 : issues addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+416 lines, -359 lines) Patch
M src/heap.h View 1 1 chunk +9 lines, -5 lines 0 comments Download
M src/heap.cc View 1 5 chunks +85 lines, -30 lines 0 comments Download
M src/heap-inl.h View 1 1 chunk +25 lines, -3 lines 0 comments Download
M src/json-parser.h View 1 1 chunk +11 lines, -1 line 0 comments Download
M src/objects.h View 8 chunks +45 lines, -74 lines 0 comments Download
M src/objects.cc View 16 chunks +133 lines, -124 lines 0 comments Download
M src/objects-inl.h View 6 chunks +81 lines, -79 lines 0 comments Download
M src/profile-generator.cc View 5 chunks +11 lines, -10 lines 0 comments Download
M src/unicode.h View 1 chunk +0 lines, -4 lines 0 comments Download
M test/cctest/test-strings.cc View 1 chunk +16 lines, -29 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Yang
8 years ago (2012-12-17 14:30:34 UTC) #1
LGTM so far, with comments.

In json-parser.h we integrated string hashing into the loop that does the
parsing to speed up json parsing. We still use uc32 characters there. I think
that part needs to be changed as well.

https://codereview.chromium.org/11593007/diff/1/src/heap-inl.h
File src/heap-inl.h (right):

https://codereview.chromium.org/11593007/diff/1/src/heap-inl.h#newcode105
src/heap-inl.h:105: if (chars == str.length()) return AllocateAsciiSymbol(str,
hash_field);
Maybe we could encapsulate this logic by replacing the if-condition with
something like AllocateInternalSymbolHelper::IsOneByte(str, chars) and make sure
this gets inlined.

https://codereview.chromium.org/11593007/diff/1/src/heap.h
File src/heap.h (right):

https://codereview.chromium.org/11593007/diff/1/src/heap.h#newcode771
src/heap.h:771: MUST_USE_RESULT MaybeObject* AllocateExternalSymbol(
Let's remove this function header, while we are at it. Seems to have no
implementation or any use.

Powered by Google App Engine
This is Rietveld 408576698