/[pcre]/code/trunk/pcre_jit_compile.c
ViewVC logotype

Diff of /code/trunk/pcre_jit_compile.c

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

revision 991 by zherczeg, Sun Jul 8 16:44:39 2012 UTC revision 992 by zherczeg, Sun Jul 8 17:10:07 2012 UTC
# Line 3181  switch(ranges[0]) Line 3181  switch(ranges[0])
3181        }        }
3182      return TRUE;      return TRUE;
3183      }      }
3184      if ((ranges[3] - ranges[2]) == (ranges[5] - ranges[4]) && ispowerof2(ranges[4] - ranges[2]))
3185        {
3186        if (readch)
3187          read_char(common);
3188        OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[4] - ranges[2]);
3189        OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[4]);
3190        add_jump(compiler, backtracks, CMP(ranges[1] != 0 ? SLJIT_C_LESS : SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[5] - ranges[4]));
3191        return TRUE;
3192        }
3193    return FALSE;    return FALSE;
3194    
3195    default:    default:
# Line 3194  int i, bit, length; Line 3203  int i, bit, length;
3203  const pcre_uint8 *ctypes = (const pcre_uint8*)common->ctypes;  const pcre_uint8 *ctypes = (const pcre_uint8*)common->ctypes;
3204    
3205  bit = ctypes[0] & flag;  bit = ctypes[0] & flag;
3206    ranges[0] = -1;
3207  ranges[1] = bit != 0 ? 1 : 0;  ranges[1] = bit != 0 ? 1 : 0;
3208  length = 0;  length = 0;
3209    
# Line 3201  for (i = 1; i < 256; i++) Line 3211  for (i = 1; i < 256; i++)
3211    if ((ctypes[i] & flag) != bit)    if ((ctypes[i] & flag) != bit)
3212      {      {
3213      if (length >= MAX_RANGE_SIZE)      if (length >= MAX_RANGE_SIZE)
       {  
       ranges[0] = -1;  
3214        return;        return;
       }  
3215      ranges[2 + length] = i;      ranges[2 + length] = i;
3216      length++;      length++;
3217      bit ^= flag;      bit ^= flag;
# Line 3213  for (i = 1; i < 256; i++) Line 3220  for (i = 1; i < 256; i++)
3220  if (bit != 0)  if (bit != 0)
3221    {    {
3222    if (length >= MAX_RANGE_SIZE)    if (length >= MAX_RANGE_SIZE)
     {  
     ranges[0] = -1;  
3223      return;      return;
     }  
3224    ranges[2 + length] = 256;    ranges[2 + length] = 256;
3225    length++;    length++;
3226    }    }

Legend:
Removed from v.991  
changed lines
  Added in v.992

  ViewVC Help
Powered by ViewVC 1.1.5