Lines Matching defs:fromIndex

1203     int64_t fromIndex = 0;
1205 // 2: [target, fromIndex]. Note that fromIndex is missing in most usage cases.
1208 fromIndex = ArrayHelper::GetStartIndex(thread, fromIndexHandle, length);
1210 // Slow path when fromIndex is obtained from an ECMAObject
1213 return IndexOfSlowPath(argv, thread, thisHandle, length, fromIndex);
1216 if (fromIndex >= length) {
1220 return IndexOfSlowPath(argv, thread, thisHandle, length, fromIndex);
1224 thread, thisHandle, target, static_cast<uint32_t>(fromIndex), static_cast<uint32_t>(length));
1243 // 6. If argument fromIndex was passed let n be ToInteger(fromIndex); else let n be 0.
1244 int64_t fromIndex = ArrayHelper::GetStartIndexFromArgs(thread, argv, 1, length);
1246 return IndexOfSlowPath(argv, thread, thisObjVal, length, fromIndex);
1251 int64_t length, int64_t fromIndex)
1253 if (fromIndex >= length) {
1259 for (int64_t curIndex = fromIndex; curIndex < length; ++curIndex) {
1272 // 22.1.3.11 Array.prototype.indexOf ( searchElement [ , fromIndex ] )
1414 int64_t fromIndex = length - 1;
1416 // 2: [target, fromIndex]. Note that fromIndex is missing in most usage cases.
1419 fromIndex = ArrayHelper::GetLastStartIndex(thread, fromIndexHandle, length);
1421 // Slow path when fromIndex is obtained from an ECMAObject
1424 return LastIndexOfSlowPath(argv, thread, thisHandle, fromIndex);
1427 if (fromIndex < 0) {
1432 thread, thisHandle, target, static_cast<uint32_t>(fromIndex), static_cast<uint32_t>(length));
1451 // 6. If argument fromIndex was passed let n be ToInteger(fromIndex); else let n be 0.
1452 int64_t fromIndex = ArrayHelper::GetLastStartIndexFromArgs(thread, argv, 1, length);
1454 return LastIndexOfSlowPath(argv, thread, thisObjVal, fromIndex);
1458 EcmaRuntimeCallInfo *argv, JSThread *thread, const JSHandle<JSTaggedValue> &thisObjVal, int64_t fromIndex)
1460 if (fromIndex < 0) {
1466 for (int64_t curIndex = fromIndex; curIndex >= 0; --curIndex) {
1478 // 22.1.3.14 Array.prototype.lastIndexOf ( searchElement [ , fromIndex ] )
2927 // 23.1.3.13 Array.prototype.includes ( searchElement [ , fromIndex ] )
2950 // 4. Let n be ? ToIntegerOrInfinity(fromIndex).
2951 // 5. Assert: If fromIndex is undefined, then n is 0.
2952 double fromIndex = 0;
2957 fromIndex = base::NumberHelper::TruncateDouble(fromIndexTemp.GetNumber());
2962 if (fromIndex >= len) {
2964 } else if (fromIndex < -len) {
2965 fromIndex = 0;
2972 int64_t from = (fromIndex >= 0) ? fromIndex : ((len + fromIndex) >= 0 ? len + fromIndex : 0);