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

Unified Diff: src/runtime.cc

Issue 14298021: remove IsOneByteConvertible (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index ebe88fe9b72e9f0a22095c4ffc7bca1d55d9a4fb..d21c8887a88843b25fde4aca1cd9b98816626439 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -3339,8 +3339,8 @@ MUST_USE_RESULT static MaybeObject* StringReplaceGlobalRegExpWithString(
// Shortcut for simple non-regexp global replacements
if (regexp->TypeTag() == JSRegExp::ATOM && simple_replace) {
- if (subject->IsOneByteConvertible() &&
- replacement->IsOneByteConvertible()) {
+ if (subject->HasOnlyOneByteChars() &&
+ replacement->HasOnlyOneByteChars()) {
return StringReplaceGlobalAtomRegExpWithString<SeqOneByteString>(
isolate, subject, regexp, replacement, last_match_info);
} else {
@@ -3522,7 +3522,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringReplaceGlobalRegExpWithString) {
if (!subject->IsFlat()) subject = FlattenGetString(subject);
if (replacement->length() == 0) {
- if (subject->IsOneByteConvertible()) {
+ if (subject->HasOnlyOneByteChars()) {
return StringReplaceGlobalRegExpWithEmptyString<SeqOneByteString>(
isolate, subject, regexp, last_match_info);
} else {
@@ -6381,7 +6381,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringBuilderConcat) {
if (first->IsString()) return first;
}
- bool one_byte = special->IsOneByteConvertible();
+ bool one_byte = special->HasOnlyOneByteChars();
int position = 0;
for (int i = 0; i < array_length; i++) {
int increment = 0;
@@ -6422,7 +6422,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringBuilderConcat) {
String* element = String::cast(elt);
int element_length = element->length();
increment = element_length;
- if (one_byte && !element->IsOneByteConvertible()) {
+ if (one_byte && !element->HasOnlyOneByteChars()) {
one_byte = false;
}
} else {
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698