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

Unified Diff: src/regexp-macro-assembler.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
Index: src/regexp-macro-assembler.cc
diff --git a/src/regexp-macro-assembler.cc b/src/regexp-macro-assembler.cc
index 13c2a6a32fb96bedc4b0ebf8f83d186d2e68bcb3..c4bfc8d7f70ce591537b39c4a4b823c310d066fb 100644
--- a/src/regexp-macro-assembler.cc
+++ b/src/regexp-macro-assembler.cc
@@ -58,7 +58,7 @@ const byte* NativeRegExpMacroAssembler::StringCharacterPosition(
if (subject->IsOneByteRepresentation()) {
const byte* address;
if (StringShape(subject).IsExternal()) {
- const uint8_t* data = ExternalAsciiString::cast(subject)->GetChars();
+ const uint8_t* data = ExternalOneByteString::cast(subject)->GetChars();
address = reinterpret_cast<const byte*>(data);
} else {
DCHECK(subject->IsSeqOneByteString());
@@ -110,11 +110,11 @@ NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Match(
subject_ptr = slice->parent();
slice_offset = slice->offset();
}
- // Ensure that an underlying string has the same ASCII-ness.
- bool is_ascii = subject_ptr->IsOneByteRepresentation();
+ // Ensure that an underlying string has the same representation.
+ bool is_one_byte = subject_ptr->IsOneByteRepresentation();
DCHECK(subject_ptr->IsExternalString() || subject_ptr->IsSeqString());
// String is now either Sequential or External
- int char_size_shift = is_ascii ? 0 : 1;
+ int char_size_shift = is_one_byte ? 0 : 1;
const byte* input_start =
StringCharacterPosition(subject_ptr, start_offset + slice_offset);
« src/jsregexp.cc ('K') | « src/regexp-macro-assembler.h ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698