/[pcre]/code/tags/pcre-8.38/pcre_jit_compile.c
ViewVC logotype

Diff of /code/tags/pcre-8.38/pcre_jit_compile.c

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

revision 1435 by zherczeg, Tue Jan 7 07:47:12 2014 UTC revision 1437 by zherczeg, Fri Jan 10 08:52:20 2014 UTC
# Line 2567  if (common->utf) Line 2567  if (common->utf)
2567    
2568  #if defined SUPPORT_UTF && defined COMPILE_PCRE8  #if defined SUPPORT_UTF && defined COMPILE_PCRE8
2569    
2570  static BOOL is_char7_bitset(const pcre_uint8* bitset, BOOL nclass)  static BOOL is_char7_bitset(const pcre_uint8 *bitset, BOOL nclass)
2571  {  {
2572  /* Tells whether the character codes below 128 are enough  /* Tells whether the character codes below 128 are enough
2573  to determine a match. */  to determine a match. */
# Line 3187  while (TRUE) Line 3187  while (TRUE)
3187      cc++;      cc++;
3188      continue;      continue;
3189    
3190        case OP_ASSERT:
3191        case OP_ASSERT_NOT:
3192        case OP_ASSERTBACK:
3193        case OP_ASSERTBACK_NOT:
3194        cc = bracketend(cc);
3195        continue;
3196    
3197      case OP_PLUS:      case OP_PLUS:
3198      case OP_MINPLUS:      case OP_MINPLUS:
3199      case OP_POSPLUS:      case OP_POSPLUS:
# Line 3237  while (TRUE) Line 3244  while (TRUE)
3244      continue;      continue;
3245    
3246      case OP_CLASS:      case OP_CLASS:
3247    #if defined SUPPORT_UTF && defined COMPILE_PCRE8
3248        if (common->utf && !is_char7_bitset((const pcre_uint8 *)(cc + 1), FALSE)) return consumed;
3249    #endif
3250        any = TRUE;
3251        cc += 1 + 32 / sizeof(pcre_uchar);
3252        break;
3253    
3254      case OP_NCLASS:      case OP_NCLASS:
3255    #if defined SUPPORT_UTF && !defined COMPILE_PCRE32
3256        if (common->utf) return consumed;
3257    #endif
3258      any = TRUE;      any = TRUE;
3259      cc += 1 + 32 / sizeof(pcre_uchar);      cc += 1 + 32 / sizeof(pcre_uchar);
3260      break;      break;
3261    
3262  #if defined SUPPORT_UTF || !defined COMPILE_PCRE8  #if defined SUPPORT_UTF || !defined COMPILE_PCRE8
3263      case OP_XCLASS:      case OP_XCLASS:
3264    #if defined SUPPORT_UTF && !defined COMPILE_PCRE32
3265        if (common->utf) return consumed;
3266    #endif
3267      any = TRUE;      any = TRUE;
3268      cc += GET(cc, 1);      cc += GET(cc, 1);
3269      break;      break;
3270  #endif  #endif
3271    
     case OP_NOT_DIGIT:  
3272      case OP_DIGIT:      case OP_DIGIT:
3273      case OP_NOT_WHITESPACE:  #if defined SUPPORT_UTF && defined COMPILE_PCRE8
3274        if (common->utf && !is_char7_bitset((const pcre_uint8 *)common->ctypes - cbit_length + cbit_digit, FALSE))
3275          return consumed;
3276    #endif
3277        any = TRUE;
3278        cc++;
3279        break;
3280    
3281      case OP_WHITESPACE:      case OP_WHITESPACE:
3282      case OP_NOT_WORDCHAR:  #if defined SUPPORT_UTF && defined COMPILE_PCRE8
3283        if (common->utf && !is_char7_bitset((const pcre_uint8 *)common->ctypes - cbit_length + cbit_space, FALSE))
3284          return consumed;
3285    #endif
3286        any = TRUE;
3287        cc++;
3288        break;
3289    
3290      case OP_WORDCHAR:      case OP_WORDCHAR:
3291    #if defined SUPPORT_UTF && defined COMPILE_PCRE8
3292        if (common->utf && !is_char7_bitset((const pcre_uint8 *)common->ctypes - cbit_length + cbit_word, FALSE))
3293          return consumed;
3294    #endif
3295        any = TRUE;
3296        cc++;
3297        break;
3298    
3299        case OP_NOT_DIGIT:
3300        case OP_NOT_WHITESPACE:
3301        case OP_NOT_WORDCHAR:
3302      case OP_ANY:      case OP_ANY:
3303      case OP_ALLANY:      case OP_ALLANY:
3304    #if defined SUPPORT_UTF && !defined COMPILE_PCRE32
3305        if (common->utf) return consumed;
3306    #endif
3307      any = TRUE;      any = TRUE;
3308      cc++;      cc++;
3309      break;      break;
# Line 3264  while (TRUE) Line 3311  while (TRUE)
3311  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
3312      case OP_NOTPROP:      case OP_NOTPROP:
3313      case OP_PROP:      case OP_PROP:
3314    #if defined SUPPORT_UTF && !defined COMPILE_PCRE32
3315        if (common->utf) return consumed;
3316    #endif
3317      any = TRUE;      any = TRUE;
3318      cc += 1 + 2;      cc += 1 + 2;
3319      break;      break;
# Line 3280  while (TRUE) Line 3330  while (TRUE)
3330    
3331    if (any)    if (any)
3332      {      {
 #ifdef SUPPORT_UTF  
     if (common->utf) return consumed;  
 #endif  
3333  #if defined COMPILE_PCRE8  #if defined COMPILE_PCRE8
3334      mask = 0xff;      mask = 0xff;
3335  #elif defined COMPILE_PCRE16  #elif defined COMPILE_PCRE16

Legend:
Removed from v.1435  
changed lines
  Added in v.1437

  ViewVC Help
Powered by ViewVC 1.1.5