Lines Matching refs:regexp
206 bool BuiltinsRegExp::IsFastRegExp(JSThread *thread, JSHandle<JSTaggedValue> regexp, in IsFastRegExp() argument
211 JSHClass *hclass = JSHandle<JSObject>::Cast(regexp)->GetJSHClass(); in IsFastRegExp()
218 …JSTaggedValue lastIndex = JSHandle<JSObject>::Cast(regexp)->GetPropertyInlinedProps(LAST_INDEX_OFF… in IsFastRegExp()
257 JSTaggedValue BuiltinsRegExp::RegExpTestFast(JSThread *thread, JSHandle<JSTaggedValue> regexp, in RegExpTestFast() argument
262 uint32_t lastIndex = static_cast<uint32_t>(GetLastIndex(thread, regexp, true)); in RegExpTestFast()
268 … RegExpExecResultCache::TEST_TYPE, regexp, in RegExpTestFast()
277 SetLastIndex(thread, regexp, JSTaggedValue(0), true); in RegExpTestFast()
281 bool matchResult = RegExpExecInternal(thread, regexp, inputString, lastIndex); in RegExpTestFast()
283 bool global = GetOriginalFlag(thread, regexp, RegExpParser::FLAG_GLOBAL); in RegExpTestFast()
284 bool sticky = GetOriginalFlag(thread, regexp, RegExpParser::FLAG_STICKY); in RegExpTestFast()
288 SetLastIndex(thread, regexp, JSTaggedValue(0), true); in RegExpTestFast()
291 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, inputStr, in RegExpTestFast()
303 SetLastIndex(thread, regexp, endIndex, true); in RegExpTestFast()
306 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, inputStr, in RegExpTestFast()
334 JSHandle<JSRegExp> regexp(thread, JSRegExp::Cast(thisObj->GetTaggedObject())); in ToString() local
336 getSource.Update(regexp->GetOriginalSource()); in ToString()
339 uint8_t flagsBits = static_cast<uint8_t>(regexp->GetOriginalFlags().GetInt()); in ToString()
610 JSTaggedValue BuiltinsRegExp::RegExpMatch(JSThread *thread, const JSHandle<JSTaggedValue> regexp, in RegExpMatch() argument
619 bool isGlobal = GetFlag(thread, regexp, RegExpParser::FLAG_GLOBAL, isFastPath); in RegExpMatch()
625 return RegExpBuiltinExec(thread, regexp, string, isFastPath, useCache); in RegExpMatch()
627 return RegExpExec(thread, regexp, string, useCache); in RegExpMatch()
632 uint32_t lastIndex = static_cast<uint32_t>(GetLastIndex(thread, regexp, isFastPath)); in RegExpMatch()
634 … RegExpExecResultCache::MATCH_TYPE, regexp, in RegExpMatch()
640 bool fullUnicode = GetFlag(thread, regexp, RegExpParser::FLAG_UTF16, isFastPath); in RegExpMatch()
643 SetLastIndex(thread, regexp, JSTaggedValue(0), isFastPath); in RegExpMatch()
659 uint32_t lastIndex = static_cast<uint32_t>(GetLastIndex(thread, regexp, isFastPath)); in RegExpMatch()
661 …result.Update(RegExpBuiltinExecWithoutResult(thread, regexp, string, isFastPath, lastIndex, false)… in RegExpMatch()
666 lastIndex = static_cast<uint32_t>(GetLastIndex(thread, regexp, isFastPath)); in RegExpMatch()
669 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, string, in RegExpMatch()
675 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, string, in RegExpMatch()
688 result.Update(RegExpExec(thread, regexp, string, useCache)); in RegExpMatch()
722 int64_t lastIndex = GetLastIndex(thread, regexp, isFastPath); in RegExpMatch()
727 SetLastIndex(thread, regexp, nextIndex, isFastPath); in RegExpMatch()
758 JSTaggedValue BuiltinsRegExp::RegExpMatchAll(JSThread *thread, const JSHandle<JSTaggedValue> regexp, in RegExpMatchAll() argument
765 JSHandle<JSRegExp> jsRegExp = JSHandle<JSRegExp>::Cast(regexp); in RegExpMatchAll()
779 JSHandle<JSObject> objHandle(regexp); in RegExpMatchAll()
786 … JSHandle<JSTaggedValue> getFlags(JSObject::GetProperty(thread, regexp, flagsString).GetValue()); in RegExpMatchAll()
795 runtimeInfo->SetCallArg(regexp.GetTaggedValue(), flagsStrHandle.GetTaggedValue()); in RegExpMatchAll()
802 …JSHandle<JSTaggedValue> getLastIndex(JSObject::GetProperty(thread, regexp, lastIndexString).GetVal… in RegExpMatchAll()
830 JSTaggedValue BuiltinsRegExp::RegExpReplaceFast(JSThread *thread, JSHandle<JSTaggedValue> regexp, in RegExpReplaceFast() argument
833 ASSERT(regexp->IsJSRegExp()); in RegExpReplaceFast()
835 JSHandle<JSRegExp> regexpHandle(regexp); in RegExpReplaceFast()
838 JSTaggedValue bufferData = JSRegExp::Cast(regexp->GetTaggedObject())->GetByteCodeBuffer(); in RegExpReplaceFast()
847 GetLastIndex(thread, regexp, lastIndex); in RegExpReplaceFast()
858 … RegExpExecResultCache::REPLACE_TYPE, regexp, in RegExpReplaceFast()
867 MatchAndReplace(thread, regexp, inputString, flags, in RegExpReplaceFast()
871 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, tagInputString, in RegExpReplaceFast()
879 JSTaggedValue BuiltinsRegExp::GetLastIndex(JSThread *thread, JSHandle<JSTaggedValue> regexp, in GetLastIndex() argument
882 JSTaggedValue bufferData = JSRegExp::Cast(regexp->GetTaggedObject())->GetByteCodeBuffer(); in GetLastIndex()
891 ObjectFastOperator::FastGetPropertyByValue(thread, regexp.GetTaggedValue(), in GetLastIndex()
921 JSTaggedValue BuiltinsRegExp::MatchAndReplace(JSThread *thread, JSHandle<JSTaggedValue> regexp, in MatchAndReplace() argument
937 bool matchResult = RegExpExecInternal(thread, regexp, inputString, lastIndex); in MatchAndReplace()
941 ObjectFastOperator::FastSetPropertyByValue(thread, regexp.GetTaggedValue(), in MatchAndReplace()
958 ObjectFastOperator::FastSetPropertyByValue(thread, regexp.GetTaggedValue(), in MatchAndReplace()
1363 const JSHandle<JSTaggedValue> regexp, in RegExpSearch() argument
1366 bool isFastPath = IsFastRegExp(thread, regexp); in RegExpSearch()
1368 return RegExpSearchFast(thread, regexp, string); in RegExpSearch()
1372 …JSHandle<JSTaggedValue> previousLastIndex = JSObject::GetProperty(thread, regexp, lastIndexString)… in RegExpSearch()
1378 JSObject::SetProperty(thread, regexp, lastIndexString, value, true); in RegExpSearch()
1382 JSHandle<JSTaggedValue> result(thread, RegExpExec(thread, regexp, string, false)); in RegExpSearch()
1385 …JSHandle<JSTaggedValue> currentLastIndex = JSObject::GetProperty(thread, regexp, lastIndexString).… in RegExpSearch()
1390 JSObject::SetProperty(thread, regexp, lastIndexString, previousLastIndex, true); in RegExpSearch()
1403 const JSHandle<JSTaggedValue> regexp, in RegExpSearchFast() argument
1410 … RegExpExecResultCache::SEARCH_TYPE, regexp, in RegExpSearchFast()
1416 bool matchResult = RegExpExecInternal(thread, regexp, stringHandle, 0); in RegExpSearchFast()
1418 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, string, in RegExpSearchFast()
1426 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, string, in RegExpSearchFast()
1433 JSTaggedValue BuiltinsRegExp::RegExpSplit(JSThread *thread, const JSHandle<JSTaggedValue> regexp, in RegExpSplit() argument
1441 return RegExpSplitFast(thread, regexp, jsString, MAX_SPLIT_LIMIT, useCache); in RegExpSplit()
1445 … return RegExpSplitFast(thread, regexp, jsString, static_cast<uint32_t>(lim), useCache); in RegExpSplit()
1452 JSHandle<JSObject> objHandle(regexp); in RegExpSplit()
1460 …JSHandle<JSTaggedValue> taggedFlags = JSObject::GetProperty(thread, regexp, flagsString).GetValue(… in RegExpSplit()
1492 runtimeInfo->SetCallArg(regexp.GetTaggedValue(), newFlagsHandle.GetTaggedValue()); in RegExpSplit()
1660 …TaggedValue BuiltinsRegExp::RegExpSplitFast(JSThread *thread, const JSHandle<JSTaggedValue> regexp, in RegExpSplitFast() argument
1670 … RegExpExecResultCache::SPLIT_TYPE, regexp, in RegExpSplitFast()
1680 bool matchResult = RegExpExecInternal(thread, regexp, string, 0); // 0: lastIndex in RegExpSplitFast()
1684 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, jsString, in RegExpSplitFast()
1693 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, jsString, in RegExpSplitFast()
1699 bool isUnicode = GetOriginalFlag(thread, regexp, RegExpParser::FLAG_UTF16); in RegExpSplitFast()
1700 bool isSticky = GetOriginalFlag(thread, regexp, RegExpParser::FLAG_STICKY); in RegExpSplitFast()
1711 bool matchResult = RegExpExecInternal(thread, regexp, string, nextMatchFrom); in RegExpSplitFast()
1738 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, jsString, in RegExpSplitFast()
1767 … RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, jsString, in RegExpSplitFast()
1788 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, jsString, in RegExpSplitFast()
1795 bool BuiltinsRegExp::RegExpExecInternal(JSThread *thread, const JSHandle<JSTaggedValue> regexp, in RegExpExecInternal() argument
1811 JSTaggedValue regexpSource = JSRegExp::Cast(regexp->GetTaggedObject())->GetOriginalSource(); in RegExpExecInternal()
1821 isSuccess = Matcher(thread, regexp, offHeapString, stringLength, lastIndex, isUtf16, in RegExpExecInternal()
1825 …isSuccess = Matcher(thread, regexp, strBuffer, stringLength, lastIndex, isUtf16, StringSource::ONH… in RegExpExecInternal()
1836 bool BuiltinsRegExp::Matcher(JSThread *thread, const JSHandle<JSTaggedValue> regexp, in Matcher() argument
1842 JSTaggedValue bufferData = JSRegExp::Cast(regexp->GetTaggedObject())->GetByteCodeBuffer(); in Matcher()
2001 …ggedValue BuiltinsRegExp::RegExpBuiltinExec(JSThread *thread, const JSHandle<JSTaggedValue> regexp, in RegExpBuiltinExec() argument
2005 ASSERT(regexp->IsJSRegExp()); in RegExpBuiltinExec()
2008 uint32_t lastIndex = static_cast<uint32_t>(GetLastIndex(thread, regexp, isFastPath)); in RegExpBuiltinExec()
2014 … RegExpExecResultCache::EXEC_TYPE, regexp, in RegExpBuiltinExec()
2020 …JSTaggedValue result = RegExpBuiltinExecWithoutResult(thread, regexp, inputStr, isFastPath, lastIn… in RegExpBuiltinExec()
2058 JSHandle<JSTaggedValue> groupName(thread, JSHandle<JSRegExp>::Cast(regexp)->GetGroupName()); in RegExpBuiltinExec()
2122 bool hasIndices = GetOriginalFlag(thread, regexp, RegExpParser::FLAG_HASINDICES); in RegExpBuiltinExec()
2135 bool global = GetOriginalFlag(thread, regexp, RegExpParser::FLAG_GLOBAL); in RegExpBuiltinExec()
2136 bool sticky = GetOriginalFlag(thread, regexp, RegExpParser::FLAG_STICKY); in RegExpBuiltinExec()
2140 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, inputStr, in RegExpBuiltinExec()
2148 …ltinsRegExp::RegExpBuiltinExecWithoutResult(JSThread *thread, const JSHandle<JSTaggedValue> regexp, in RegExpBuiltinExecWithoutResult() argument
2153 bool global = GetOriginalFlag(thread, regexp, RegExpParser::FLAG_GLOBAL); in RegExpBuiltinExecWithoutResult()
2154 bool sticky = GetOriginalFlag(thread, regexp, RegExpParser::FLAG_STICKY); in RegExpBuiltinExecWithoutResult()
2159 SetLastIndex(thread, regexp, JSTaggedValue(0), isFastPath); in RegExpBuiltinExecWithoutResult()
2168 bool matchResult = RegExpExecInternal(thread, regexp, inputString, lastIndex); in RegExpBuiltinExecWithoutResult()
2173 SetLastIndex(thread, regexp, JSTaggedValue(0), isFastPath); in RegExpBuiltinExecWithoutResult()
2178 RegExpExecResultCache::AddResultInCache(thread, cacheTable, regexp, inputStr, in RegExpBuiltinExecWithoutResult()
2188 SetLastIndex(thread, regexp, endIndex, isFastPath); in RegExpBuiltinExecWithoutResult()
2194 JSTaggedValue BuiltinsRegExp::RegExpExec(JSThread *thread, const JSHandle<JSTaggedValue> ®exp, in RegExpExec() argument
2200 ASSERT(regexp->IsECMAObject()); in RegExpExec()
2208 …JSTaggedValue execVal = ObjectFastOperator::FastGetPropertyByValue(thread, regexp.GetTaggedValue(), in RegExpExec()
2218 …EcmaRuntimeCallInfo *info = EcmaInterpreter::NewRuntimeCallInfo(thread, exec, regexp, undefined, 1… in RegExpExec()
2231 if (!regexp->IsJSRegExp()) { in RegExpExec()
2236 return RegExpBuiltinExec(thread, regexp, inputString, false, useCache, isIntermediateResult); in RegExpExec()
2399 JSHandle<JSRegExp> regexp(thread, JSRegExp::Cast(obj->GetTaggedObject())); in RegExpInitialize() local
2401 regexp->SetOriginalSource(thread, patternStrHandle.GetTaggedValue()); in RegExpInitialize()
2403 regexp->SetOriginalFlags(thread, JSTaggedValue(flagsBits)); in RegExpInitialize()
2410 regexp->SetGroupName(thread, taggedArray); in RegExpInitialize()
2416 factory->NewJSRegExpByteCodeData(regexp, buffer, bufferSize); in RegExpInitialize()
2417 …regExpParserCache->SetCache(*patternStrHandle, flagsBits, regexp->GetByteCodeBuffer(), bufferSize,… in RegExpInitialize()
2419 regexp->SetByteCodeBuffer(thread, getCache.first); in RegExpInitialize()
2420 regexp->SetLength(static_cast<uint32_t>(getCache.second)); in RegExpInitialize()
2507 const JSHandle<JSTaggedValue> regexp, in FindCachedResult() argument
2511 JSHandle<JSRegExp> regexpObj(regexp); in FindCachedResult()
2570 BuiltinsRegExp::SetLastIndex(thread, regexp, Get(index + LAST_INDEX_INDEX), true); in FindCachedResult()
2581 const JSHandle<JSTaggedValue> regexp, in AddResultInCache() argument
2587 JSHandle<JSRegExp> regexpObj(regexp); in AddResultInCache()
2817 bool BuiltinsRegExp::GetFlag(JSThread *thread, const JSHandle<JSTaggedValue> regexp, uint32_t flag,… in GetFlag() argument
2820 …uint8_t flagsBits = static_cast<uint8_t>(JSHandle<JSRegExp>::Cast(regexp)->GetOriginalFlags().GetI… in GetFlag()
2849 …ObjectFastOperator::FastGetPropertyByValue(thread, regexp.GetTaggedValue(), flagStr.GetTaggedValue… in GetFlag()
2855 bool BuiltinsRegExp::GetOriginalFlag(JSThread *thread, const JSHandle<JSTaggedValue> regexp, uint32… in GetOriginalFlag() argument
2857 return GetFlag(thread, regexp, flag, true); in GetOriginalFlag()
2860 void BuiltinsRegExp::SetLastIndex(JSThread *thread, const JSHandle<JSTaggedValue> regexp, in SetLastIndex() argument
2864 …JSHandle<JSObject>::Cast(regexp)->SetPropertyInlinedPropsWithRep(thread, LAST_INDEX_OFFSET, lastIn… in SetLastIndex()
2867 ObjectFastOperator::FastSetPropertyByValue(thread, regexp.GetTaggedValue(), in SetLastIndex()
2871 int64_t BuiltinsRegExp::GetLastIndex(JSThread *thread, const JSHandle<JSTaggedValue> regexp, bool i… in GetLastIndex() argument
2874 … return JSHandle<JSObject>::Cast(regexp)->GetPropertyInlinedProps(LAST_INDEX_OFFSET).GetInt(); in GetLastIndex()
2877 …thread, regexp.GetTaggedValue(), thread->GlobalConstants()->GetHandledLastIndexString().GetTaggedV… in GetLastIndex()