/[pcre]/code/branches/pcre16/pcre_exec.c
ViewVC logotype

Diff of /code/branches/pcre16/pcre_exec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 767 by zherczeg, Sat Nov 26 12:48:56 2011 UTC revision 769 by zherczeg, Sun Nov 27 17:40:33 2011 UTC
# Line 1308  for (;;) Line 1308  for (;;)
1308    
1309          /* Chose branch according to the condition */          /* Chose branch according to the condition */
1310    
1311          ecode += condition? 3 : GET(ecode, 1);          ecode += condition? 1 + IMM2_SIZE : GET(ecode, 1);
1312          }          }
1313        }        }
1314    
# Line 1376  for (;;) Line 1376  for (;;)
1376    
1377        /* Chose branch according to the condition */        /* Chose branch according to the condition */
1378    
1379        ecode += condition? 3 : GET(ecode, 1);        ecode += condition? 1 + IMM2_SIZE : GET(ecode, 1);
1380        }        }
1381    
1382      else if (condcode == OP_DEF)     /* DEFINE - always false */      else if (condcode == OP_DEF)     /* DEFINE - always false */
# Line 1468  for (;;) Line 1468  for (;;)
1468        md->offset_vector[offset+1] = (int)(eptr - md->start_subject);        md->offset_vector[offset+1] = (int)(eptr - md->start_subject);
1469        if (offset_top <= offset) offset_top = offset + 2;        if (offset_top <= offset) offset_top = offset + 2;
1470        }        }
1471      ecode += 3;      ecode += 1 + IMM2_SIZE;
1472      break;      break;
1473    
1474    
# Line 2567  for (;;) Line 2567  for (;;)
2567      case OP_REFI:      case OP_REFI:
2568      caseless = op == OP_REFI;      caseless = op == OP_REFI;
2569      offset = GET2(ecode, 1) << 1;               /* Doubled ref number */      offset = GET2(ecode, 1) << 1;               /* Doubled ref number */
2570      ecode += 3;      ecode += 1 + IMM2_SIZE;
2571    
2572      /* If the reference is unset, there are two possibilities:      /* If the reference is unset, there are two possibilities:
2573    
# Line 2607  for (;;) Line 2607  for (;;)
2607        case OP_CRMINRANGE:        case OP_CRMINRANGE:
2608        minimize = (*ecode == OP_CRMINRANGE);        minimize = (*ecode == OP_CRMINRANGE);
2609        min = GET2(ecode, 1);        min = GET2(ecode, 1);
2610        max = GET2(ecode, 3);        max = GET2(ecode, 1 + IMM2_SIZE);
2611        if (max == 0) max = INT_MAX;        if (max == 0) max = INT_MAX;
2612        ecode += 5;        ecode += 1 + 2 * IMM2_SIZE;
2613        break;        break;
2614    
2615        default:               /* No repeat follows */        default:               /* No repeat follows */
# Line 2728  for (;;) Line 2728  for (;;)
2728          case OP_CRMINRANGE:          case OP_CRMINRANGE:
2729          minimize = (*ecode == OP_CRMINRANGE);          minimize = (*ecode == OP_CRMINRANGE);
2730          min = GET2(ecode, 1);          min = GET2(ecode, 1);
2731          max = GET2(ecode, 3);          max = GET2(ecode, 1 + IMM2_SIZE);
2732          if (max == 0) max = INT_MAX;          if (max == 0) max = INT_MAX;
2733          ecode += 5;          ecode += 1 + 2 * IMM2_SIZE;
2734          break;          break;
2735    
2736          default:               /* No repeat follows */          default:               /* No repeat follows */
# Line 2929  for (;;) Line 2929  for (;;)
2929          case OP_CRMINRANGE:          case OP_CRMINRANGE:
2930          minimize = (*ecode == OP_CRMINRANGE);          minimize = (*ecode == OP_CRMINRANGE);
2931          min = GET2(ecode, 1);          min = GET2(ecode, 1);
2932          max = GET2(ecode, 3);          max = GET2(ecode, 1 + IMM2_SIZE);
2933          if (max == 0) max = INT_MAX;          if (max == 0) max = INT_MAX;
2934          ecode += 5;          ecode += 1 + 2 * IMM2_SIZE;
2935          break;          break;
2936    
2937          default:               /* No repeat follows */          default:               /* No repeat follows */
# Line 3104  for (;;) Line 3104  for (;;)
3104      case OP_EXACT:      case OP_EXACT:
3105      case OP_EXACTI:      case OP_EXACTI:
3106      min = max = GET2(ecode, 1);      min = max = GET2(ecode, 1);
3107      ecode += 3;      ecode += 1 + IMM2_SIZE;
3108      goto REPEATCHAR;      goto REPEATCHAR;
3109    
3110      case OP_POSUPTO:      case OP_POSUPTO:
# Line 3119  for (;;) Line 3119  for (;;)
3119      min = 0;      min = 0;
3120      max = GET2(ecode, 1);      max = GET2(ecode, 1);
3121      minimize = *ecode == OP_MINUPTO || *ecode == OP_MINUPTOI;      minimize = *ecode == OP_MINUPTO || *ecode == OP_MINUPTOI;
3122      ecode += 3;      ecode += 1 + IMM2_SIZE;
3123      goto REPEATCHAR;      goto REPEATCHAR;
3124    
3125      case OP_POSSTAR:      case OP_POSSTAR:
# Line 3439  for (;;) Line 3439  for (;;)
3439      case OP_NOTEXACT:      case OP_NOTEXACT:
3440      case OP_NOTEXACTI:      case OP_NOTEXACTI:
3441      min = max = GET2(ecode, 1);      min = max = GET2(ecode, 1);
3442      ecode += 3;      ecode += 1 + IMM2_SIZE;
3443      goto REPEATNOTCHAR;      goto REPEATNOTCHAR;
3444    
3445      case OP_NOTUPTO:      case OP_NOTUPTO:
# Line 3449  for (;;) Line 3449  for (;;)
3449      min = 0;      min = 0;
3450      max = GET2(ecode, 1);      max = GET2(ecode, 1);
3451      minimize = *ecode == OP_NOTMINUPTO || *ecode == OP_NOTMINUPTOI;      minimize = *ecode == OP_NOTMINUPTO || *ecode == OP_NOTMINUPTOI;
3452      ecode += 3;      ecode += 1 + IMM2_SIZE;
3453      goto REPEATNOTCHAR;      goto REPEATNOTCHAR;
3454    
3455      case OP_NOTPOSSTAR:      case OP_NOTPOSSTAR:
# Line 3481  for (;;) Line 3481  for (;;)
3481      possessive = TRUE;      possessive = TRUE;
3482      min = 0;      min = 0;
3483      max = GET2(ecode, 1);      max = GET2(ecode, 1);
3484      ecode += 3;      ecode += 1 + IMM2_SIZE;
3485      goto REPEATNOTCHAR;      goto REPEATNOTCHAR;
3486    
3487      case OP_NOTSTAR:      case OP_NOTSTAR:
# Line 3805  for (;;) Line 3805  for (;;)
3805      case OP_TYPEEXACT:      case OP_TYPEEXACT:
3806      min = max = GET2(ecode, 1);      min = max = GET2(ecode, 1);
3807      minimize = TRUE;      minimize = TRUE;
3808      ecode += 3;      ecode += 1 + IMM2_SIZE;
3809      goto REPEATTYPE;      goto REPEATTYPE;
3810    
3811      case OP_TYPEUPTO:      case OP_TYPEUPTO:
# Line 3813  for (;;) Line 3813  for (;;)
3813      min = 0;      min = 0;
3814      max = GET2(ecode, 1);      max = GET2(ecode, 1);
3815      minimize = *ecode == OP_TYPEMINUPTO;      minimize = *ecode == OP_TYPEMINUPTO;
3816      ecode += 3;      ecode += 1 + IMM2_SIZE;
3817      goto REPEATTYPE;      goto REPEATTYPE;
3818    
3819      case OP_TYPEPOSSTAR:      case OP_TYPEPOSSTAR:
# Line 3841  for (;;) Line 3841  for (;;)
3841      possessive = TRUE;      possessive = TRUE;
3842      min = 0;      min = 0;
3843      max = GET2(ecode, 1);      max = GET2(ecode, 1);
3844      ecode += 3;      ecode += 1 + IMM2_SIZE;
3845      goto REPEATTYPE;      goto REPEATTYPE;
3846    
3847      case OP_TYPESTAR:      case OP_TYPESTAR:

Legend:
Removed from v.767  
changed lines
  Added in v.769

  ViewVC Help
Powered by ViewVC 1.1.5