Lines Matching defs:isolate
22 HandleScope scope(isolate);
57 isolate->factory()->NewSubString(subject, 0, position);
58 Handle<String> suffix = isolate->factory()->NewSubString(
63 isolate,
64 String::GetSubstitution(isolate, &match, replacement, start_index));
70 Isolate* isolate, Handle<String> subject, Handle<String> search,
72 StackLimitCheck stackLimitCheck(isolate);
79 Handle<String> first = handle(cons.first(), isolate);
80 Handle<String> second = handle(cons.second(), isolate);
82 if (!StringReplaceOneCharWithString(isolate, first, search, replace, found,
86 if (*found) return isolate->factory()->NewConsString(new_first, second);
89 if (!StringReplaceOneCharWithString(isolate, second, search, replace, found,
94 if (*found) return isolate->factory()->NewConsString(first, new_second);
98 int index = String::IndexOf(isolate, subject, search, 0);
101 Handle<String> first = isolate->factory()->NewSubString(subject, 0, index);
104 isolate, cons1, isolate->factory()->NewConsString(first, replace),
107 isolate->factory()->NewSubString(subject, index + 1, subject->length());
108 return isolate->factory()->NewConsString(cons1, second);
113 HandleScope scope(isolate);
124 if (StringReplaceOneCharWithString(isolate, subject, search, replace, &found,
128 if (isolate->has_pending_exception())
129 return ReadOnlyRoots(isolate).exception();
131 subject = String::Flatten(isolate, subject);
132 if (StringReplaceOneCharWithString(isolate, subject, search, replace, &found,
136 if (isolate->has_pending_exception())
137 return ReadOnlyRoots(isolate).exception();
139 return isolate->StackOverflow();
143 HandleScope handle_scope(isolate);
144 return String::LastIndexOf(isolate, args.at(0), args.at(1),
145 isolate->factory()->undefined_value());
149 HandleScope scope(isolate);
157 isolate->counters()->sub_string_runtime()->Increment();
158 return *isolate->factory()->NewSubString(string, start, end);
162 HandleScope scope(isolate);
166 isolate->counters()->string_add_runtime()->Increment();
167 RETURN_RESULT_OR_FAILURE(isolate,
168 isolate->factory()->NewConsString(str1, str2));
173 HandleScope handles(isolate);
176 return *isolate->factory()->InternalizeString(string);
180 HandleScope handle_scope(isolate);
189 subject = String::Flatten(isolate, subject);
192 return ReadOnlyRoots(isolate).nan_value();
199 HandleScope scope(isolate);
204 THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewInvalidStringLengthError());
221 return isolate->Throw(ReadOnlyRoots(isolate).illegal_argument_string());
235 return ReadOnlyRoots(isolate).empty_string();
245 return isolate->Throw(ReadOnlyRoots(isolate).illegal_argument_string());
248 return ReadOnlyRoots(isolate).empty_string();
254 isolate, answer, isolate->factory()->NewRawOneByteString(length));
263 isolate, answer, isolate->factory()->NewRawTwoByteString(length));
305 HandleScope scope(isolate);
310 s = String::Flatten(isolate, s);
318 elements = isolate->factory()->NewFixedArray(length);
326 position = CopyCachedOneByteCharsToArray(isolate->heap(), chars.begin(),
330 ReadOnlyRoots(isolate).undefined_value(), length);
333 elements = isolate->factory()->NewFixedArray(length);
337 isolate->factory()->LookupSingleCharacterStringFromCode(s->Get(i));
347 return *isolate->factory()->NewJSArrayWithElements(elements);
351 HandleScope handle_scope(isolate);
355 ComparisonResult result = String::Compare(isolate, x, y);
357 return isolate->heap()->ToBoolean(
362 HandleScope handle_scope(isolate);
366 ComparisonResult result = String::Compare(isolate, x, y);
368 return isolate->heap()->ToBoolean(
373 HandleScope handle_scope(isolate);
377 ComparisonResult result = String::Compare(isolate, x, y);
379 return isolate->heap()->ToBoolean(
384 HandleScope handle_scope(isolate);
388 ComparisonResult result = String::Compare(isolate, x, y);
390 return isolate->heap()->ToBoolean(
395 HandleScope handle_scope(isolate);
399 return isolate->heap()->ToBoolean(String::Equals(isolate, x, y));
403 HandleScope scope(isolate);
406 return *String::Flatten(isolate, str);
410 SealHandleScope shs(isolate);
415 HandleScope handle_scope(isolate);
424 isolate->factory()->LookupSingleCharacterStringFromCode('"');
426 int quote_index = String::IndexOf(isolate, string, quotes, 0);
434 quote_index = String::IndexOf(isolate, string, quotes, quote_index + 1);
441 isolate->factory()->NewStringFromAsciiChecked(""");
443 ReplacementStringBuilder builder(isolate->heap(), string,