Lines Matching defs:replace
128 // Implements boilerplate logic for {match, split, replace, search} of the
1254 // ES6 section 21.1.3.16 String.prototype.replace ( search, replace )
1260 Node* const replace = Parameter(2);
1265 RequireObjectCoercible(context, receiver, "String.prototype.replace");
1267 // Redirect to replacer method if {search[@@replace]} is not undefined.
1278 replace);
1282 return CallJS(call_callable, context, fn, search, receiver, replace);
1297 // {replace}.
1303 GotoIf(TaggedIsSmi(replace), &next);
1304 GotoIfNot(IsString(replace), &next);
1309 CallStub(indexof_callable, context, replace, dollar_string, smi_zero);
1312 // Searching by traversing a cons string tree and replace with cons of
1318 subject_string, search_string, replace));
1337 // The spec requires to perform ToString(replace) if the {replace} is not
1341 GotoIf(TaggedIsSmi(replace), &return_subject);
1342 GotoIf(IsCallableMap(LoadMap(replace)), &return_subject);
1346 CallStub(tostring_callable, context, replace);
1377 // Compute the string to replace with.
1380 GotoIf(TaggedIsSmi(replace), &if_notcallablereplace);
1381 Branch(IsCallableMap(LoadMap(replace)), &if_iscallablereplace,
1388 CallJS(call_callable, context, replace, UndefinedConstant(),
1399 Node* const replace_string = CallStub(tostring_callable, context, replace);