Home | History | Annotate | Download | only in src

Lines Matching refs:if

12   if (%_ArgumentsLength() == 0) x = '';
13 if (%_IsConstructCall()) {
24 if (!IS_STRING(this) && !IS_STRING_WRAPPER(this)) {
33 if (!IS_STRING(this) && !IS_STRING_WRAPPER(this)) {
45 if (%_IsSmi(result)) {
57 if (!%_IsSmi(result)) {
70 if (len === 1) {
90 if (%_ArgumentsLength() > 1) {
93 if (index < 0) index = 0;
94 if (index > subject.length) index = subject.length;
109 if (%_ArgumentsLength() > 1) {
111 if (!NUMBER_IS_NAN(position)) {
113 if (position < 0) {
116 if (position + patLength < subLength) {
121 if (index < 0) {
145 if (IS_REGEXP(regexp)) {
150 if (!regexp.global) return RegExpExecNoTests(regexp, subject, 0);
153 if (result !== null) lastMatchInfoOverride = null;
169 // If Intl is enabled, then i18n.js will override it and provide the the
176 if (normalizationForm === -1) {
216 if (IS_REGEXP(search)) {
217 // Emulate RegExp.prototype.exec's side effect in step 5, even if
222 if (!IS_SPEC_FUNCTION(replace)) {
225 if (!search.global) {
228 if (match == null) {
232 if (replace.length == 0) {
243 if (lastMatchInfoOverride == null) {
254 if (%_IsSmi(lastMatchInfo[LAST_SUBJECT_INDEX])) {
263 if (search.global) {
273 if (search.length == 1 &&
283 if (start < 0) return subject;
289 if (IS_SPEC_FUNCTION(replace)) {
310 if (next < 0) {
311 if (length > 0) result += string;
315 if (next > 0) result += %_SubString(string, 0, next);
320 if (position < length) {
322 if (peek == 36) { // $$
325 } else if (peek == 38) { // $& - match
329 } else if (peek == 96) { // $` - prefix
332 } else if (peek == 39) { // $' - suffix
335 } else if (peek >= 48 && peek <= 57) {
340 if (position + 1 < string.length) {
342 if (next >= 48 && next <= 57) {
344 if (new_scaled_index < number_of_captures) {
350 if (scaled_index != 0 && scaled_index < number_of_captures) {
352 if (start >= 0) {
370 // Return if there are no more $ characters in the string. If we
372 if (next < 0) {
373 if (position < length) {
380 if (next > position) {
394 // If start isn't valid, return undefined.
395 if (start < 0) return;
401 // TODO(lrn): This array will survive indefinitely if replace is never
410 if (resultArray) {
424 if (IS_NULL(res)) {
430 if (NUMBER_OF_CAPTURES(lastMatchInfo) == 2) {
431 // If the number of captures is two then there are no explicit captures in
442 if (%_IsSmi(elem)) {
446 if (elem > 0) {
467 if (!%_IsSmi(elem)) {
487 if (IS_NULL(matchInfo)) {
500 if (m == 1) {
516 result += replacement; // The add method converts to string if necessary.
528 if (IS_STRING(re)) {
530 } else if (IS_REGEXP(re)) {
536 if (match) {
551 if (!IS_UNDEFINED(end)) {
555 if (start_i < 0) {
557 if (start_i < 0) {
561 if (start_i > s_len) {
566 if (end_i < 0) {
568 if (end_i < 0) {
572 if (end_i > s_len) {
577 if (end_i <= start_i) {
593 if (!IS_REGEXP(separator)) {
596 if (limit === 0) return [];
598 // ECMA-262 says that if separator is undefined, the result should
600 if (IS_UNDEFINED(separator)) return [subject];
604 // If the separator string is empty then return the elements in the subject.
605 if (separator_length === 0) return %StringToArray(subject, limit);
612 if (limit === 0) return [];
620 if (length === 0) {
621 if (DoRegExpExec(separator, subject, 0, 0) != null) {
635 if (startIndex === length) {
641 if (matchInfo == null || length === (startMatch = matchInfo[CAPTURE0])) {
648 if (startIndex === endIndex && endIndex === currentIndex) {
655 if (result.length === limit) break;
661 if (end != -1) {
666 if (result.length === limit) break outer_loop;
685 if (start_i < 0) {
687 } else if (start_i > s_len) {
692 if (!IS_UNDEFINED(end)) {
694 if (end_i > s_len) {
697 if (end_i < 0) end_i = 0;
698 if (start_i > end_i) {
717 // Correct n: If not given, set to string length; if explicitly
719 if (IS_UNDEFINED(n)) {
723 if (len <= 0) return '';
726 // Correct start: If not given (or undefined), set to zero; otherwise
728 if (IS_UNDEFINED(start)) {
732 // If positive, and greater than or equal to the string length,
734 if (start >= s.length) return '';
735 // If negative and absolute value is larger than the string length,
737 if (start < 0) {
739 if (start < 0) start = 0;
744 if (end > s.length) end = s.length;
804 if (n == 1) {
805 if (!%_IsSmi(code)) code = ToNumber(code);
813 if (!%_IsSmi(code)) code = ToNumber(code) & 0xffff;
814 if (code < 0) code = code & 0xffff;
815 if (code > 0xff) break;
818 if (i == n) return one_byte;
824 if (!%_IsSmi(code)) code = ToNumber(code) & 0xffff;