• Home
  • Raw
  • Download

Lines Matching refs:fp

2721 inline REStackFrame *RegexMatcher::StateSave(REStackFrame *fp, int64_t savePatIdx, UErrorCode &stat…  in StateSave()  argument
2723 return fp; in StateSave()
2736 return fp; in StateSave()
2738 fp = (REStackFrame *)(newFP - fFrameSize); // in case of realloc of stack. in StateSave()
2741 int64_t *source = (int64_t *)fp; in StateSave()
2754 fp->fPatIdx = savePatIdx; in StateSave()
2808 REStackFrame *fp = resetStack(); in MatchAt() local
2814 fp->fPatIdx = 0; in MatchAt()
2815 fp->fInputIdx = startIdx; in MatchAt()
2828 op = (int32_t)pat[fp->fPatIdx]; in MatchAt()
2833 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
2834 printf("inputIdx=%ld inputChar=%x sp=%3ld activeLimit=%ld ", fp->fInputIdx, in MatchAt()
2835 UTEXT_CURRENT32(fInputText), (int64_t *)fp-fStack->getBuffer(), fActiveLimit); in MatchAt()
2836 fPattern->dumpOp(fp->fPatIdx); in MatchAt()
2839 fp->fPatIdx++; in MatchAt()
2852 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
2857 if (fp->fInputIdx < fActiveLimit) { in MatchAt()
2858 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
2861 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
2867 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
2878 op = (int32_t)pat[fp->fPatIdx]; // Fetch the second operand in MatchAt()
2879 fp->fPatIdx++; in MatchAt()
2887 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
2906 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
2908 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
2915 fp = StateSave(fp, opValue, status); in MatchAt()
2922 if (toEnd && fp->fInputIdx != fActiveLimit) { in MatchAt()
2924 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
2937 fp->fExtra[opValue+2] = fp->fInputIdx; in MatchAt()
2943 … U_ASSERT(fp->fExtra[opValue+2] >= 0); // Start pos for this group must be set. in MatchAt()
2944 fp->fExtra[opValue] = fp->fExtra[opValue+2]; // Tentative start becomes real. in MatchAt()
2945 fp->fExtra[opValue+1] = fp->fInputIdx; // End position in MatchAt()
2946 U_ASSERT(fp->fExtra[opValue] <= fp->fExtra[opValue+1]); in MatchAt()
2953 if (fp->fInputIdx >= fAnchorLimit) { in MatchAt()
2960 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
2968 …if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && ((void)UTEXT_PREVIOUS32(fInputText), UTEXT_PREVIOU… in MatchAt()
2985 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
2991 if (fp->fInputIdx >= fAnchorLimit) { in MatchAt()
2997 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3008 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3014 if (fp->fInputIdx >= fAnchorLimit) { in MatchAt()
3022 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3028 … if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && UTEXT_PREVIOUS32(fInputText)==0x0d)) { in MatchAt()
3033 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3040 if (fp->fInputIdx >= fAnchorLimit) { in MatchAt()
3048 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3050 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3057 if (fp->fInputIdx != fAnchorStart) { in MatchAt()
3058 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3065 if (fp->fInputIdx == fAnchorStart) { in MatchAt()
3071 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3073 if ((fp->fInputIdx < fAnchorLimit) && isLineTerminator(c)) { in MatchAt()
3079 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3086 U_ASSERT(fp->fInputIdx >= fAnchorStart); in MatchAt()
3087 if (fp->fInputIdx <= fAnchorStart) { in MatchAt()
3092 U_ASSERT(fp->fInputIdx <= fAnchorLimit); in MatchAt()
3093 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3097 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3104 UBool success = isWordBoundary(fp->fInputIdx); in MatchAt()
3107 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3115 UBool success = isUWordBoundary(fp->fInputIdx, status); in MatchAt()
3118 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3126 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3128 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3132 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3139 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3141 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3148 … if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==FALSE && fp->fInputIdx==fActiveStart))) { in MatchAt()
3149 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3156 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3158 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3161 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3167 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3169 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3177 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3179 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3182 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3188 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3190 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3198 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3200 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3203 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3208 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3210 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3220 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3222 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3226 fp->fInputIdx = followingGCBoundary(fp->fInputIdx, status); in MatchAt()
3227 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3229 fp->fInputIdx = fActiveLimit; in MatchAt()
3235 if (fp->fInputIdx < fAnchorLimit) { in MatchAt()
3236 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3252 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3254 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3262 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3276 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3279 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3289 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3291 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3297 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3303 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3309 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3314 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3320 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3322 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3325 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3333 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3340 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3346 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3354 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3357 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3361 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3367 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3370 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3378 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3381 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3385 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3391 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3392 if (c==0x0d && fp->fInputIdx < fActiveLimit) { in MatchAt()
3397 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3408 if (fp->fInputIdx >= fActiveLimit) { in MatchAt()
3411 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3415 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3421 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3423 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3430 fp->fPatIdx = opValue; in MatchAt()
3439 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current in MatchAt()
3440 fp->fPatIdx = opValue; // Then JMP. in MatchAt()
3454 int64_t prevInputIdx = fp->fExtra[frameLoc]; in MatchAt()
3455 U_ASSERT(prevInputIdx <= fp->fInputIdx); in MatchAt()
3456 if (prevInputIdx < fp->fInputIdx) { in MatchAt()
3458 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current in MatchAt()
3459 fp->fPatIdx = opValue; in MatchAt()
3460 fp->fExtra[frameLoc] = fp->fInputIdx; in MatchAt()
3470 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero in MatchAt()
3474 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchAt()
3475 fp->fPatIdx += 3; in MatchAt()
3481 U_ASSERT(loopLoc>=fp->fPatIdx); in MatchAt()
3484 fp = StateSave(fp, loopLoc+1, status); in MatchAt()
3487 fp->fExtra[opValue+1] = fp->fInputIdx; // For loop breaking. in MatchAt()
3489 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3496 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); in MatchAt()
3499 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; in MatchAt()
3511 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1]; in MatchAt()
3512 if (fp->fInputIdx == *pLastInputIdx) { in MatchAt()
3515 *pLastInputIdx = fp->fInputIdx; in MatchAt()
3518 fp = StateSave(fp, fp->fPatIdx, status); in MatchAt()
3527 fp->fPatIdx = opValue + 4; // Loop back. in MatchAt()
3535 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero in MatchAt()
3539 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchAt()
3540 fp->fPatIdx += 3; in MatchAt()
3546 U_ASSERT(loopLoc>fp->fPatIdx); in MatchAt()
3548fp->fExtra[opValue+1] = fp->fInputIdx; // Save initial input index for loop breaking. in MatchAt()
3553 fp = StateSave(fp, fp->fPatIdx, status); in MatchAt()
3555 fp->fPatIdx = loopLoc+1; // Continue with stuff after repeated block in MatchAt()
3563 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); in MatchAt()
3566 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; in MatchAt()
3582 fp->fPatIdx = opValue + 4; // Loop back. in MatchAt()
3594 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1]; in MatchAt()
3595 if (fp->fInputIdx == *pLastInputIdx) { in MatchAt()
3598 *pLastInputIdx = fp->fInputIdx; in MatchAt()
3605 fp = StateSave(fp, opValue + 4, status); in MatchAt()
3621 if (newFP == (int64_t *)fp) { in MatchAt()
3626 newFP[j] = ((int64_t *)fp)[j]; in MatchAt()
3628 fp = (REStackFrame *)newFP; in MatchAt()
3636 int64_t groupStartIdx = fp->fExtra[opValue]; in MatchAt()
3637 int64_t groupEndIdx = fp->fExtra[opValue+1]; in MatchAt()
3641 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. in MatchAt()
3645 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3671 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3673 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3683 int64_t groupStartIdx = fp->fExtra[opValue]; in MatchAt()
3684 int64_t groupEndIdx = fp->fExtra[opValue+1]; in MatchAt()
3688 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. in MatchAt()
3692 utext_setNativeIndex(fInputText, fp->fInputIdx); in MatchAt()
3727 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3729 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3738 fp->fExtra[opValue] = fp->fInputIdx; in MatchAt()
3744 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchAt()
3745 fp->fPatIdx += 1; in MatchAt()
3748 int64_t savedInputIdx = fp->fExtra[dataLoc]; in MatchAt()
3749 U_ASSERT(savedInputIdx <= fp->fInputIdx); in MatchAt()
3750 if (savedInputIdx < fp->fInputIdx) { in MatchAt()
3751 fp->fPatIdx = opValue; // JMP in MatchAt()
3753fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no progress in loop. in MatchAt()
3764 fData[opValue+1] = fp->fInputIdx; in MatchAt()
3787 newFP[j] = ((int64_t *)fp)[j]; in MatchAt()
3789 fp = (REStackFrame *)newFP; in MatchAt()
3792 fp->fInputIdx = fData[opValue+1]; in MatchAt()
3807 if (fp->fInputIdx < fActiveLimit) { in MatchAt()
3808 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3812 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3819 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3832 op = (int32_t)pat[fp->fPatIdx]; in MatchAt()
3833 fp->fPatIdx++; in MatchAt()
3844 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
3864 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
3866 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3879 fData[opValue+1] = fp->fInputIdx; in MatchAt()
3885 fActiveLimit = fp->fInputIdx; in MatchAt()
3899 int32_t minML = (int32_t)pat[fp->fPatIdx++]; in MatchAt()
3900 int32_t maxML = (int32_t)pat[fp->fPatIdx++]; in MatchAt()
3914 lbStartIdx = fp->fInputIdx - minML; in MatchAt()
3932 if (lbStartIdx < 0 || lbStartIdx < fp->fInputIdx - maxML) { in MatchAt()
3936 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3946 fp = StateSave(fp, fp->fPatIdx-3, status); in MatchAt()
3947 fp->fInputIdx = lbStartIdx; in MatchAt()
3955 if (fp->fInputIdx != fActiveLimit) { in MatchAt()
3961 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
3982 int32_t minML = (int32_t)pat[fp->fPatIdx++]; in MatchAt()
3983 int32_t maxML = (int32_t)pat[fp->fPatIdx++]; in MatchAt()
3989 int32_t continueLoc = (int32_t)pat[fp->fPatIdx++]; in MatchAt()
3993 U_ASSERT(continueLoc > fp->fPatIdx); in MatchAt()
4000 lbStartIdx = fp->fInputIdx - minML; in MatchAt()
4018 if (lbStartIdx < 0 || lbStartIdx < fp->fInputIdx - maxML) { in MatchAt()
4026 fp->fPatIdx = continueLoc; in MatchAt()
4032 fp = StateSave(fp, fp->fPatIdx-4, status); in MatchAt()
4033 fp->fInputIdx = lbStartIdx; in MatchAt()
4041 if (fp->fInputIdx != fActiveLimit) { in MatchAt()
4047 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
4071 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchAt()
4088 int64_t ix = fp->fInputIdx; in MatchAt()
4110 if (ix == fp->fInputIdx) { in MatchAt()
4111 fp->fPatIdx++; // skip the URX_LOOP_C op. in MatchAt()
4118 int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; in MatchAt()
4122 fp->fExtra[stackLoc] = fp->fInputIdx; in MatchAt()
4123 fp->fInputIdx = ix; in MatchAt()
4128 fp = StateSave(fp, fp->fPatIdx, status); in MatchAt()
4129 fp->fPatIdx++; in MatchAt()
4149 ix = fp->fInputIdx; in MatchAt()
4171 if (ix == fp->fInputIdx) { in MatchAt()
4172 fp->fPatIdx++; // skip the URX_LOOP_C op. in MatchAt()
4179 int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; in MatchAt()
4183 fp->fExtra[stackLoc] = fp->fInputIdx; in MatchAt()
4184 fp->fInputIdx = ix; in MatchAt()
4189 fp = StateSave(fp, fp->fPatIdx, status); in MatchAt()
4190 fp->fPatIdx++; in MatchAt()
4198 backSearchIndex = fp->fExtra[opValue]; in MatchAt()
4199 U_ASSERT(backSearchIndex <= fp->fInputIdx); in MatchAt()
4200 if (backSearchIndex == fp->fInputIdx) { in MatchAt()
4211 U_ASSERT(fp->fInputIdx > 0); in MatchAt()
4212 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchAt()
4214 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
4218 fp->fInputIdx > backSearchIndex && in MatchAt()
4220 int32_t prevOp = (int32_t)pat[fp->fPatIdx-2]; in MatchAt()
4223 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); in MatchAt()
4228 fp = StateSave(fp, fp->fPatIdx-1, status); in MatchAt()
4251 fMatchEnd = fp->fInputIdx; in MatchAt()
4264 fFrame = fp; // The active stack frame when the engine stopped. in MatchAt()
4314 REStackFrame *fp = resetStack(); in MatchChunkAt() local
4320 fp->fPatIdx = 0; in MatchChunkAt()
4321 fp->fInputIdx = startIdx; in MatchChunkAt()
4334 op = (int32_t)pat[fp->fPatIdx]; in MatchChunkAt()
4339 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); in MatchChunkAt()
4340 printf("inputIdx=%ld inputChar=%x sp=%3ld activeLimit=%ld ", fp->fInputIdx, in MatchChunkAt()
4341 UTEXT_CURRENT32(fInputText), (int64_t *)fp-fStack->getBuffer(), fActiveLimit); in MatchChunkAt()
4342 fPattern->dumpOp(fp->fPatIdx); in MatchChunkAt()
4345 fp->fPatIdx++; in MatchChunkAt()
4358 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4363 if (fp->fInputIdx < fActiveLimit) { in MatchChunkAt()
4365 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4372 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4384 op = (int32_t)pat[fp->fPatIdx]; // Fetch the second operand in MatchChunkAt()
4385 fp->fPatIdx++; in MatchChunkAt()
4391 const UChar * pInp = inputBuf + fp->fInputIdx; in MatchChunkAt()
4409 fp->fInputIdx += stringLen; in MatchChunkAt()
4411 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4418 fp = StateSave(fp, opValue, status); in MatchChunkAt()
4425 if (toEnd && fp->fInputIdx != fActiveLimit) { in MatchChunkAt()
4427 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4440 fp->fExtra[opValue+2] = fp->fInputIdx; in MatchChunkAt()
4446 … U_ASSERT(fp->fExtra[opValue+2] >= 0); // Start pos for this group must be set. in MatchChunkAt()
4447 fp->fExtra[opValue] = fp->fExtra[opValue+2]; // Tentative start becomes real. in MatchChunkAt()
4448 fp->fExtra[opValue+1] = fp->fInputIdx; // End position in MatchChunkAt()
4449 U_ASSERT(fp->fExtra[opValue] <= fp->fExtra[opValue+1]); in MatchChunkAt()
4455 if (fp->fInputIdx < fAnchorLimit-2) { in MatchChunkAt()
4458 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4461 if (fp->fInputIdx >= fAnchorLimit) { in MatchChunkAt()
4470 if (fp->fInputIdx == fAnchorLimit-1) { in MatchChunkAt()
4472 U16_GET(inputBuf, fAnchorStart, fp->fInputIdx, fAnchorLimit, c); in MatchChunkAt()
4475 … if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && inputBuf[fp->fInputIdx-1]==0x0d)) { in MatchChunkAt()
4482 } else if (fp->fInputIdx == fAnchorLimit-2 && in MatchChunkAt()
4483 inputBuf[fp->fInputIdx]==0x0d && inputBuf[fp->fInputIdx+1]==0x0a) { in MatchChunkAt()
4489 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4495 if (fp->fInputIdx >= fAnchorLimit-1) { in MatchChunkAt()
4497 if (fp->fInputIdx == fAnchorLimit-1) { in MatchChunkAt()
4499 if (inputBuf[fp->fInputIdx] == 0x0a) { in MatchChunkAt()
4513 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4519 if (fp->fInputIdx >= fAnchorLimit) { in MatchChunkAt()
4527 UChar32 c = inputBuf[fp->fInputIdx]; in MatchChunkAt()
4532 … if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && inputBuf[fp->fInputIdx-1]==0x0d)) { in MatchChunkAt()
4537 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4544 if (fp->fInputIdx >= fAnchorLimit) { in MatchChunkAt()
4552 if (inputBuf[fp->fInputIdx] != 0x0a) { in MatchChunkAt()
4553 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4560 if (fp->fInputIdx != fAnchorStart) { in MatchChunkAt()
4561 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4568 if (fp->fInputIdx == fAnchorStart) { in MatchChunkAt()
4574 UChar c = inputBuf[fp->fInputIdx - 1]; in MatchChunkAt()
4575 if ((fp->fInputIdx < fAnchorLimit) && in MatchChunkAt()
4582 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4589 U_ASSERT(fp->fInputIdx >= fAnchorStart); in MatchChunkAt()
4590 if (fp->fInputIdx <= fAnchorStart) { in MatchChunkAt()
4595 U_ASSERT(fp->fInputIdx <= fAnchorLimit); in MatchChunkAt()
4596 UChar c = inputBuf[fp->fInputIdx - 1]; in MatchChunkAt()
4599 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4606 UBool success = isChunkWordBoundary((int32_t)fp->fInputIdx); in MatchChunkAt()
4609 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4617 UBool success = isUWordBoundary(fp->fInputIdx, status); in MatchChunkAt()
4620 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4628 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4630 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4635 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4640 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4647 … if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==FALSE && fp->fInputIdx==fActiveStart))) { in MatchChunkAt()
4648 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4655 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4657 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4661 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4666 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4674 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4676 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4680 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4682 if (c == 0x0d && fp->fInputIdx < fActiveLimit) { in MatchChunkAt()
4685 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c2); in MatchChunkAt()
4687 U16_PREV(inputBuf, 0, fp->fInputIdx, c2); in MatchChunkAt()
4691 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4699 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4701 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4705 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4709 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4719 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4721 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4725 fp->fInputIdx = followingGCBoundary(fp->fInputIdx, status); in MatchChunkAt()
4726 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4728 fp->fInputIdx = fActiveLimit; in MatchChunkAt()
4734 if (fp->fInputIdx < fAnchorLimit) { in MatchChunkAt()
4735 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4751 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4753 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4762 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4775 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4785 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4787 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4794 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4806 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4813 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4815 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4823 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4839 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4847 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4850 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4856 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4859 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4869 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4872 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4879 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4880 if (c==0x0d && fp->fInputIdx < fActiveLimit) { in MatchChunkAt()
4882 if (inputBuf[fp->fInputIdx] == 0x0a) { in MatchChunkAt()
4883 U16_FWD_1(inputBuf, fp->fInputIdx, fActiveLimit); in MatchChunkAt()
4894 if (fp->fInputIdx >= fActiveLimit) { in MatchChunkAt()
4897 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4903 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
4906 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4913 fp->fPatIdx = opValue; in MatchChunkAt()
4922 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current in MatchChunkAt()
4923 fp->fPatIdx = opValue; // Then JMP. in MatchChunkAt()
4937 int32_t prevInputIdx = (int32_t)fp->fExtra[frameLoc]; in MatchChunkAt()
4938 U_ASSERT(prevInputIdx <= fp->fInputIdx); in MatchChunkAt()
4939 if (prevInputIdx < fp->fInputIdx) { in MatchChunkAt()
4941 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current in MatchChunkAt()
4942 fp->fPatIdx = opValue; in MatchChunkAt()
4943 fp->fExtra[frameLoc] = fp->fInputIdx; in MatchChunkAt()
4953 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero in MatchChunkAt()
4957 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchChunkAt()
4958 fp->fPatIdx += 3; in MatchChunkAt()
4964 U_ASSERT(loopLoc>=fp->fPatIdx); in MatchChunkAt()
4967 fp = StateSave(fp, loopLoc+1, status); in MatchChunkAt()
4970 fp->fExtra[opValue+1] = fp->fInputIdx; // For loop breaking. in MatchChunkAt()
4972 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
4979 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); in MatchChunkAt()
4982 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; in MatchChunkAt()
4994 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1]; in MatchChunkAt()
4995 if (fp->fInputIdx == *pLastInputIdx) { in MatchChunkAt()
4998 *pLastInputIdx = fp->fInputIdx; in MatchChunkAt()
5001 fp = StateSave(fp, fp->fPatIdx, status); in MatchChunkAt()
5009 fp->fPatIdx = opValue + 4; // Loop back. in MatchChunkAt()
5017 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero in MatchChunkAt()
5021 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchChunkAt()
5022 fp->fPatIdx += 3; in MatchChunkAt()
5028 U_ASSERT(loopLoc>fp->fPatIdx); in MatchChunkAt()
5030fp->fExtra[opValue+1] = fp->fInputIdx; // Save initial input index for loop breaking. in MatchChunkAt()
5035 fp = StateSave(fp, fp->fPatIdx, status); in MatchChunkAt()
5037 fp->fPatIdx = loopLoc+1; // Continue with stuff after repeated block in MatchChunkAt()
5045 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2); in MatchChunkAt()
5048 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)]; in MatchChunkAt()
5064 fp->fPatIdx = opValue + 4; // Loop back. in MatchChunkAt()
5075 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1]; in MatchChunkAt()
5076 if (fp->fInputIdx == *pLastInputIdx) { in MatchChunkAt()
5079 *pLastInputIdx = fp->fInputIdx; in MatchChunkAt()
5086 fp = StateSave(fp, opValue + 4, status); in MatchChunkAt()
5102 if (newFP == (int64_t *)fp) { in MatchChunkAt()
5107 newFP[j] = ((int64_t *)fp)[j]; in MatchChunkAt()
5109 fp = (REStackFrame *)newFP; in MatchChunkAt()
5117 int64_t groupStartIdx = fp->fExtra[opValue]; in MatchChunkAt()
5118 int64_t groupEndIdx = fp->fExtra[opValue+1]; in MatchChunkAt()
5120 int64_t inputIndex = fp->fInputIdx; in MatchChunkAt()
5123 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. in MatchChunkAt()
5145 fp->fInputIdx = inputIndex; in MatchChunkAt()
5147 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5155 int64_t groupStartIdx = fp->fExtra[opValue]; in MatchChunkAt()
5156 int64_t groupEndIdx = fp->fExtra[opValue+1]; in MatchChunkAt()
5160 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. in MatchChunkAt()
5164 CaseFoldingUCharIterator inputItr(inputBuf, fp->fInputIdx, fActiveLimit); in MatchChunkAt()
5197 fp->fInputIdx = inputItr.getIndex(); in MatchChunkAt()
5199 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5207 fp->fExtra[opValue] = fp->fInputIdx; in MatchChunkAt()
5213 int32_t instrOperandLoc = (int32_t)fp->fPatIdx; in MatchChunkAt()
5214 fp->fPatIdx += 1; in MatchChunkAt()
5217 int32_t savedInputIdx = (int32_t)fp->fExtra[dataLoc]; in MatchChunkAt()
5218 U_ASSERT(savedInputIdx <= fp->fInputIdx); in MatchChunkAt()
5219 if (savedInputIdx < fp->fInputIdx) { in MatchChunkAt()
5220 fp->fPatIdx = opValue; // JMP in MatchChunkAt()
5222fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no progress in loop. in MatchChunkAt()
5233 fData[opValue+1] = fp->fInputIdx; in MatchChunkAt()
5256 newFP[j] = ((int64_t *)fp)[j]; in MatchChunkAt()
5258 fp = (REStackFrame *)newFP; in MatchChunkAt()
5261 fp->fInputIdx = fData[opValue+1]; in MatchChunkAt()
5273 if (fp->fInputIdx < fActiveLimit) { in MatchChunkAt()
5275 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); in MatchChunkAt()
5282 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5293 op = (int32_t)pat[fp->fPatIdx]; in MatchChunkAt()
5294 fp->fPatIdx++; in MatchChunkAt()
5304 CaseFoldingUCharIterator inputIterator(inputBuf, fp->fInputIdx, fActiveLimit); in MatchChunkAt()
5321 fp->fInputIdx = inputIterator.getIndex(); in MatchChunkAt()
5323 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5335 fData[opValue+1] = fp->fInputIdx; in MatchChunkAt()
5341 fActiveLimit = fp->fInputIdx; in MatchChunkAt()
5355 int32_t minML = (int32_t)pat[fp->fPatIdx++]; in MatchChunkAt()
5356 int32_t maxML = (int32_t)pat[fp->fPatIdx++]; in MatchChunkAt()
5365 lbStartIdx = fp->fInputIdx - minML; in MatchChunkAt()
5379 if (lbStartIdx < 0 || lbStartIdx < fp->fInputIdx - maxML) { in MatchChunkAt()
5383 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5393 fp = StateSave(fp, fp->fPatIdx-3, status); in MatchChunkAt()
5394 fp->fInputIdx = lbStartIdx; in MatchChunkAt()
5402 if (fp->fInputIdx != fActiveLimit) { in MatchChunkAt()
5408 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5429 int32_t minML = (int32_t)pat[fp->fPatIdx++]; in MatchChunkAt()
5430 int32_t maxML = (int32_t)pat[fp->fPatIdx++]; in MatchChunkAt()
5431 int32_t continueLoc = (int32_t)pat[fp->fPatIdx++]; in MatchChunkAt()
5435 U_ASSERT(continueLoc > fp->fPatIdx); in MatchChunkAt()
5442 lbStartIdx = fp->fInputIdx - minML; in MatchChunkAt()
5456 if (lbStartIdx < 0 || lbStartIdx < fp->fInputIdx - maxML) { in MatchChunkAt()
5464 fp->fPatIdx = continueLoc; in MatchChunkAt()
5470 fp = StateSave(fp, fp->fPatIdx-4, status); in MatchChunkAt()
5471 fp->fInputIdx = lbStartIdx; in MatchChunkAt()
5479 if (fp->fInputIdx != fActiveLimit) { in MatchChunkAt()
5485 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5509 fp = (REStackFrame *)fStack->popFrame(fFrameSize); in MatchChunkAt()
5526 int32_t ix = (int32_t)fp->fInputIdx; in MatchChunkAt()
5549 if (ix == fp->fInputIdx) { in MatchChunkAt()
5550 fp->fPatIdx++; // skip the URX_LOOP_C op. in MatchChunkAt()
5557 int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; in MatchChunkAt()
5561 fp->fExtra[stackLoc] = fp->fInputIdx; in MatchChunkAt()
5562 fp->fInputIdx = ix; in MatchChunkAt()
5567 fp = StateSave(fp, fp->fPatIdx, status); in MatchChunkAt()
5568 fp->fPatIdx++; in MatchChunkAt()
5588 ix = (int32_t)fp->fInputIdx; in MatchChunkAt()
5611 if (ix == fp->fInputIdx) { in MatchChunkAt()
5612 fp->fPatIdx++; // skip the URX_LOOP_C op. in MatchChunkAt()
5619 int32_t loopcOp = (int32_t)pat[fp->fPatIdx]; in MatchChunkAt()
5623 fp->fExtra[stackLoc] = fp->fInputIdx; in MatchChunkAt()
5624 fp->fInputIdx = ix; in MatchChunkAt()
5629 fp = StateSave(fp, fp->fPatIdx, status); in MatchChunkAt()
5630 fp->fPatIdx++; in MatchChunkAt()
5638 backSearchIndex = (int32_t)fp->fExtra[opValue]; in MatchChunkAt()
5639 U_ASSERT(backSearchIndex <= fp->fInputIdx); in MatchChunkAt()
5640 if (backSearchIndex == fp->fInputIdx) { in MatchChunkAt()
5651 U_ASSERT(fp->fInputIdx > 0); in MatchChunkAt()
5653 … U16_PREV(inputBuf, 0, fp->fInputIdx, prevC); // !!!: should this 0 be one of f*Limit? in MatchChunkAt()
5656 fp->fInputIdx > backSearchIndex && in MatchChunkAt()
5657 inputBuf[fp->fInputIdx-1] == 0x0d) { in MatchChunkAt()
5658 int32_t prevOp = (int32_t)pat[fp->fPatIdx-2]; in MatchChunkAt()
5661 U16_BACK_1(inputBuf, 0, fp->fInputIdx); in MatchChunkAt()
5666 fp = StateSave(fp, fp->fPatIdx-1, status); in MatchChunkAt()
5689 fMatchEnd = fp->fInputIdx; in MatchChunkAt()
5702 fFrame = fp; // The active stack frame when the engine stopped. in MatchChunkAt()