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

Unified Diff: src/heap-inl.h

Issue 11759008: Introduce ENABLE_LATIN_1 compile flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix FilterASCII Created 7 years, 11 months 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
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.cc » ('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 deb767e109d3dbb4eea7a61f1505569f0d641a04..92f7c8d1f9f8b2a9c44667fccd02d4d10d8fb174 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -112,10 +112,12 @@ bool inline Heap::IsOneByte(String* str, int chars) {
}
-MaybeObject* Heap::AllocateSymbol(Vector<const char> str,
- int chars,
- uint32_t hash_field) {
- if (IsOneByte(str, chars)) return AllocateAsciiSymbol(str, hash_field);
+MaybeObject* Heap::AllocateSymbolFromUtf8(Vector<const char> str,
+ int chars,
+ uint32_t hash_field) {
+ if (IsOneByte(str, chars)) {
+ return AllocateOneByteSymbol(Vector<const uint8_t>::cast(str), hash_field);
+ }
return AllocateInternalSymbol<false>(str, chars, hash_field);
}
@@ -129,7 +131,7 @@ MaybeObject* Heap::AllocateInternalSymbol(T t, int chars, uint32_t hash_field) {
}
-MaybeObject* Heap::AllocateAsciiSymbol(Vector<const char> str,
+MaybeObject* Heap::AllocateOneByteSymbol(Vector<const uint8_t> str,
uint32_t hash_field) {
if (str.length() > SeqOneByteString::kMaxLength) {
return Failure::OutOfMemoryException();
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698