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

Unified Diff: src/api.cc

Issue 11308066: Rename IsAsciiRepresentation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 | « no previous file | src/arm/regexp-macro-assembler-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 3c4496055f772f83d67ebd925a21f671e0e00498..a7bd053415cc7a1290e056d1283d8f31f2124041 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -3850,7 +3850,7 @@ static int RecursivelySerializeToUtf8(i::String* string,
int32_t* last_character) {
int utf8_bytes = 0;
while (true) {
- if (string->IsAsciiRepresentation()) {
+ if (string->IsOneByteRepresentation()) {
i::String::WriteToFlat(string, buffer, start, end);
*last_character = unibrow::Utf16::kNoPreviousCharacter;
return utf8_bytes + end - start;
@@ -3950,7 +3950,7 @@ int String::WriteUtf8(char* buffer,
FlattenString(str); // Flatten the string for efficiency.
}
int string_length = str->length();
- if (str->IsAsciiRepresentation()) {
+ if (str->IsOneByteRepresentation()) {
int len;
if (capacity == -1) {
capacity = str->length() + 1;
@@ -4084,7 +4084,7 @@ int String::WriteAscii(char* buffer,
FlattenString(str); // Flatten the string for efficiency.
}
- if (str->IsAsciiRepresentation()) {
+ if (str->IsOneByteRepresentation()) {
// WriteToFlat is faster than using the StringInputBuffer.
if (length == -1) length = str->length() + 1;
int len = i::Min(length, str->length() - start);
@@ -4199,7 +4199,7 @@ void v8::String::VerifyExternalStringResourceBase(
expectedEncoding = TWO_BYTE_ENCODING;
} else {
expected = NULL;
- expectedEncoding = str->IsAsciiRepresentation() ? ASCII_ENCODING
+ expectedEncoding = str->IsOneByteRepresentation() ? ASCII_ENCODING
: TWO_BYTE_ENCODING;
}
CHECK_EQ(expected, value);
« no previous file with comments | « no previous file | src/arm/regexp-macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698