• Home
  • Raw
  • Download

Lines Matching refs:fp

2731 inline REStackFrame *RegexMatcher::StateSave(REStackFrame *fp, int64_t savePatIdx, UErrorCode &stat…  in StateSave()  argument
2733 return fp; in StateSave()
2746 return fp; in StateSave()
2748 fp = (REStackFrame *)(newFP - fFrameSize); // in case of realloc of stack. in StateSave()
2751 int64_t *source = (int64_t *)fp; in StateSave()
2764 fp->fPatIdx = savePatIdx; in StateSave()
2818 REStackFrame *fp = resetStack(); in MatchAt() local
2824 fp->fPatIdx = 0; in MatchAt()
2825 fp->fInputIdx = startIdx; in MatchAt()
2838 op = (int32_t)pat[fp->fPatIdx]; in MatchAt()
2843 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
2844 printf("inputIdx=%ld inputChar=%x sp=%3ld activeLimit=%ld ", fp->fInputIdx, in MatchAt()
2845 UTEXT_CURRENT32(fInputText), (int64_t *)fp-fStack->getBuffer(), fActiveLimit); in MatchAt()
2846 fPattern->dumpOp(fp->fPatIdx); in MatchAt()
2849 fp->fPatIdx++; in MatchAt()
2862 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
2867 if (fp->fInputIdx < fActiveLimit) { in MatchAt()
2868 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
2871 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
2877 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
2888 op = (int32_t)pat[fp->fPatIdx]; // Fetch the second operand in MatchAt()
2889 fp->fPatIdx++; in MatchAt()
2897 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
2916 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
2918 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
2925 fp = StateSave(fp, opValue, status); in MatchAt()
2932 if (toEnd && fp->fInputIdx != fActiveLimit) { in MatchAt()
2934 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
2947 fp->fExtra[opValue+2] = fp->fInputIdx; in MatchAt()
2953 … U_ASSERT(fp->fExtra[opValue+2] >= 0); // Start pos for this group must be set. in MatchAt()
2954 fp->fExtra[opValue] = fp->fExtra[opValue+2]; // Tentative start becomes real. in MatchAt()
2955 fp->fExtra[opValue+1] = fp->fInputIdx; // End position in MatchAt()
2956 U_ASSERT(fp->fExtra[opValue] <= fp->fExtra[opValue+1]); in MatchAt()
2963 if (fp->fInputIdx >= fAnchorLimit) { in MatchAt()
2970 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
2978 …if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && ((void)UTEXT_PREVIOUS32(fInputText), UTEXT_PREVIOU… in MatchAt()
2995 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3001 if (fp->fInputIdx >= fAnchorLimit) { in MatchAt()
3007 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3018 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3024 if (fp->fInputIdx >= fAnchorLimit) { in MatchAt()
3032 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3038 … if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && UTEXT_PREVIOUS32(fInputText)==0x0d)) { in MatchAt()
3043 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3050 if (fp->fInputIdx >= fAnchorLimit) { in MatchAt()
3058 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3060 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3067 if (fp->fInputIdx != fAnchorStart) { in MatchAt()
3068 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3075 if (fp->fInputIdx == fAnchorStart) { in MatchAt()
3081 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3083 if ((fp->fInputIdx < fAnchorLimit) && isLineTerminator(c)) { in MatchAt()
3089 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3096 U_ASSERT(fp->fInputIdx >= fAnchorStart); in MatchAt()
3097 if (fp->fInputIdx <= fAnchorStart) { in MatchAt()
3102 U_ASSERT(fp->fInputIdx <= fAnchorLimit); in MatchAt()
3103 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3107 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3114 UBool success = isWordBoundary(fp->fInputIdx); in MatchAt()
3117 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3125 UBool success = isUWordBoundary(fp->fInputIdx, status); in MatchAt()
3128 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3136 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3138 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3142 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3149 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3151 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3158 … if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==FALSE && fp->fInputIdx==fActiveStart))) { in MatchAt()
3159 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3166 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3168 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3171 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3177 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3179 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3187 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3189 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3192 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3198 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3200 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3208 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3210 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3213 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3218 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3220 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3230 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3232 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3236 fp->fInputIdx = followingGCBoundary(fp->fInputIdx, status); in MatchAt()
3237 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3239 fp->fInputIdx = fActiveLimit; in MatchAt()
3245 if (fp->fInputIdx < fAnchorLimit) { in MatchAt()
3246 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3262 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3264 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3272 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3286 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3289 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3299 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3301 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3307 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3313 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3319 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3324 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3330 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3332 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3335 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3343 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3350 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3356 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3364 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3367 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3371 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3377 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3380 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3388 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3391 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3395 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3401 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3402 if (c==0x0d && fp->fInputIdx < fActiveLimit) { in MatchAt()
3407 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3418 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3421 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3425 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3431 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3433 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3440 fp->fPatIdx = opValue; in MatchAt()
3449 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current in MatchAt()
3450 fp->fPatIdx = opValue; // Then JMP. in MatchAt()
3464 int64_t prevInputIdx = fp->fExtra[frameLoc]; in MatchAt()
3465 U_ASSERT(prevInputIdx <= fp->fInputIdx); in MatchAt()
3466 if (prevInputIdx < fp->fInputIdx) { in MatchAt()
3468 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current in MatchAt()
3469 fp->fPatIdx = opValue; in MatchAt()
3470 fp->fExtra[frameLoc] = fp->fInputIdx; in MatchAt()
3480 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero in MatchAt()
3484 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchAt()
3485 fp->fPatIdx += 3; in MatchAt()
3491 U_ASSERT(loopLoc>=fp->fPatIdx); in MatchAt()
3494 fp = StateSave(fp, loopLoc+1, status); in MatchAt()
3497 fp->fExtra[opValue+1] = fp->fInputIdx; // For loop breaking. in MatchAt()
3499 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3506 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); in MatchAt()
3509 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; in MatchAt()
3521 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1]; in MatchAt()
3522 if (fp->fInputIdx == *pLastInputIdx) { in MatchAt()
3525 *pLastInputIdx = fp->fInputIdx; in MatchAt()
3528 fp = StateSave(fp, fp->fPatIdx, status); in MatchAt()
3537 fp->fPatIdx = opValue + 4; // Loop back. in MatchAt()
3545 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero in MatchAt()
3549 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchAt()
3550 fp->fPatIdx += 3; in MatchAt()
3556 U_ASSERT(loopLoc>fp->fPatIdx); in MatchAt()
3558fp->fExtra[opValue+1] = fp->fInputIdx; // Save initial input index for loop breaking. in MatchAt()
3563 fp = StateSave(fp, fp->fPatIdx, status); in MatchAt()
3565 fp->fPatIdx = loopLoc+1; // Continue with stuff after repeated block in MatchAt()
3573 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); in MatchAt()
3576 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; in MatchAt()
3592 fp->fPatIdx = opValue + 4; // Loop back. in MatchAt()
3604 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1]; in MatchAt()
3605 if (fp->fInputIdx == *pLastInputIdx) { in MatchAt()
3608 *pLastInputIdx = fp->fInputIdx; in MatchAt()
3615 fp = StateSave(fp, opValue + 4, status); in MatchAt()
3631 if (newFP == (int64_t *)fp) { in MatchAt()
3636 newFP[j] = ((int64_t *)fp)[j]; in MatchAt()
3638 fp = (REStackFrame *)newFP; in MatchAt()
3646 int64_t groupStartIdx = fp->fExtra[opValue]; in MatchAt()
3647 int64_t groupEndIdx = fp->fExtra[opValue+1]; in MatchAt()
3651 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. in MatchAt()
3655 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3681 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3683 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3693 int64_t groupStartIdx = fp->fExtra[opValue]; in MatchAt()
3694 int64_t groupEndIdx = fp->fExtra[opValue+1]; in MatchAt()
3698 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. in MatchAt()
3702 utext_setNativeIndex(fInputText, fp->fInputIdx); in MatchAt()
3737 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3739 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3748 fp->fExtra[opValue] = fp->fInputIdx; in MatchAt()
3754 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchAt()
3755 fp->fPatIdx += 1; in MatchAt()
3758 int64_t savedInputIdx = fp->fExtra[dataLoc]; in MatchAt()
3759 U_ASSERT(savedInputIdx <= fp->fInputIdx); in MatchAt()
3760 if (savedInputIdx < fp->fInputIdx) { in MatchAt()
3761 fp->fPatIdx = opValue; // JMP in MatchAt()
3763fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no progress in loop. in MatchAt()
3774 fData[opValue+1] = fp->fInputIdx; in MatchAt()
3797 newFP[j] = ((int64_t *)fp)[j]; in MatchAt()
3799 fp = (REStackFrame *)newFP; in MatchAt()
3802 fp->fInputIdx = fData[opValue+1]; in MatchAt()
3817 if (fp->fInputIdx < fActiveLimit) { in MatchAt()
3818 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3822 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3829 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3842 op = (int32_t)pat[fp->fPatIdx]; in MatchAt()
3843 fp->fPatIdx++; in MatchAt()
3854 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3874 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3876 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3889 fData[opValue+1] = fp->fInputIdx; in MatchAt()
3895 fActiveLimit = fp->fInputIdx; in MatchAt()
3909 int32_t minML = (int32_t)pat[fp->fPatIdx++]; in MatchAt()
3910 int32_t maxML = (int32_t)pat[fp->fPatIdx++]; in MatchAt()
3924 lbStartIdx = fp->fInputIdx - minML; in MatchAt()
3942 if (lbStartIdx < 0 || lbStartIdx < fp->fInputIdx - maxML) { in MatchAt()
3946 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3956 fp = StateSave(fp, fp->fPatIdx-3, status); in MatchAt()
3957 fp->fInputIdx = lbStartIdx; in MatchAt()
3965 if (fp->fInputIdx != fActiveLimit) { in MatchAt()
3971 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3992 int32_t minML = (int32_t)pat[fp->fPatIdx++]; in MatchAt()
3993 int32_t maxML = (int32_t)pat[fp->fPatIdx++]; in MatchAt()
3999 int32_t continueLoc = (int32_t)pat[fp->fPatIdx++]; in MatchAt()
4003 U_ASSERT(continueLoc > fp->fPatIdx); in MatchAt()
4010 lbStartIdx = fp->fInputIdx - minML; in MatchAt()
4028 if (lbStartIdx < 0 || lbStartIdx < fp->fInputIdx - maxML) { in MatchAt()
4036 fp->fPatIdx = continueLoc; in MatchAt()
4042 fp = StateSave(fp, fp->fPatIdx-4, status); in MatchAt()
4043 fp->fInputIdx = lbStartIdx; in MatchAt()
4051 if (fp->fInputIdx != fActiveLimit) { in MatchAt()
4057 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
4081 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
4098 int64_t ix = fp->fInputIdx; in MatchAt()
4120 if (ix == fp->fInputIdx) { in MatchAt()
4121 fp->fPatIdx++; // skip the URX_LOOP_C op. in MatchAt()
4128 int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; in MatchAt()
4132 fp->fExtra[stackLoc] = fp->fInputIdx; in MatchAt()
4133 fp->fInputIdx = ix; in MatchAt()
4138 fp = StateSave(fp, fp->fPatIdx, status); in MatchAt()
4139 fp->fPatIdx++; in MatchAt()
4159 ix = fp->fInputIdx; in MatchAt()
4181 if (ix == fp->fInputIdx) { in MatchAt()
4182 fp->fPatIdx++; // skip the URX_LOOP_C op. in MatchAt()
4189 int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; in MatchAt()
4193 fp->fExtra[stackLoc] = fp->fInputIdx; in MatchAt()
4194 fp->fInputIdx = ix; in MatchAt()
4199 fp = StateSave(fp, fp->fPatIdx, status); in MatchAt()
4200 fp->fPatIdx++; in MatchAt()
4208 backSearchIndex = fp->fExtra[opValue]; in MatchAt()
4209 U_ASSERT(backSearchIndex <= fp->fInputIdx); in MatchAt()
4210 if (backSearchIndex == fp->fInputIdx) { in MatchAt()
4221 U_ASSERT(fp->fInputIdx > 0); in MatchAt()
4222 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
4224 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
4228 fp->fInputIdx > backSearchIndex && in MatchAt()
4230 int32_t prevOp = (int32_t)pat[fp->fPatIdx-2]; in MatchAt()
4233 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
4238 fp = StateSave(fp, fp->fPatIdx-1, status); in MatchAt()
4265 fMatchEnd = fp->fInputIdx; in MatchAt()
4278 fFrame = fp; // The active stack frame when the engine stopped. in MatchAt()
4328 REStackFrame *fp = resetStack(); in MatchChunkAt() local
4334 fp->fPatIdx = 0; in MatchChunkAt()
4335 fp->fInputIdx = startIdx; in MatchChunkAt()
4348 op = (int32_t)pat[fp->fPatIdx]; in MatchChunkAt()
4353 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchChunkAt()
4354 printf("inputIdx=%ld inputChar=%x sp=%3ld activeLimit=%ld ", fp->fInputIdx, in MatchChunkAt()
4355 UTEXT_CURRENT32(fInputText), (int64_t *)fp-fStack->getBuffer(), fActiveLimit); in MatchChunkAt()
4356 fPattern->dumpOp(fp->fPatIdx); in MatchChunkAt()
4359 fp->fPatIdx++; in MatchChunkAt()
4372 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4377 if (fp->fInputIdx < fActiveLimit) { in MatchChunkAt()
4379 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4386 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4398 op = (int32_t)pat[fp->fPatIdx]; // Fetch the second operand in MatchChunkAt()
4399 fp->fPatIdx++; in MatchChunkAt()
4405 const UChar * pInp = inputBuf + fp->fInputIdx; in MatchChunkAt()
4423 fp->fInputIdx += stringLen; in MatchChunkAt()
4425 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4432 fp = StateSave(fp, opValue, status); in MatchChunkAt()
4439 if (toEnd && fp->fInputIdx != fActiveLimit) { in MatchChunkAt()
4441 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4454 fp->fExtra[opValue+2] = fp->fInputIdx; in MatchChunkAt()
4460 … U_ASSERT(fp->fExtra[opValue+2] >= 0); // Start pos for this group must be set. in MatchChunkAt()
4461 fp->fExtra[opValue] = fp->fExtra[opValue+2]; // Tentative start becomes real. in MatchChunkAt()
4462 fp->fExtra[opValue+1] = fp->fInputIdx; // End position in MatchChunkAt()
4463 U_ASSERT(fp->fExtra[opValue] <= fp->fExtra[opValue+1]); in MatchChunkAt()
4469 if (fp->fInputIdx < fAnchorLimit-2) { in MatchChunkAt()
4472 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4475 if (fp->fInputIdx >= fAnchorLimit) { in MatchChunkAt()
4484 if (fp->fInputIdx == fAnchorLimit-1) { in MatchChunkAt()
4486 U16_GET(inputBuf, fAnchorStart, fp->fInputIdx, fAnchorLimit, c); in MatchChunkAt()
4489 … if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && inputBuf[fp->fInputIdx-1]==0x0d)) { in MatchChunkAt()
4496 } else if (fp->fInputIdx == fAnchorLimit-2 && in MatchChunkAt()
4497 inputBuf[fp->fInputIdx]==0x0d && inputBuf[fp->fInputIdx+1]==0x0a) { in MatchChunkAt()
4503 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4509 if (fp->fInputIdx >= fAnchorLimit-1) { in MatchChunkAt()
4511 if (fp->fInputIdx == fAnchorLimit-1) { in MatchChunkAt()
4513 if (inputBuf[fp->fInputIdx] == 0x0a) { in MatchChunkAt()
4527 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4533 if (fp->fInputIdx >= fAnchorLimit) { in MatchChunkAt()
4541 UChar32 c = inputBuf[fp->fInputIdx]; in MatchChunkAt()
4546 … if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && inputBuf[fp->fInputIdx-1]==0x0d)) { in MatchChunkAt()
4551 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4558 if (fp->fInputIdx >= fAnchorLimit) { in MatchChunkAt()
4566 if (inputBuf[fp->fInputIdx] != 0x0a) { in MatchChunkAt()
4567 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4574 if (fp->fInputIdx != fAnchorStart) { in MatchChunkAt()
4575 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4582 if (fp->fInputIdx == fAnchorStart) { in MatchChunkAt()
4588 UChar c = inputBuf[fp->fInputIdx - 1]; in MatchChunkAt()
4589 if ((fp->fInputIdx < fAnchorLimit) && in MatchChunkAt()
4596 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4603 U_ASSERT(fp->fInputIdx >= fAnchorStart); in MatchChunkAt()
4604 if (fp->fInputIdx <= fAnchorStart) { in MatchChunkAt()
4609 U_ASSERT(fp->fInputIdx <= fAnchorLimit); in MatchChunkAt()
4610 UChar c = inputBuf[fp->fInputIdx - 1]; in MatchChunkAt()
4613 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4620 UBool success = isChunkWordBoundary((int32_t)fp->fInputIdx); in MatchChunkAt()
4623 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4631 UBool success = isUWordBoundary(fp->fInputIdx, status); in MatchChunkAt()
4634 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4642 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4644 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4649 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4654 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4661 … if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==FALSE && fp->fInputIdx==fActiveStart))) { in MatchChunkAt()
4662 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4669 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4671 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4675 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4680 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4688 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4690 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4694 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4696 if (c == 0x0d && fp->fInputIdx < fActiveLimit) { in MatchChunkAt()
4699 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c2); in MatchChunkAt()
4701 U16_PREV(inputBuf, 0, fp->fInputIdx, c2); in MatchChunkAt()
4705 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4713 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4715 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4719 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4723 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4733 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4735 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4739 fp->fInputIdx = followingGCBoundary(fp->fInputIdx, status); in MatchChunkAt()
4740 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4742 fp->fInputIdx = fActiveLimit; in MatchChunkAt()
4748 if (fp->fInputIdx < fAnchorLimit) { in MatchChunkAt()
4749 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4765 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4767 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4776 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4789 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4799 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4801 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4808 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4820 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4827 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4829 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4837 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4853 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4861 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4864 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4870 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4873 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4883 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4886 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4893 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4894 if (c==0x0d && fp->fInputIdx < fActiveLimit) { in MatchChunkAt()
4896 if (inputBuf[fp->fInputIdx] == 0x0a) { in MatchChunkAt()
4897 U16_FWD_1(inputBuf, fp->fInputIdx, fActiveLimit); in MatchChunkAt()
4908 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4911 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4917 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4920 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4927 fp->fPatIdx = opValue; in MatchChunkAt()
4936 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current in MatchChunkAt()
4937 fp->fPatIdx = opValue; // Then JMP. in MatchChunkAt()
4951 int32_t prevInputIdx = (int32_t)fp->fExtra[frameLoc]; in MatchChunkAt()
4952 U_ASSERT(prevInputIdx <= fp->fInputIdx); in MatchChunkAt()
4953 if (prevInputIdx < fp->fInputIdx) { in MatchChunkAt()
4955 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current in MatchChunkAt()
4956 fp->fPatIdx = opValue; in MatchChunkAt()
4957 fp->fExtra[frameLoc] = fp->fInputIdx; in MatchChunkAt()
4967 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero in MatchChunkAt()
4971 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchChunkAt()
4972 fp->fPatIdx += 3; in MatchChunkAt()
4978 U_ASSERT(loopLoc>=fp->fPatIdx); in MatchChunkAt()
4981 fp = StateSave(fp, loopLoc+1, status); in MatchChunkAt()
4984 fp->fExtra[opValue+1] = fp->fInputIdx; // For loop breaking. in MatchChunkAt()
4986 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4993 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); in MatchChunkAt()
4996 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; in MatchChunkAt()
5008 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1]; in MatchChunkAt()
5009 if (fp->fInputIdx == *pLastInputIdx) { in MatchChunkAt()
5012 *pLastInputIdx = fp->fInputIdx; in MatchChunkAt()
5015 fp = StateSave(fp, fp->fPatIdx, status); in MatchChunkAt()
5023 fp->fPatIdx = opValue + 4; // Loop back. in MatchChunkAt()
5031 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero in MatchChunkAt()
5035 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchChunkAt()
5036 fp->fPatIdx += 3; in MatchChunkAt()
5042 U_ASSERT(loopLoc>fp->fPatIdx); in MatchChunkAt()
5044fp->fExtra[opValue+1] = fp->fInputIdx; // Save initial input index for loop breaking. in MatchChunkAt()
5049 fp = StateSave(fp, fp->fPatIdx, status); in MatchChunkAt()
5051 fp->fPatIdx = loopLoc+1; // Continue with stuff after repeated block in MatchChunkAt()
5059 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); in MatchChunkAt()
5062 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; in MatchChunkAt()
5078 fp->fPatIdx = opValue + 4; // Loop back. in MatchChunkAt()
5089 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1]; in MatchChunkAt()
5090 if (fp->fInputIdx == *pLastInputIdx) { in MatchChunkAt()
5093 *pLastInputIdx = fp->fInputIdx; in MatchChunkAt()
5100 fp = StateSave(fp, opValue + 4, status); in MatchChunkAt()
5116 if (newFP == (int64_t *)fp) { in MatchChunkAt()
5121 newFP[j] = ((int64_t *)fp)[j]; in MatchChunkAt()
5123 fp = (REStackFrame *)newFP; in MatchChunkAt()
5131 int64_t groupStartIdx = fp->fExtra[opValue]; in MatchChunkAt()
5132 int64_t groupEndIdx = fp->fExtra[opValue+1]; in MatchChunkAt()
5134 int64_t inputIndex = fp->fInputIdx; in MatchChunkAt()
5137 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. in MatchChunkAt()
5159 fp->fInputIdx = inputIndex; in MatchChunkAt()
5161 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5169 int64_t groupStartIdx = fp->fExtra[opValue]; in MatchChunkAt()
5170 int64_t groupEndIdx = fp->fExtra[opValue+1]; in MatchChunkAt()
5174 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. in MatchChunkAt()
5178 CaseFoldingUCharIterator inputItr(inputBuf, fp->fInputIdx, fActiveLimit); in MatchChunkAt()
5211 fp->fInputIdx = inputItr.getIndex(); in MatchChunkAt()
5213 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5221 fp->fExtra[opValue] = fp->fInputIdx; in MatchChunkAt()
5227 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchChunkAt()
5228 fp->fPatIdx += 1; in MatchChunkAt()
5231 int32_t savedInputIdx = (int32_t)fp->fExtra[dataLoc]; in MatchChunkAt()
5232 U_ASSERT(savedInputIdx <= fp->fInputIdx); in MatchChunkAt()
5233 if (savedInputIdx < fp->fInputIdx) { in MatchChunkAt()
5234 fp->fPatIdx = opValue; // JMP in MatchChunkAt()
5236fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no progress in loop. in MatchChunkAt()
5247 fData[opValue+1] = fp->fInputIdx; in MatchChunkAt()
5270 newFP[j] = ((int64_t *)fp)[j]; in MatchChunkAt()
5272 fp = (REStackFrame *)newFP; in MatchChunkAt()
5275 fp->fInputIdx = fData[opValue+1]; in MatchChunkAt()
5287 if (fp->fInputIdx < fActiveLimit) { in MatchChunkAt()
5289 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
5296 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5307 op = (int32_t)pat[fp->fPatIdx]; in MatchChunkAt()
5308 fp->fPatIdx++; in MatchChunkAt()
5318 CaseFoldingUCharIterator inputIterator(inputBuf, fp->fInputIdx, fActiveLimit); in MatchChunkAt()
5335 fp->fInputIdx = inputIterator.getIndex(); in MatchChunkAt()
5337 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5349 fData[opValue+1] = fp->fInputIdx; in MatchChunkAt()
5355 fActiveLimit = fp->fInputIdx; in MatchChunkAt()
5369 int32_t minML = (int32_t)pat[fp->fPatIdx++]; in MatchChunkAt()
5370 int32_t maxML = (int32_t)pat[fp->fPatIdx++]; in MatchChunkAt()
5379 lbStartIdx = fp->fInputIdx - minML; in MatchChunkAt()
5393 if (lbStartIdx < 0 || lbStartIdx < fp->fInputIdx - maxML) { in MatchChunkAt()
5397 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5407 fp = StateSave(fp, fp->fPatIdx-3, status); in MatchChunkAt()
5408 fp->fInputIdx = lbStartIdx; in MatchChunkAt()
5416 if (fp->fInputIdx != fActiveLimit) { in MatchChunkAt()
5422 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5443 int32_t minML = (int32_t)pat[fp->fPatIdx++]; in MatchChunkAt()
5444 int32_t maxML = (int32_t)pat[fp->fPatIdx++]; in MatchChunkAt()
5445 int32_t continueLoc = (int32_t)pat[fp->fPatIdx++]; in MatchChunkAt()
5449 U_ASSERT(continueLoc > fp->fPatIdx); in MatchChunkAt()
5456 lbStartIdx = fp->fInputIdx - minML; in MatchChunkAt()
5470 if (lbStartIdx < 0 || lbStartIdx < fp->fInputIdx - maxML) { in MatchChunkAt()
5478 fp->fPatIdx = continueLoc; in MatchChunkAt()
5484 fp = StateSave(fp, fp->fPatIdx-4, status); in MatchChunkAt()
5485 fp->fInputIdx = lbStartIdx; in MatchChunkAt()
5493 if (fp->fInputIdx != fActiveLimit) { in MatchChunkAt()
5499 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5523 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5540 int32_t ix = (int32_t)fp->fInputIdx; in MatchChunkAt()
5563 if (ix == fp->fInputIdx) { in MatchChunkAt()
5564 fp->fPatIdx++; // skip the URX_LOOP_C op. in MatchChunkAt()
5571 int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; in MatchChunkAt()
5575 fp->fExtra[stackLoc] = fp->fInputIdx; in MatchChunkAt()
5576 fp->fInputIdx = ix; in MatchChunkAt()
5581 fp = StateSave(fp, fp->fPatIdx, status); in MatchChunkAt()
5582 fp->fPatIdx++; in MatchChunkAt()
5602 ix = (int32_t)fp->fInputIdx; in MatchChunkAt()
5625 if (ix == fp->fInputIdx) { in MatchChunkAt()
5626 fp->fPatIdx++; // skip the URX_LOOP_C op. in MatchChunkAt()
5633 int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; in MatchChunkAt()
5637 fp->fExtra[stackLoc] = fp->fInputIdx; in MatchChunkAt()
5638 fp->fInputIdx = ix; in MatchChunkAt()
5643 fp = StateSave(fp, fp->fPatIdx, status); in MatchChunkAt()
5644 fp->fPatIdx++; in MatchChunkAt()
5652 backSearchIndex = (int32_t)fp->fExtra[opValue]; in MatchChunkAt()
5653 U_ASSERT(backSearchIndex <= fp->fInputIdx); in MatchChunkAt()
5654 if (backSearchIndex == fp->fInputIdx) { in MatchChunkAt()
5665 U_ASSERT(fp->fInputIdx > 0); in MatchChunkAt()
5667 … U16_PREV(inputBuf, 0, fp->fInputIdx, prevC); // !!!: should this 0 be one of f*Limit? in MatchChunkAt()
5670 fp->fInputIdx > backSearchIndex && in MatchChunkAt()
5671 inputBuf[fp->fInputIdx-1] == 0x0d) { in MatchChunkAt()
5672 int32_t prevOp = (int32_t)pat[fp->fPatIdx-2]; in MatchChunkAt()
5675 U16_BACK_1(inputBuf, 0, fp->fInputIdx); in MatchChunkAt()
5680 fp = StateSave(fp, fp->fPatIdx-1, status); in MatchChunkAt()
5707 fMatchEnd = fp->fInputIdx; in MatchChunkAt()
5720 fFrame = fp; // The active stack frame when the engine stopped. in MatchChunkAt()