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

Unified Diff: src/heap/heap.cc

Issue 559913002: Rename ascii to one-byte where applicable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/heap.h ('k') | src/heap/heap-inl.h » ('j') | src/jsregexp.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index f39ad43aa4c9a02be2036479d76c7fb3c56e8b6b..9e8ac3ac0f61e2906a7a61362d1e40a5548f083b 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -2520,8 +2520,8 @@ bool Heap::CreateInitialMaps() {
ALLOCATE_VARSIZE_MAP(STRING_TYPE, undetectable_string)
undetectable_string_map()->set_is_undetectable();
- ALLOCATE_VARSIZE_MAP(ASCII_STRING_TYPE, undetectable_ascii_string);
- undetectable_ascii_string_map()->set_is_undetectable();
+ ALLOCATE_VARSIZE_MAP(ONE_BYTE_STRING_TYPE, undetectable_one_byte_string);
+ undetectable_one_byte_string_map()->set_is_undetectable();
ALLOCATE_VARSIZE_MAP(FIXED_DOUBLE_ARRAY_TYPE, fixed_double_array)
ALLOCATE_VARSIZE_MAP(BYTE_ARRAY_TYPE, byte_array)
@@ -3765,7 +3765,7 @@ AllocationResult Heap::CopyJSObject(JSObject* source, AllocationSite* site) {
static inline void WriteOneByteData(Vector<const char> vector, uint8_t* chars,
int len) {
- // Only works for ascii.
+ // Only works for one byte strings.
DCHECK(vector.length() == len);
MemCopy(chars, vector.start(), len);
}
@@ -3820,7 +3820,7 @@ AllocationResult Heap::AllocateInternalizedStringImpl(T t, int chars,
DCHECK_LE(0, chars);
DCHECK_GE(String::kMaxLength, chars);
if (is_one_byte) {
- map = ascii_internalized_string_map();
+ map = one_byte_internalized_string_map();
size = SeqOneByteString::SizeFor(chars);
} else {
map = internalized_string_map();
@@ -3878,7 +3878,7 @@ AllocationResult Heap::AllocateRawOneByteString(int length,
}
// Partially initialize the object.
- result->set_map_no_write_barrier(ascii_string_map());
+ result->set_map_no_write_barrier(one_byte_string_map());
String::cast(result)->set_length(length);
String::cast(result)->set_hash_field(String::kEmptyHashField);
DCHECK_EQ(size, HeapObject::cast(result)->Size());
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | src/jsregexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698