Lines Matching refs:if
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 if (%_IsConstructCall()) {
49 if (!IS_STRING(this) && !IS_STRING_WRAPPER(this)) {
58 if (!IS_STRING(this) && !IS_STRING_WRAPPER(this)) {
67 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
72 if (%_IsSmi(result)) {
81 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
86 if (!%_IsSmi(result)) {
95 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
101 if (len === 1) {
119 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
126 if (%_ArgumentsLength() > 1) {
129 if (index < 0) index = 0;
130 if (index > subject.length) index = subject.length;
138 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
147 if (%_ArgumentsLength() > 1) {
149 if (!NUMBER_IS_NAN(position)) {
151 if (position < 0) {
154 if (position + patLength < subLength) {
159 if (index < 0) {
171 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
175 if (%_ArgumentsLength() === 0) return 0;
183 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
188 if (IS_REGEXP(regexp)) {
189 if (!regexp.global) return RegExpExecNoTests(regexp, subject, 0);
201 // If resulting string is of length 1, we use the one character cache
205 if (start + 1 == end) return %_StringCharAt(string, start);
220 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
226 // Delegate to one of the regular expression variants if necessary.
227 if (IS_REGEXP(search)) {
229 if (IS_SPEC_FUNCTION(replace)) {
230 if (search.global) {
247 if (search.length == 1 &&
257 if (start < 0) return subject;
265 if (IS_SPEC_FUNCTION(replace)) {
292 if (next < 0) {
293 if (length > 0) builder_elements.push(string);
300 if (next > 0) builder_elements.push(SubString(string, 0, next));
305 if (position < length) {
307 if (peek == 36) { // $$
310 } else if (peek == 38) { // $& - match
314 } else if (peek == 96) { // $` - prefix
317 } else if (peek == 39) { // $' - suffix
320 } else if (peek >= 48 && peek <= 57) { // $n, 0 <= n <= 9
323 if (position < length) {
326 if (n != 0 && peek == 48 || peek >= 49 && peek <= 57) {
328 if (nn < m) {
329 // If the two digit capture reference is within range of
339 if (0 < n && n < m) {
359 // Return if there are no more $ characters in the string. If we
361 if (next < 0) {
362 if (position < length) {
369 if (next > position) {
382 // If start isn't valid, return undefined.
383 if (start < 0) return;
396 if (start < 0) return;
401 // TODO(lrn): This array will survive indefinitely if replace is never
410 if (resultArray) {
424 if (IS_NULL(res)) {
431 if (NUMBER_OF_CAPTURES(lastMatchInfo) == 2) {
437 if (%_IsSmi(elem)) {
438 if (elem > 0) {
458 if (!%_IsSmi(elem)) {
478 if (IS_NULL(matchInfo)) return subject;
489 if (m == 1) {
506 result.add(replacement); // The add method converts to string if necessary.
516 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
521 if (IS_STRING(re)) {
523 } else if (IS_REGEXP(re)) {
529 if (match) {
538 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
546 if (end !== void 0) {
550 if (start_i < 0) {
552 if (start_i < 0) {
556 if (start_i > s_len) {
561 if (end_i < 0) {
563 if (end_i < 0) {
567 if (end_i > s_len) {
572 if (end_i <= start_i) {
582 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
589 // ECMA-262 says that if separator is undefined, the result should
591 if (IS_UNDEFINED(separator)) {
596 if (!IS_REGEXP(separator)) {
599 if (limit === 0) return [];
603 // If the separator string is empty then return the elements in the subject.
604 if (separator_length === 0) return %StringToArray(subject, limit);
611 if (limit === 0) return [];
621 if (length === 0) {
622 if (DoRegExpExec(separator, subject, 0, 0) != null) {
636 if (startIndex === length) {
642 if (matchInfo == null || length === (startMatch = matchInfo[CAPTURE0])) {
649 if (startIndex === endIndex && endIndex === currentIndex) {
654 if (currentIndex + 1 == startMatch) {
660 if (result.length === limit) break;
666 if (end != -1) {
667 if (start + 1 == end) {
675 if (result.length === limit) break outer_loop;
686 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
694 if (start_i < 0) {
696 } else if (start_i > s_len) {
701 if (!IS_UNDEFINED(end)) {
703 if (end_i > s_len) {
706 if (end_i < 0) end_i = 0;
707 if (start_i > end_i) {
723 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
730 // Correct n: If not given, set to string length; if explicitly
732 if (n === void 0) {
736 if (len <= 0) return '';
739 // Correct start: If not given (or undefined), set to zero; otherwise
741 if (start === void 0) {
745 // If positive, and greater than or equal to the string length,
747 if (start >= s.length) return '';
748 // If negative and absolute value is larger than the string length,
750 if (start < 0) {
752 if (start < 0) start = 0;
757 if (end > s.length) end = s.length;
767 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
777 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
787 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
797 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
806 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
814 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
822 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
834 if (n == 1) {
835 if (!%_IsSmi(code)) code = ToNumber(code);
845 if (!%_IsSmi(code)) code = ToNumber(code);
931 if (%_ArgumentsLength() > 1) {
943 if (str.length > 0) this.elements.push(str);
947 if (start < 0 || len <= 0) return;
948 if (start < 0x80000 && len < 0x800) {