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

Unified Diff: src/heap-inl.h

Issue 12210083: Renamed "symbols" to "internalized strings" throughout the code base, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Yang's comments Created 7 years, 10 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 7b64a3b20b4fae0d4cbc2c48651d3cf145fa327b..87d741fb3b26c9c92d808fc63dc50d80a60d9482 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -112,32 +112,33 @@ bool inline Heap::IsOneByte(String* str, int chars) {
}
-MaybeObject* Heap::AllocateSymbolFromUtf8(Vector<const char> str,
- int chars,
- uint32_t hash_field) {
+MaybeObject* Heap::AllocateInternalizedStringFromUtf8(
+ 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 AllocateOneByteInternalizedString(
+ Vector<const uint8_t>::cast(str), hash_field);
}
- return AllocateInternalSymbol<false>(str, chars, hash_field);
+ return AllocateInternalizedStringImpl<false>(str, chars, hash_field);
}
template<typename T>
-MaybeObject* Heap::AllocateInternalSymbol(T t, int chars, uint32_t hash_field) {
+MaybeObject* Heap::AllocateInternalizedStringImpl(
+ T t, int chars, uint32_t hash_field) {
if (IsOneByte(t, chars)) {
- return AllocateInternalSymbol<true>(t, chars, hash_field);
+ return AllocateInternalizedStringImpl<true>(t, chars, hash_field);
}
- return AllocateInternalSymbol<false>(t, chars, hash_field);
+ return AllocateInternalizedStringImpl<false>(t, chars, hash_field);
}
-MaybeObject* Heap::AllocateOneByteSymbol(Vector<const uint8_t> str,
- uint32_t hash_field) {
+MaybeObject* Heap::AllocateOneByteInternalizedString(Vector<const uint8_t> str,
+ uint32_t hash_field) {
if (str.length() > SeqOneByteString::kMaxLength) {
return Failure::OutOfMemoryException(0x2);
}
// Compute map and object size.
- Map* map = ascii_symbol_map();
+ Map* map = ascii_internalized_string_map();
int size = SeqOneByteString::SizeFor(str.length());
// Allocate string.
@@ -165,13 +166,13 @@ MaybeObject* Heap::AllocateOneByteSymbol(Vector<const uint8_t> str,
}
-MaybeObject* Heap::AllocateTwoByteSymbol(Vector<const uc16> str,
- uint32_t hash_field) {
+MaybeObject* Heap::AllocateTwoByteInternalizedString(Vector<const uc16> str,
+ uint32_t hash_field) {
if (str.length() > SeqTwoByteString::kMaxLength) {
return Failure::OutOfMemoryException(0x3);
}
// Compute map and object size.
- Map* map = symbol_map();
+ Map* map = internalized_string_map();
int size = SeqTwoByteString::SizeFor(str.length());
// Allocate string.
« 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