Lines Matching refs:if
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46 if (key < 0) {
51 if (!IS_UNDEFINED(e) || j in array) {
57 if (!IS_UNDEFINED(key)) {
59 if (!IS_UNDEFINED(e) || key in array) {
77 if (key != previousKey) { // keys may contain duplicates.
79 if (!IS_STRING(e)) e = convert(e);
89 // Optimized for sparse arrays if separator is ''.
100 if (key != last_key) {
102 if (!IS_STRING(e)) e = convert(e);
120 if (length == 0) return '';
124 if (is_array) {
125 // If the array is cyclic, return the empty string for already
127 if (!%PushIfAbsent(visited_arrays, array)) return '';
132 if (UseSparseVariant(array, length, is_array)) {
133 if (separator.length == 0) {
141 if (length == 1) {
143 if (IS_STRING(e)) return e;
151 if (separator.length == 0) {
155 if (!IS_STRING(e)) e = convert(e);
160 if (!IS_UNDEFINED(result)) return result;
164 // If the first element is a number then use the heuristic that the
166 if (!IS_NUMBER(array[0])) {
169 if (!IS_STRING(e)) e = convert(e);
175 if (IS_NUMBER(e)) {
177 } else if (!IS_STRING(e)) {
184 if (!IS_UNDEFINED(result)) return result;
190 if (is_array) visited_arrays.length = visited_arrays.length - 1;
197 if (IS_NUMBER(x)) return %_NumberToString(x);
198 if (IS_BOOLEAN(x)) return x ? 'true' : 'false';
204 if (IS_NULL_OR_UNDEFINED(e)) {
208 // must throw a TypeError if ToObject(e).toLocaleString isn't
225 if (key < 0) {
228 if (j < start_i) {
237 if (!IS_UNDEFINED(current) || j in array) {
242 if (!IS_UNDEFINED(key)) {
243 if (key >= start_i) {
249 if (!IS_UNDEFINED(current) || key in array) {
268 if (key < 0) {
276 if (!IS_UNDEFINED(current) || j in array) {
288 if (!IS_UNDEFINED(current) || j in array) {
294 if (!IS_UNDEFINED(key)) {
295 if (key < start_i) {
300 if (!IS_UNDEFINED(current) || key in array) {
303 } else if (key >= start_i + del_count) {
309 if (!IS_UNDEFINED(current) || key in array) {
331 if (!IS_UNDEFINED(current) || index in array) {
339 if (num_additional_args !== del_count) {
342 if (num_additional_args > del_count) {
350 if (!IS_UNDEFINED(current) || from_index in array) {
364 if (!IS_UNDEFINED(current) || from_index in array) {
384 if (IS_ARRAY(this)) {
386 if (func === ArrayJoin) {
394 if (!IS_SPEC_FUNCTION(func)) {
405 if (len === 0) return "";
411 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
416 if (IS_UNDEFINED(separator)) {
418 } else if (!IS_STRING(separator)) {
423 if (!IS_UNDEFINED(result)) return result;
432 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
438 if (n == 0) {
453 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
469 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
497 if (j_complement <= i) {
502 if (j_complement >= i) {
509 if (!IS_UNDEFINED(current_i) || low in array) {
511 if
520 if (!IS_UNDEFINED(current_j) || high in array) {
530 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
537 if (UseSparseVariant(this, j, IS_ARRAY(this))) {
544 if (!IS_UNDEFINED(current_i) || i in this) {
546 if (!IS_UNDEFINED(current_j) || j in this) {
555 if (!IS_UNDEFINED(current_j) || j in this) {
566 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
573 if (len === 0) {
580 if (IS_ARRAY(this)) {
593 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
601 if (IS_ARRAY(this)) {
618 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
627 if (end !== void 0) end_i = TO_INTEGER(end);
629 if (start_i < 0) {
631 if (start_i < 0) start_i = 0;
633 if (start_i > len) start_i = len;
636 if (end_i < 0) {
638 if (end_i < 0) end_i = 0;
640 if (end_i > len) end_i = len;
645 if (end_i < start_i) return result;
647 if (IS_ARRAY(this) &&
662 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
672 if (start_i < 0) {
674 if (start_i < 0) start_i = 0;
676 if (start_i > len) start_i = len;
685 if (num_arguments == 1) {
689 if (del_count < 0) del_count = 0;
690 if (del_count > len - start_i) del_count = len - start_i;
698 if (num_arguments > 2) {
704 if (IS_ARRAY(this) && num_additional_args !== del_count) {
705 // If we are only deleting/moving a few things near the end of the
709 if (len > 20 && (estimated_non_hole_elements >> 2) < (len - start_i)) {
714 if (use_simple_splice) {
738 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
746 if (!IS_SPEC_FUNCTION(comparefn)) {
748 if (x === y) return 0;
749 if (%_IsSmi(x) && %_IsSmi(y)) {
754 if (x == y) return 0;
766 if (order > 0) {
778 if (to - from <= 10) {
788 if (c01 > 0) {
795 if (c02 >= 0) {
804 if (c12 > 0) {
825 if (order < 0) {
829 } else if (order > 0) {
832 if (high_start == i) break partition;
838 if (order < 0) {
851 // to obj itself, if obj has holes. Return one more than the maximal index
857 if (indices.length > 0) {
858 if (indices[0] == -1) {
862 if (!obj.hasOwnProperty(i) && proto.hasOwnProperty(i)) {
864 if (i >= max) { max = i + 1; }
870 if (!IS_UNDEFINED(index) &&
873 if (index >= max) { max = index + 1; }
888 if (indices.length > 0) {
889 if (indices[0] == -1) {
893 if (proto.hasOwnProperty(i)) {
900 if (!IS_UNDEFINED(index) && from <= index &&
925 if (!obj.hasOwnProperty(first_undefined)) {
932 if (!obj.hasOwnProperty(last_defined)) {
937 if (first_undefined < last_defined) {
943 // If there were any undefineds in the entire array, first_undefined
944 // points to one past the last defined element. Make this true if
947 if (!IS_UNDEFINED(obj[first_undefined])) first_undefined++;
956 if (i in obj.__proto__) {
968 if (length < 2) return this;
972 if (!is_array) {
977 // inherited elements happens very, very rarely, if at all.
979 // if an element on the prototype chain has an element that
985 if (num_non_undefined == -1) {
994 if (!is_array && (num_non_undefined + 1 < max_prototype_element)) {
1008 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
1018 if (!IS_SPEC_FUNCTION(f)) {
1021 if (IS_NULL_OR_UNDEFINED(receiver)) {
1023 } else if (!IS_SPEC_OBJECT(receiver)) {
1031 if (i in array) {
1033 if (%_CallFunction(receiver, element, i, array, f)) {
1044 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
1054 if (!IS_SPEC_FUNCTION(f)) {
1057 if (IS_NULL_OR_UNDEFINED(receiver)) {
1059 } else if (!IS_SPEC_OBJECT(receiver)) {
1064 if (i in array) {
1075 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
1085 if (!IS_SPEC_FUNCTION(f)) {
1088 if (IS_NULL_OR_UNDEFINED(receiver)) {
1090 } else if (!IS_SPEC_OBJECT(receiver)) {
1095 if (i in array) {
1097 if (%_CallFunction(receiver, element, i, array, f)) return true;
1105 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
1115 if (!IS_SPEC_FUNCTION(f)) {
1118 if (IS_NULL_OR_UNDEFINED(receiver)) {
1120 } else if (!IS_SPEC_OBJECT(receiver)) {
1125 if (i in array) {
1127 if (!%_CallFunction(receiver, element, i, array, f)) return false;
1134 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
1144 if (!IS_SPEC_FUNCTION(f)) {
1147 if (IS_NULL_OR_UNDEFINED(receiver)) {
1149 } else if (!IS_SPEC_OBJECT(receiver)) {
1156 if (i in array) {
1167 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
1173 if (length == 0) return -1;
1174 if (IS_UNDEFINED(index)) {
1178 // If index is negative, index from the end of the array.
1179 if (index < 0) {
1181 // If index is still negative, search the entire array.
1182 if (index < 0) index = 0;
1187 if (UseSparseVariant(this, length, IS_ARRAY(this))) {
1189 if (intervals.length == 2 && intervals[0] < 0) {
1193 if (min < intervalMin) min = intervalMin;
1197 if (intervals.length == 0) return -1;
1205 if (!IS_UNDEFINED(key) && this[key] === element) return key;
1212 if (!IS_UNDEFINED(element)) {
1214 if (this[i] === element) return i;
1220 if (IS_UNDEFINED(this[i]) && i in this) {
1229 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
1235 if (length == 0) return -1;
1236 if (%_ArgumentsLength() < 2) {
1240 // If index is negative, index from end of the array.
1241 if (index < 0) index += length;
1242 // If index is still negative, do not search the array.
1243 if (index < 0) return -1;
1244 else if (index >= length) index = length - 1;
1248 if (UseSparseVariant(this, length, IS_ARRAY(this))) {
1250 if (intervals.length == 2 && intervals[0] < 0) {
1254 if (min < intervalMin) min = intervalMin;
1258 if (intervals.length == 0) return -1;
1264 if (!IS_UNDEFINED(key) && this[key] === element) return key;
1271 if (!IS_UNDEFINED(element)) {
1273 if (this[i] === element) return i;
1278 if (IS_UNDEFINED(this[i]) && i in this) {
1287 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
1297 if (!IS_SPEC_FUNCTION(callback)) {
1302 find_initial: if (%_ArgumentsLength() < 2) {
1305 if (!IS_UNDEFINED(current) || i in array) {
1315 if (i in array) {
1324 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
1334 if (!IS_SPEC_FUNCTION(callback)) {
1339 find_initial: if (%_ArgumentsLength() < 2) {
1342 if (!IS_UNDEFINED(current) || i in array) {
1352 if (i in array) {
1382 if (specialFunctions.hasOwnProperty(name)) {
1385 if (!IS_UNDEFINED(len)) {