Lines Matching defs:fromIndex
1156 // 6. If argument fromIndex was passed let n be ToInteger(fromIndex); else let n be 0.
1157 int64_t fromIndex = ArrayHelper::GetStartIndexFromArgs(thread, argv, 1, length);
1159 return IndexOfSlowPath(argv, thread, thisObjVal, length, fromIndex);
1164 int64_t length, int64_t fromIndex)
1166 if (fromIndex >= length) {
1172 for (int64_t curIndex = fromIndex; curIndex < length; ++curIndex) {
1184 // 22.1.3.11 Array.prototype.indexOf ( searchElement [ , fromIndex ] )
2297 // 23.1.3.13 Array.prototype.includes ( searchElement [ , fromIndex ] )
2325 // 4. Let n be ? ToIntegerOrInfinity(fromIndex).
2326 // 5. Assert: If fromIndex is undefined, then n is 0.
2327 double fromIndex = 0;
2332 fromIndex = base::NumberHelper::TruncateDouble(fromIndexTemp.GetNumber());
2337 if (fromIndex >= len) {
2339 } else if (fromIndex < -len) {
2340 fromIndex = 0;
2347 int64_t from = (fromIndex >= 0) ? fromIndex : ((len + fromIndex) >= 0 ? len + fromIndex : 0);
2537 // 6. If argument fromIndex was passed let n be ToInteger(fromIndex); else let n be 0.
2538 int64_t fromIndex = ArrayHelper::GetLastStartIndexFromArgs(thread, argv, 1, length);
2540 return LastIndexOfSlowPath(argv, thread, thisObjVal, fromIndex);
2544 const JSHandle<JSTaggedValue> &thisObjVal, int64_t fromIndex)
2546 if (fromIndex < 0) {
2552 for (int64_t curIndex = fromIndex; curIndex >= 0; --curIndex) {
2564 // Array.prototype.lastIndexOf ( searchElement [ , fromIndex ] )