Home | History | Annotate | Download | only in i18n

Lines Matching defs:fp

2680 //       fp           The top frame pointer when called.  At return, a new
2689 inline REStackFrame *RegexMatcher::StateSave(REStackFrame *fp, int64_t savePatIdx, UErrorCode &status) {
2691 return fp;
2704 return fp;
2706 fp = (REStackFrame *)(newFP - fFrameSize); // in case of realloc of stack.
2709 int64_t *source = (int64_t *)fp;
2722 fp->fPatIdx = savePatIdx;
2786 REStackFrame *fp = resetStack();
2792 fp->fPatIdx = 0;
2793 fp->fInputIdx = startIdx;
2806 op = (int32_t)pat[fp->fPatIdx];
2811 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
2812 printf("inputIdx=%ld inputChar=%x sp=%3ld activeLimit=%ld ", fp->fInputIdx,
2813 UTEXT_CURRENT32(fInputText), (int64_t *)fp-fStack->getBuffer(), fActiveLimit);
2814 fPattern->dumpOp(fp->fPatIdx);
2817 fp->fPatIdx++;
2830 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
2835 if (fp->fInputIdx < fActiveLimit) {
2836 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
2839 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
2845 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
2856 op = (int32_t)pat[fp->fPatIdx]; // Fetch the second operand
2857 fp->fPatIdx++;
2865 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
2884 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
2886 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
2893 fp = StateSave(fp, opValue, status);
2900 if (toEnd && fp->fInputIdx != fActiveLimit) {
2902 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
2909 // fp->fExtra[opValue] - The start of a completed capture group
2915 fp->fExtra[opValue+2] = fp->fInputIdx;
2921 U_ASSERT(fp->fExtra[opValue+2] >= 0); // Start pos for this group must be set.
2922 fp->fExtra[opValue] = fp->fExtra[opValue+2]; // Tentative start becomes real.
2923 fp->fExtra[opValue+1] = fp->fInputIdx; // End position
2924 U_ASSERT(fp->fExtra[opValue] <= fp->fExtra[opValue+1]);
2931 if (fp->fInputIdx >= fAnchorLimit) {
2938 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
2946 if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && ((void)UTEXT_PREVIOUS32(fInputText), UTEXT_PREVIOUS32(fInputText))==0x0d)) {
2963 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
2969 if (fp->fInputIdx >= fAnchorLimit) {
2975 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
2986 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
2992 if (fp->fInputIdx >= fAnchorLimit) {
3000 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3006 if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && UTEXT_PREVIOUS32(fInputText)==0x0d)) {
3011 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3018 if (fp->fInputIdx >= fAnchorLimit) {
3026 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3028 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3035 if (fp->fInputIdx != fAnchorStart) {
3036 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3043 if (fp->fInputIdx == fAnchorStart) {
3049 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3051 if ((fp->fInputIdx < fAnchorLimit) && isLineTerminator(c)) {
3057 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3064 U_ASSERT(fp->fInputIdx >= fAnchorStart);
3065 if (fp->fInputIdx <= fAnchorStart) {
3070 U_ASSERT(fp->fInputIdx <= fAnchorLimit);
3071 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3075 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3082 UBool success = isWordBoundary(fp->fInputIdx);
3085 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3093 UBool success = isUWordBoundary(fp->fInputIdx);
3096 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3104 if (fp->fInputIdx >= fActiveLimit) {
3106 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3110 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3117 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3119 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3126 if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==FALSE && fp->fInputIdx==fActiveStart))) {
3127 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3134 if (fp->fInputIdx >= fActiveLimit) {
3136 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3139 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3145 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3147 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3155 if (fp->fInputIdx >= fActiveLimit) {
3157 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3160 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3166 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3168 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3176 if (fp->fInputIdx >= fActiveLimit) {
3178 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3181 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3186 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3188 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3201 if (fp->fInputIdx >= fActiveLimit) {
3203 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3207 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3213 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3227 if (fp->fInputIdx >= fActiveLimit) goto GC_Done;
3229 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3235 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3239 if (fp->fInputIdx >= fActiveLimit) goto GC_Done;
3241 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3245 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3249 if (fp->fInputIdx >= fActiveLimit) goto GC_Done;
3251 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3254 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3260 if (fp->fInputIdx >= fActiveLimit) {
3268 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3275 if (c == 0x0d && fp->fInputIdx < fActiveLimit && UTEXT_CURRENT32(fInputText) == 0x0a) {
3277 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3281 if (fp->fInputIdx >= fActiveLimit) {
3291 if (fp->fInputIdx < fAnchorLimit) {
3292 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3308 if (fp->fInputIdx >= fActiveLimit) {
3310 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3318 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3332 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3335 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3345 if (fp->fInputIdx >= fActiveLimit) {
3347 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3353 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3359 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3365 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3370 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3376 if (fp->fInputIdx >= fActiveLimit) {
3378 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3381 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3389 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3396 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3402 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3410 if (fp->fInputIdx >= fActiveLimit) {
3413 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3417 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3423 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3426 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3434 if (fp->fInputIdx >= fActiveLimit) {
3437 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3441 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3447 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3448 if (c==0x0d && fp->fInputIdx < fActiveLimit) {
3453 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3464 if (fp->fInputIdx >= fActiveLimit) {
3467 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3471 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3477 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3479 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3486 fp->fPatIdx = opValue;
3495 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current
3496 fp->fPatIdx = opValue; // Then JMP.
3510 int64_t prevInputIdx = fp->fExtra[frameLoc];
3511 U_ASSERT(prevInputIdx <= fp->fInputIdx);
3512 if (prevInputIdx < fp->fInputIdx) {
3514 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current
3515 fp->fPatIdx = opValue;
3516 fp->fExtra[frameLoc] = fp->fInputIdx;
3526 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero
3530 int32_t instrOperandLoc = (int32_t)fp->fPatIdx;
3531 fp->fPatIdx += 3;
3537 U_ASSERT(loopLoc>=fp->fPatIdx);
3540 fp = StateSave(fp, loopLoc+1, status);
3543 fp->fExtra[opValue+1] = fp->fInputIdx; // For loop breaking.
3545 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3552 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2);
3555 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)];
3567 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1];
3568 if (fp->fInputIdx == *pLastInputIdx) {
3571 *pLastInputIdx = fp->fInputIdx;
3574 fp = StateSave(fp, fp->fPatIdx, status);
3576 fp->fPatIdx = opValue + 4; // Loop back.
3584 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero
3588 int32_t instrOperandLoc = (int32_t)fp->fPatIdx;
3589 fp->fPatIdx += 3;
3595 U_ASSERT(loopLoc>fp->fPatIdx);
3597 fp->fExtra[opValue+1] = fp->fInputIdx; // Save initial input index for loop breaking.
3602 fp = StateSave(fp, fp->fPatIdx, status);
3604 fp->fPatIdx = loopLoc+1; // Continue with stuff after repeated block
3612 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2);
3615 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)];
3631 fp->fPatIdx = opValue + 4; // Loop back.
3638 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1];
3639 if (fp->fInputIdx == *pLastInputIdx) {
3642 *pLastInputIdx = fp->fInputIdx;
3649 fp = StateSave(fp, opValue + 4, status);
3665 if (newFP == (int64_t *)fp) {
3670 newFP[i] = ((int64_t *)fp)[i];
3672 fp = (REStackFrame *)newFP;
3680 int64_t groupStartIdx = fp->fExtra[opValue];
3681 int64_t groupEndIdx = fp->fExtra[opValue+1];
3685 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match.
3689 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3715 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3717 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3727 int64_t groupStartIdx = fp->fExtra[opValue];
3728 int64_t groupEndIdx = fp->fExtra[opValue+1];
3732 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match.
3736 utext_setNativeIndex(fInputText, fp->fInputIdx);
3771 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3773 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3782 fp->fExtra[opValue] = fp->fInputIdx;
3788 int32_t instrOperandLoc = (int32_t)fp->fPatIdx;
3789 fp->fPatIdx += 1;
3792 int64_t savedInputIdx = fp->fExtra[dataLoc];
3793 U_ASSERT(savedInputIdx <= fp->fInputIdx);
3794 if (savedInputIdx < fp->fInputIdx) {
3795 fp->fPatIdx = opValue; // JMP
3797 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no progress in loop.
3808 fData[opValue+1] = fp->fInputIdx;
3829 newFP[i] = ((int64_t *)fp)[i];
3831 fp = (REStackFrame *)newFP;
3834 fp->fInputIdx = fData[opValue+1];
3847 if (fp->fInputIdx < fActiveLimit) {
3848 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3852 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3859 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3872 op = (int32_t)pat[fp->fPatIdx];
3873 fp->fPatIdx++;
3884 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
3904 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
3906 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3919 fData[opValue+1] = fp->fInputIdx;
3925 fActiveLimit = fp->fInputIdx;
3937 int32_t minML = (int32_t)pat[fp->fPatIdx++];
3938 int32_t maxML = (int32_t)pat[fp->fPatIdx++];
3947 *lbStartIdx = fp->fInputIdx - minML;
3960 if (*lbStartIdx < 0 || *lbStartIdx < fp->fInputIdx - maxML) {
3964 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
3974 fp = StateSave(fp, fp->fPatIdx-3, status);
3975 fp->fInputIdx = *lbStartIdx;
3983 if (fp->fInputIdx != fActiveLimit) {
3989 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4010 int32_t minML = (int32_t)pat[fp->fPatIdx++];
4011 int32_t maxML = (int32_t)pat[fp->fPatIdx++];
4012 int32_t continueLoc = (int32_t)pat[fp->fPatIdx++];
4016 U_ASSERT(continueLoc > fp->fPatIdx);
4023 *lbStartIdx = fp->fInputIdx - minML;
4036 if (*lbStartIdx < 0 || *lbStartIdx < fp->fInputIdx - maxML) {
4044 fp->fPatIdx = continueLoc;
4050 fp = StateSave(fp, fp->fPatIdx-4, status);
4051 fp->fInputIdx = *lbStartIdx;
4059 if (fp->fInputIdx != fActiveLimit) {
4065 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4089 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4106 int64_t ix = fp->fInputIdx;
4128 if (ix == fp->fInputIdx) {
4129 fp->fPatIdx++; // skip the URX_LOOP_C op.
4136 int32_t loopcOp = (int32_t)pat[fp->fPatIdx];
4140 fp->fExtra[stackLoc] = fp->fInputIdx;
4141 fp->fInputIdx = ix;
4146 fp = StateSave(fp, fp->fPatIdx, status);
4147 fp->fPatIdx++;
4167 ix = fp->fInputIdx;
4189 if (ix == fp->fInputIdx) {
4190 fp->fPatIdx++; // skip the URX_LOOP_C op.
4197 int32_t loopcOp = (int32_t)pat[fp->fPatIdx];
4201 fp->fExtra[stackLoc] = fp->fInputIdx;
4202 fp->fInputIdx = ix;
4207 fp = StateSave(fp, fp->fPatIdx, status);
4208 fp->fPatIdx++;
4216 backSearchIndex = fp->fExtra[opValue];
4217 U_ASSERT(backSearchIndex <= fp->fInputIdx);
4218 if (backSearchIndex == fp->fInputIdx) {
4229 U_ASSERT(fp->fInputIdx > 0);
4230 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
4232 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
4236 fp->fInputIdx > backSearchIndex &&
4238 int32_t prevOp = (int32_t)pat[fp->fPatIdx-2];
4241 fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText);
4246 fp = StateSave(fp, fp->fPatIdx-1, status);
4269 fMatchEnd = fp->fInputIdx;
4282 fFrame = fp; // The active stack frame when the engine stopped.
4353 REStackFrame *fp = resetStack();
4359 fp->fPatIdx = 0;
4360 fp->fInputIdx = startIdx;
4373 op = (int32_t)pat[fp->fPatIdx];
4378 UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx);
4379 printf("inputIdx=%ld inputChar=%x sp=%3ld activeLimit=%ld ", fp->fInputIdx,
4380 UTEXT_CURRENT32(fInputText), (int64_t *)fp-fStack->getBuffer(), fActiveLimit);
4381 fPattern->dumpOp(fp->fPatIdx);
4384 fp->fPatIdx++;
4397 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4402 if (fp->fInputIdx < fActiveLimit) {
4404 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4411 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4423 op = (int32_t)pat[fp->fPatIdx]; // Fetch the second operand
4424 fp->fPatIdx++;
4430 const UChar * pInp = inputBuf + fp->fInputIdx;
4448 fp->fInputIdx += stringLen;
4450 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4457 fp = StateSave(fp, opValue, status);
4464 if (toEnd && fp->fInputIdx != fActiveLimit) {
4466 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4473 // fp->fExtra[opValue] - The start of a completed capture group
4479 fp->fExtra[opValue+2] = fp->fInputIdx;
4485 U_ASSERT(fp->fExtra[opValue+2] >= 0); // Start pos for this group must be set.
4486 fp->fExtra[opValue] = fp->fExtra[opValue+2]; // Tentative start becomes real.
4487 fp->fExtra[opValue+1] = fp->fInputIdx; // End position
4488 U_ASSERT(fp->fExtra[opValue] <= fp->fExtra[opValue+1]);
4494 if (fp->fInputIdx < fAnchorLimit-2) {
4497 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4500 if (fp->fInputIdx >= fAnchorLimit) {
4509 if (fp->fInputIdx == fAnchorLimit-1) {
4511 U16_GET(inputBuf, fAnchorStart, fp->fInputIdx, fAnchorLimit, c);
4514 if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && inputBuf[fp->fInputIdx-1]==0x0d)) {
4521 } else if (fp->fInputIdx == fAnchorLimit-2 &&
4522 inputBuf[fp->fInputIdx]==0x0d && inputBuf[fp->fInputIdx+1]==0x0a) {
4528 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4534 if (fp->fInputIdx >= fAnchorLimit-1) {
4536 if (fp->fInputIdx == fAnchorLimit-1) {
4538 if (inputBuf[fp->fInputIdx] == 0x0a) {
4552 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4558 if (fp->fInputIdx >= fAnchorLimit) {
4566 UChar32 c = inputBuf[fp->fInputIdx];
4571 if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && inputBuf[fp->fInputIdx-1]==0x0d)) {
4576 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4583 if (fp->fInputIdx >= fAnchorLimit) {
4591 if (inputBuf[fp->fInputIdx] != 0x0a) {
4592 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4599 if (fp->fInputIdx != fAnchorStart) {
4600 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4607 if (fp->fInputIdx == fAnchorStart) {
4613 UChar c = inputBuf[fp->fInputIdx - 1];
4614 if ((fp->fInputIdx < fAnchorLimit) &&
4621 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4628 U_ASSERT(fp->fInputIdx >= fAnchorStart);
4629 if (fp->fInputIdx <= fAnchorStart) {
4634 U_ASSERT(fp->fInputIdx <= fAnchorLimit);
4635 UChar c = inputBuf[fp->fInputIdx - 1];
4638 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4645 UBool success = isChunkWordBoundary((int32_t)fp->fInputIdx);
4648 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4656 UBool success = isUWordBoundary(fp->fInputIdx);
4659 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4667 if (fp->fInputIdx >= fActiveLimit) {
4669 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4674 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4679 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4686 if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==FALSE && fp->fInputIdx==fActiveStart))) {
4687 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4694 if (fp->fInputIdx >= fActiveLimit) {
4696 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4700 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4705 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4713 if (fp->fInputIdx >= fActiveLimit) {
4715 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4719 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4721 if (c == 0x0d && fp->fInputIdx < fActiveLimit) {
4724 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c2);
4726 U16_PREV(inputBuf, 0, fp->fInputIdx, c2);
4730 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4738 if (fp->fInputIdx >= fActiveLimit) {
4740 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4744 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4748 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4762 if (fp->fInputIdx >= fActiveLimit) {
4764 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4771 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4785 if (fp->fInputIdx >= fActiveLimit) goto GC_Done;
4786 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4791 U16_PREV(inputBuf, 0, fp->fInputIdx, c);
4795 if (fp->fInputIdx >= fActiveLimit) goto GC_Done;
4796 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4799 U16_PREV(inputBuf, 0, fp->fInputIdx, c);
4803 if (fp->fInputIdx >= fActiveLimit) goto GC_Done;
4804 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4806 U16_PREV(inputBuf, 0, fp->fInputIdx, c);
4812 if (fp->fInputIdx >= fActiveLimit) {
4815 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4817 U16_BACK_1(inputBuf, 0, fp->fInputIdx);
4826 if (c == 0x0d && fp->fInputIdx < fActiveLimit && inputBuf[fp->fInputIdx] == 0x0a) {
4827 fp->fInputIdx++;
4831 if (fp->fInputIdx >= fActiveLimit) {
4841 if (fp->fInputIdx < fAnchorLimit) {
4842 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4858 if (fp->fInputIdx >= fActiveLimit) {
4860 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4869 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4882 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4892 if (fp->fInputIdx >= fActiveLimit) {
4894 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4901 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4913 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4920 if (fp->fInputIdx >= fActiveLimit) {
4922 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4930 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4946 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4954 if (fp->fInputIdx >= fActiveLimit) {
4957 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4963 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4966 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4976 if (fp->fInputIdx >= fActiveLimit) {
4979 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
4986 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
4987 if (c==0x0d && fp->fInputIdx < fActiveLimit) {
4989 if (inputBuf[fp->fInputIdx] == 0x0a) {
4990 U16_FWD_1(inputBuf, fp->fInputIdx, fActiveLimit);
5001 if (fp->fInputIdx >= fActiveLimit) {
5004 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5010 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
5013 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5020 fp->fPatIdx = opValue;
5029 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current
5030 fp->fPatIdx = opValue; // Then JMP.
5044 int32_t prevInputIdx = (int32_t)fp->fExtra[frameLoc];
5045 U_ASSERT(prevInputIdx <= fp->fInputIdx);
5046 if (prevInputIdx < fp->fInputIdx) {
5048 fp = StateSave(fp, fp->fPatIdx, status); // State save to loc following current
5049 fp->fPatIdx = opValue;
5050 fp->fExtra[frameLoc] = fp->fInputIdx;
5060 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero
5064 int32_t instrOperandLoc = (int32_t)fp->fPatIdx;
5065 fp->fPatIdx += 3;
5071 U_ASSERT(loopLoc>=fp->fPatIdx);
5074 fp = StateSave(fp, loopLoc+1, status);
5077 fp->fExtra[opValue+1] = fp->fInputIdx; // For loop breaking.
5079 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5086 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2);
5089 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)];
5101 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1];
5102 if (fp->fInputIdx == *pLastInputIdx) {
5105 *pLastInputIdx = fp->fInputIdx;
5108 fp = StateSave(fp, fp->fPatIdx, status);
5110 fp->fPatIdx = opValue + 4; // Loop back.
5118 fp->fExtra[opValue] = 0; // Set the loop counter variable to zero
5122 int32_t instrOperandLoc = (int32_t)fp->fPatIdx;
5123 fp->fPatIdx += 3;
5129 U_ASSERT(loopLoc>fp->fPatIdx);
5131 fp->fExtra[opValue+1] = fp->fInputIdx; // Save initial input index for loop breaking.
5136 fp = StateSave(fp, fp->fPatIdx, status);
5138 fp->fPatIdx = loopLoc+1; // Continue with stuff after repeated block
5146 U_ASSERT(opValue>0 && opValue < fp->fPatIdx-2);
5149 int64_t *pCounter = &fp->fExtra[URX_VAL(initOp)];
5165 fp->fPatIdx = opValue + 4; // Loop back.
5172 int64_t *pLastInputIdx = &fp->fExtra[URX_VAL(initOp) + 1];
5173 if (fp->fInputIdx == *pLastInputIdx) {
5176 *pLastInputIdx = fp->fInputIdx;
5183 fp = StateSave(fp, opValue + 4, status);
5199 if (newFP == (int64_t *)fp) {
5204 newFP[i] = ((int64_t *)fp)[i];
5206 fp = (REStackFrame *)newFP;
5214 int64_t groupStartIdx = fp->fExtra[opValue];
5215 int64_t groupEndIdx = fp->fExtra[opValue+1];
5217 int64_t inputIndex = fp->fInputIdx;
5220 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match.
5236 fp->fInputIdx = inputIndex;
5238 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5246 int64_t groupStartIdx = fp->fExtra[opValue];
5247 int64_t groupEndIdx = fp->fExtra[opValue+1];
5251 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match.
5255 CaseFoldingUCharIterator inputItr(inputBuf, fp->fInputIdx, fActiveLimit);
5288 fp->fInputIdx = inputItr.getIndex();
5290 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5298 fp->fExtra[opValue] = fp->fInputIdx;
5304 int32_t instrOperandLoc = (int32_t)fp->fPatIdx;
5305 fp->fPatIdx += 1;
5308 int32_t savedInputIdx = (int32_t)fp->fExtra[dataLoc];
5309 U_ASSERT(savedInputIdx <= fp->fInputIdx);
5310 if (savedInputIdx < fp->fInputIdx) {
5311 fp->fPatIdx = opValue; // JMP
5313 fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no progress in loop.
5324 fData[opValue+1] = fp->fInputIdx;
5345 newFP[i] = ((int64_t *)fp)[i];
5347 fp = (REStackFrame *)newFP;
5350 fp->fInputIdx = fData[opValue+1];
5360 if (fp->fInputIdx < fActiveLimit) {
5362 U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c);
5369 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5380 op = (int32_t)pat[fp->fPatIdx];
5381 fp->fPatIdx++;
5391 CaseFoldingUCharIterator inputIterator(inputBuf, fp->fInputIdx, fActiveLimit);
5408 fp->fInputIdx = inputIterator.getIndex();
5410 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5422 fData[opValue+1] = fp->fInputIdx;
5428 fActiveLimit = fp->fInputIdx;
5440 int32_t minML = (int32_t)pat[fp->fPatIdx++];
5441 int32_t maxML = (int32_t)pat[fp->fPatIdx++];
5450 *lbStartIdx = fp->fInputIdx - minML;
5461 if (*lbStartIdx < 0 || *lbStartIdx < fp->fInputIdx - maxML) {
5465 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5475 fp = StateSave(fp, fp->fPatIdx-3, status);
5476 fp->fInputIdx = *lbStartIdx;
5484 if (fp->fInputIdx != fActiveLimit) {
5490 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5511 int32_t minML = (int32_t)pat[fp->fPatIdx++];
5512 int32_t maxML = (int32_t)pat[fp->fPatIdx++];
5513 int32_t continueLoc = (int32_t)pat[fp->fPatIdx++];
5517 U_ASSERT(continueLoc > fp->fPatIdx);
5524 *lbStartIdx = fp->fInputIdx - minML;
5535 if (*lbStartIdx < 0 || *lbStartIdx < fp->fInputIdx - maxML) {
5543 fp->fPatIdx = continueLoc;
5549 fp = StateSave(fp, fp->fPatIdx-4, status);
5550 fp->fInputIdx = *lbStartIdx;
5558 if (fp->fInputIdx != fActiveLimit) {
5564 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5588 fp = (REStackFrame *)fStack->popFrame(fFrameSize);
5605 int32_t ix = (int32_t)fp->fInputIdx;
5628 if (ix == fp->fInputIdx) {
5629 fp->fPatIdx++; // skip the URX_LOOP_C op.
5636 int32_t loopcOp = (int32_t)pat[fp->fPatIdx];
5640 fp->fExtra[stackLoc] = fp->fInputIdx;
5641 fp->fInputIdx = ix;
5646 fp = StateSave(fp, fp->fPatIdx, status);
5647 fp->fPatIdx++;
5667 ix = (int32_t)fp->fInputIdx;
5690 if (ix == fp->fInputIdx) {
5691 fp->fPatIdx++; // skip the URX_LOOP_C op.
5698 int32_t loopcOp = (int32_t)pat[fp->fPatIdx];
5702 fp->fExtra[stackLoc] = fp->fInputIdx;
5703 fp->fInputIdx = ix;
5708 fp = StateSave(fp, fp->fPatIdx, status);
5709 fp->fPatIdx++;
5717 backSearchIndex = (int32_t)fp->fExtra[opValue];
5718 U_ASSERT(backSearchIndex <= fp->fInputIdx);
5719 if (backSearchIndex == fp->fInputIdx) {
5730 U_ASSERT(fp->fInputIdx > 0);
5732 U16_PREV(inputBuf, 0, fp->fInputIdx, prevC); // !!!: should this 0 be one of f*Limit?
5735 fp->fInputIdx > backSearchIndex &&
5736 inputBuf[fp->fInputIdx-1] == 0x0d) {
5737 int32_t prevOp = (int32_t)pat[fp->fPatIdx-2];
5740 U16_BACK_1(inputBuf, 0, fp->fInputIdx);
5745 fp = StateSave(fp, fp->fPatIdx-1, status);
5768 fMatchEnd = fp->fInputIdx;
5781 fFrame = fp; // The active stack frame when the engine stopped.