Lines Matching defs:lastIndex

216     // lastIndex type is Int
217 JSTaggedValue lastIndex = JSHandle<JSObject>::Cast(regexp)->GetPropertyInlinedProps(LAST_INDEX_OFFSET);
218 if (!lastIndex.IsInt() || lastIndex.GetInt() < 0) {
261 uint32_t lastIndex = static_cast<uint32_t>(GetLastIndex(thread, regexp, true));
268 JSTaggedValue(lastIndex), undefined);
275 if (lastIndex > length) {
280 bool matchResult = RegExpExecInternal(thread, regexp, inputString, lastIndex);
293 lastIndex, 0, undefined); // 0: match fail so lastIndex is 0
299 uint32_t newLastIndex = lastIndex;
308 lastIndex, newLastIndex, undefined);
631 uint32_t lastIndex = static_cast<uint32_t>(GetLastIndex(thread, regexp, isFastPath));
634 JSTaggedValue(lastIndex), undefined);
641 // b. Let setStatus be Set(rx, "lastIndex", 0, true).
658 uint32_t lastIndex = static_cast<uint32_t>(GetLastIndex(thread, regexp, isFastPath));
660 result.Update(RegExpBuiltinExecWithoutResult(thread, regexp, string, isFastPath, lastIndex, false));
665 lastIndex = static_cast<uint32_t>(GetLastIndex(thread, regexp, isFastPath));
721 int64_t lastIndex = GetLastIndex(thread, regexp, isFastPath);
724 // d. Let setStatus be Set(rx, "lastIndex", nextIndex, true).
725 JSTaggedValue nextIndex = JSTaggedValue(AdvanceStringIndex(string, lastIndex, fullUnicode));
799 // 7. Let lastIndex be ? ToLength(? Get(R, "lastIndex")).
805 // 8. Perform ? Set(matcher, "lastIndex", lastIndex, true).
845 uint32_t lastIndex = 0;
846 GetLastIndex(thread, regexp, lastIndex);
853 uint32_t lastIndexInput = lastIndex;
867 lastIndex, inputLength, resultString);
872 RegExpExecResultCache::REPLACE_TYPE, lastIndexInput, lastIndex,
879 uint32_t &lastIndex)
887 lastIndex = 0;
894 lastIndex = static_cast<uint32_t>(thisIndex.GetInt());
899 lastIndex = lengthValue.GetNumber();
922 uint32_t lastIndex, uint32_t inputLength,
933 if (lastIndex > inputLength) {
936 bool matchResult = RegExpExecInternal(thread, regexp, inputString, lastIndex);
939 lastIndex = 0;
948 lastIndex = endIndex;
956 // a. Let setStatus be Set(R, "lastIndex", e, true).
959 JSTaggedValue(lastIndex));
968 lastIndex = endIndex;
1041 // b. Let setStatus be Set(rx, "lastIndex", 0, true).
1133 // a. Let thisIndex be ToLength(Get(rx, "lastIndex")).
1139 // d. Let setStatus be Set(rx, "lastIndex", nextIndex, true).
1369 // 4. Let previousLastIndex be ? Get(rx, "lastIndex").
1374 // Perform ? Set(rx, "lastIndex", 0, true).
1383 // 7. Let currentLastIndex be ? Get(rx, "lastIndex").
1387 // Perform ? Set(rx, "lastIndex", previousLastIndex, true).
1543 // a. Let setStatus be Set(splitter, "lastIndex", q, true).
1556 // i. Let e be ToLength(Get(splitter, "lastIndex")).
1563 uint32_t lastIndex = lastIndexNumber.GetNumber();
1565 if (lastIndex == startIndex) {
1585 startIndex = lastIndex;
1679 bool matchResult = RegExpExecInternal(thread, regexp, string, 0); // 0: lastIndex
1795 JSHandle<EcmaString> inputString, int32_t lastIndex)
1809 bool isSuccess = Matcher(thread, regexp, strBuffer, stringLength, lastIndex, isUtf16);
1820 const uint8_t *buffer, size_t length, int32_t lastIndex,
1831 if (lastIndex < 0) {
1832 lastIndex = 0;
1834 bool ret = executor.Execute(buffer, lastIndex, static_cast<uint32_t>(length), bytecodeBuffer, isUtf16);
1982 uint32_t lastIndex = static_cast<uint32_t>(GetLastIndex(thread, regexp, isFastPath));
1989 JSTaggedValue(lastIndex), undefined);
1994 JSTaggedValue result = RegExpBuiltinExecWithoutResult(thread, regexp, inputStr, isFastPath, lastIndex, useCache);
2111 uint32_t newLastIndex = lastIndex;
2119 lastIndex, newLastIndex, undefined);
2127 bool isFastPath, uint32_t lastIndex, bool useCache)
2129 // check global and sticky flag to determine whether need to update lastIndex
2135 if (lastIndex > length) {
2141 lastIndex = 0;
2145 bool matchResult = RegExpExecInternal(thread, regexp, inputString, lastIndex);
2147 uint32_t endIndex = lastIndex;
2158 lastIndex, endIndex, undefined);
2399 // 14. Let setStatus be Set(obj, "lastIndex", 0, true).
2561 uint32_t lastIndexInput, uint32_t lastIndex,
2589 JSTaggedValue lastIndexValue(lastIndex);
2838 JSTaggedValue lastIndex, bool isFastPath)
2841 JSHandle<JSObject>::Cast(regexp)->SetPropertyInlinedPropsWithRep(thread, LAST_INDEX_OFFSET, lastIndex);
2845 thread->GlobalConstants()->GetHandledLastIndexString().GetTaggedValue(), lastIndex);