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

Unified Diff: src/heap-inl.h

Issue 11593007: Replace the use CharacterStreams in Heap::AllocateSymbolInternal and String::ComputeHash (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/heap.h ('K') | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index e5f290086fe06920ecf13598d115b57652641d0d..f28324261841aea9aebb43e6446d8371049b70a9 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -101,9 +101,9 @@ MaybeObject* Heap::AllocateStringFromUtf8(Vector<const char> str,
MaybeObject* Heap::AllocateSymbol(Vector<const char> str,
int chars,
uint32_t hash_field) {
- unibrow::Utf8InputBuffer<> buffer(str.start(),
- static_cast<unsigned>(str.length()));
- return AllocateInternalSymbol(&buffer, chars, hash_field);
+ // Must be ascii.
+ if (chars == str.length()) return AllocateAsciiSymbol(str, hash_field);
Yang 2012/12/17 14:30:34 Maybe we could encapsulate this logic by replacing
+ return AllocateInternalSymbol(str, chars, hash_field);
}
« src/heap.h ('K') | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698