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

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

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

revision 1275 by zherczeg, Sun Mar 10 05:32:10 2013 UTC revision 1278 by zherczeg, Tue Mar 12 06:15:04 2013 UTC
# Line 204  enum frame_types { Line 204  enum frame_types {
204  enum control_types {  enum control_types {
205    type_commit = 0,    type_commit = 0,
206    type_prune = 1,    type_prune = 1,
207    type_skip = 2    type_skip = 2,
208      type_skip_arg = 3,
209      type_mark = 4
210  };  };
211    
212  typedef int (SLJIT_CALL *jit_function)(jit_arguments *args);  typedef int (SLJIT_CALL *jit_function)(jit_arguments *args);
# Line 227  typedef struct backtrack_common { Line 229  typedef struct backtrack_common {
229  typedef struct assert_backtrack {  typedef struct assert_backtrack {
230    backtrack_common common;    backtrack_common common;
231    jump_list *condfailed;    jump_list *condfailed;
232    /* Less than 0 (-1) if a frame is not needed. */    /* Less than 0 if a frame is not needed. */
233    int framesize;    int framesize;
234    /* Points to our private memory word on the stack. */    /* Points to our private memory word on the stack. */
235    int private_data_ptr;    int private_data_ptr;
# Line 248  typedef struct bracket_backtrack { Line 250  typedef struct bracket_backtrack {
250      /* Both for OP_COND, OP_SCOND. */      /* Both for OP_COND, OP_SCOND. */
251      jump_list *condfailed;      jump_list *condfailed;
252      assert_backtrack *assert;      assert_backtrack *assert;
253      /* For OP_ONCE. -1 if not needed. */      /* For OP_ONCE. Less than 0 if not needed. */
254      int framesize;      int framesize;
255    } u;    } u;
256    /* Points to our private memory word on the stack. */    /* Points to our private memory word on the stack. */
# Line 332  typedef struct compiler_common { Line 334  typedef struct compiler_common {
334    int mode;    int mode;
335    /* \K is in the pattern. */    /* \K is in the pattern. */
336    BOOL has_set_som;    BOOL has_set_som;
337      /* (*SKIP:arg) is in the pattern. */
338      BOOL has_skip_arg;
339    /* Needs to know the start position anytime. */    /* Needs to know the start position anytime. */
340    BOOL needs_start_ptr;    BOOL needs_start_ptr;
341    /* Currently in recurse or assert. */    /* Currently in recurse or assert. */
# Line 513  return cc; Line 517  return cc;
517   set_private_data_ptrs   set_private_data_ptrs
518   get_framesize   get_framesize
519   init_frame   init_frame
520   get_private_data_length_for_copy   get_private_data_copy_length
521   copy_private_data   copy_private_data
522   compile_matchingpath   compile_matchingpath
523   compile_backtrackingpath   compile_backtrackingpath
# Line 696  switch(*cc) Line 700  switch(*cc)
700    
701    case OP_MARK:    case OP_MARK:
702    case OP_PRUNE_ARG:    case OP_PRUNE_ARG:
703      case OP_SKIP_ARG:
704    return cc + 1 + 2 + cc[1];    return cc + 1 + 2 + cc[1];
705    
706    default:    default:
# Line 964  while (cc < ccend) Line 969  while (cc < ccend)
969      case OP_PRUNE:      case OP_PRUNE:
970      case OP_SKIP:      case OP_SKIP:
971      common->needs_start_ptr = TRUE;      common->needs_start_ptr = TRUE;
     /* Fall through. */  
   
     case OP_COMMIT:  
972      common->control_head_ptr = 1;      common->control_head_ptr = 1;
973      cc += 1;      cc += 1;
974      break;      break;
975    
976        case OP_SKIP_ARG:
977        common->control_head_ptr = 1;
978        common->has_skip_arg = TRUE;
979        cc += 1 + 2 + cc[1];
980        break;
981    
982      default:      default:
983      cc = next_opcode(common, cc);      cc = next_opcode(common, cc);
984      if (cc == NULL)      if (cc == NULL)
# Line 1148  while (cc < ccend) Line 1156  while (cc < ccend)
1156  }  }
1157    
1158  /* Returns with a frame_types (always < 0) if no need for frame. */  /* Returns with a frame_types (always < 0) if no need for frame. */
1159  static int get_framesize(compiler_common *common, pcre_uchar *cc, BOOL recursive)  static int get_framesize(compiler_common *common, pcre_uchar *cc, BOOL recursive, BOOL* needs_control_head)
1160  {  {
1161  pcre_uchar *ccend = bracketend(cc) - (1 + LINK_SIZE);  pcre_uchar *ccend = bracketend(cc) - (1 + LINK_SIZE);
1162  int length = 0;  int length = 0;
# Line 1159  BOOL setmark_found = recursive; Line 1167  BOOL setmark_found = recursive;
1167  /* The last capture is a local variable even for recursions. */  /* The last capture is a local variable even for recursions. */
1168  BOOL capture_last_found = FALSE;  BOOL capture_last_found = FALSE;
1169    
1170    #if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD
1171    SLJIT_ASSERT(common->control_head_ptr != 0);
1172    *needs_control_head = TRUE;
1173    #else
1174    *needs_control_head = FALSE;
1175    #endif
1176    
1177  if (!recursive && (*cc == OP_CBRAPOS || *cc == OP_SCBRAPOS))  if (!recursive && (*cc == OP_CBRAPOS || *cc == OP_SCBRAPOS))
1178    {    {
1179    possessive = length = (common->capture_last_ptr != 0) ? 5 : 3;    possessive = length = (common->capture_last_ptr != 0) ? 5 : 3;
# Line 1191  while (cc < ccend) Line 1206  while (cc < ccend)
1206        length += 2;        length += 2;
1207        setmark_found = TRUE;        setmark_found = TRUE;
1208        }        }
1209        if (common->control_head_ptr != 0)
1210          *needs_control_head = TRUE;
1211      cc += 1 + 2 + cc[1];      cc += 1 + 2 + cc[1];
1212      break;      break;
1213    
# Line 1228  while (cc < ccend) Line 1245  while (cc < ccend)
1245      cc += 1 + LINK_SIZE + IMM2_SIZE;      cc += 1 + LINK_SIZE + IMM2_SIZE;
1246      break;      break;
1247    
1248        case OP_PRUNE:
1249        case OP_SKIP:
1250        case OP_SKIP_ARG:
1251        case OP_COMMIT:
1252        if (common->control_head_ptr != 0)
1253          *needs_control_head = TRUE;
1254        /* Fall through. */
1255    
1256      default:      default:
1257      stack_restore = TRUE;      stack_restore = TRUE;
1258      /* Fall through. */      /* Fall through. */
# Line 1427  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), st Line 1452  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), st
1452  SLJIT_ASSERT(stackpos == STACK(stacktop));  SLJIT_ASSERT(stackpos == STACK(stacktop));
1453  }  }
1454    
1455  static SLJIT_INLINE int get_private_data_length_for_copy(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend)  static SLJIT_INLINE int get_private_data_copy_length(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, BOOL needs_control_head)
1456  {  {
1457  int private_data_length = common->control_head_ptr ? 3 : 2;  int private_data_length = needs_control_head ? 3 : 2;
1458  int size;  int size;
1459  pcre_uchar *alternative;  pcre_uchar *alternative;
1460  /* Calculate the sum of the private machine words. */  /* Calculate the sum of the private machine words. */
# Line 1542  return private_data_length; Line 1567  return private_data_length;
1567  }  }
1568    
1569  static void copy_private_data(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend,  static void copy_private_data(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend,
1570    BOOL save, int stackptr, int stacktop)    BOOL save, int stackptr, int stacktop, BOOL needs_control_head)
1571  {  {
1572  DEFINE_COMPILER;  DEFINE_COMPILER;
1573  int srcw[2];  int srcw[2];
# Line 1563  stacktop = STACK(stacktop - 1); Line 1588  stacktop = STACK(stacktop - 1);
1588    
1589  if (!save)  if (!save)
1590    {    {
1591    stackptr += (common->control_head_ptr ? 2 : 1) * sizeof(sljit_sw);    stackptr += (needs_control_head ? 2 : 1) * sizeof(sljit_sw);
1592    if (stackptr < stacktop)    if (stackptr < stacktop)
1593      {      {
1594      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), stackptr);      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), stackptr);
# Line 1588  do Line 1613  do
1613      SLJIT_ASSERT(save && common->recursive_head_ptr != 0);      SLJIT_ASSERT(save && common->recursive_head_ptr != 0);
1614      count = 1;      count = 1;
1615      srcw[0] = common->recursive_head_ptr;      srcw[0] = common->recursive_head_ptr;
1616      if (common->control_head_ptr != 0)      if (needs_control_head)
1617        {        {
1618          SLJIT_ASSERT(common->control_head_ptr != 0);
1619        count = 2;        count = 2;
1620        srcw[1] = common->control_head_ptr;        srcw[1] = common->control_head_ptr;
1621        }        }
# Line 2005  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT Line 2031  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT
2031  OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(struct sljit_stack, base));  OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(struct sljit_stack, base));
2032  }  }
2033    
2034  static sljit_sw do_check_control_chain(sljit_sw *current)  static sljit_sw SLJIT_CALL do_check_control_chain(sljit_sw *current)
2035  {  {
2036  sljit_sw return_value = 0;  sljit_sw return_value = 0;
2037    const pcre_uchar *skip_arg = NULL;
2038    
2039  SLJIT_ASSERT(current != NULL);  SLJIT_ASSERT(current != NULL);
2040  do  do
# Line 2023  do Line 2050  do
2050    
2051      case type_skip:      case type_skip:
2052      /* Overwrites prune, but not other skips. */      /* Overwrites prune, but not other skips. */
2053      if (return_value == 0)      if (return_value == 0 && skip_arg == NULL)
2054        return_value = current[-3];        return_value = current[-3];
2055      break;      break;
2056    
2057        case type_skip_arg:
2058        if (return_value == 0 && skip_arg == NULL)
2059          skip_arg = (pcre_uchar *)current[-3];
2060        break;
2061    
2062        case type_mark:
2063        if (return_value == 0 && skip_arg != NULL)
2064          if (STRCMP_UC_UC(skip_arg, (pcre_uchar *)current[-3]) == 0)
2065            return_value = current[-4];
2066        break;
2067    
2068      default:      default:
2069      SLJIT_ASSERT_STOP();      SLJIT_ASSERT_STOP();
2070      break;      break;
# Line 2034  do Line 2072  do
2072    current = (sljit_sw*)current[-1];    current = (sljit_sw*)current[-1];
2073    }    }
2074  while (current != NULL);  while (current != NULL);
2075  return return_value;  return (return_value != 0 || skip_arg == NULL) ? return_value : -2;
2076  }  }
2077    
2078  static SLJIT_INLINE void copy_ovector(compiler_common *common, int topbracket)  static SLJIT_INLINE void copy_ovector(compiler_common *common, int topbracket)
# Line 2106  OP1(SLJIT_MOV, SLJIT_SAVED_REG1, 0, SLJI Line 2144  OP1(SLJIT_MOV, SLJIT_SAVED_REG1, 0, SLJI
2144  OP1(SLJIT_MOV, SLJIT_SCRATCH_REG2, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG2), SLJIT_OFFSETOF(jit_arguments, offsets));  OP1(SLJIT_MOV, SLJIT_SCRATCH_REG2, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG2), SLJIT_OFFSETOF(jit_arguments, offsets));
2145    
2146  jump = CMP(SLJIT_C_SIG_LESS, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, 3);  jump = CMP(SLJIT_C_SIG_LESS, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, 3);
2147  OP2(SLJIT_SUB, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mode == JIT_PARTIAL_HARD_COMPILE ? common->start_ptr : (common->hit_start + sizeof(sljit_sw)), SLJIT_SAVED_REG1, 0);  OP2(SLJIT_SUB, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mode == JIT_PARTIAL_HARD_COMPILE ? common->start_ptr : (common->hit_start + (int)sizeof(sljit_sw)), SLJIT_SAVED_REG1, 0);
2148  #if defined COMPILE_PCRE16 || defined COMPILE_PCRE32  #if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
2149  OP2(SLJIT_ASHR, SLJIT_SCRATCH_REG3, 0, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, UCHAR_SHIFT);  OP2(SLJIT_ASHR, SLJIT_SCRATCH_REG3, 0, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, UCHAR_SHIFT);
2150  #endif  #endif
# Line 5244  recurse_entry *entry = common->entries; Line 5282  recurse_entry *entry = common->entries;
5282  recurse_entry *prev = NULL;  recurse_entry *prev = NULL;
5283  int start = GET(cc, 1);  int start = GET(cc, 1);
5284  pcre_uchar *start_cc;  pcre_uchar *start_cc;
5285    BOOL needs_control_head;
5286    
5287  PUSH_BACKTRACK(sizeof(recurse_backtrack), cc, NULL);  PUSH_BACKTRACK(sizeof(recurse_backtrack), cc, NULL);
5288    
5289  /* Inlining simple patterns. */  /* Inlining simple patterns. */
5290  if (get_framesize(common, common->start + start, TRUE) == no_stack)  if (get_framesize(common, common->start + start, TRUE, &needs_control_head) == no_stack)
5291    {    {
5292    start_cc = common->start + start;    start_cc = common->start + start;
5293    compile_matchingpath(common, next_opcode(common, start_cc), bracketend(start_cc) - (1 + LINK_SIZE), backtrack);    compile_matchingpath(common, next_opcode(common, start_cc), bracketend(start_cc) - (1 + LINK_SIZE), backtrack);
# Line 5408  static pcre_uchar *compile_assert_matchi Line 5447  static pcre_uchar *compile_assert_matchi
5447  DEFINE_COMPILER;  DEFINE_COMPILER;
5448  int framesize;  int framesize;
5449  int extrasize;  int extrasize;
5450  BOOL needs_control_head = common->control_head_ptr != 0;  BOOL needs_control_head;
5451  int private_data_ptr;  int private_data_ptr;
5452  backtrack_common altbacktrack;  backtrack_common altbacktrack;
5453  pcre_uchar *ccbegin;  pcre_uchar *ccbegin;
# Line 5434  if (*cc == OP_BRAZERO || *cc == OP_BRAMI Line 5473  if (*cc == OP_BRAZERO || *cc == OP_BRAMI
5473    }    }
5474  private_data_ptr = PRIVATE_DATA(cc);  private_data_ptr = PRIVATE_DATA(cc);
5475  SLJIT_ASSERT(private_data_ptr != 0);  SLJIT_ASSERT(private_data_ptr != 0);
5476  framesize = get_framesize(common, cc, FALSE);  framesize = get_framesize(common, cc, FALSE, &needs_control_head);
5477  backtrack->framesize = framesize;  backtrack->framesize = framesize;
5478  backtrack->private_data_ptr = private_data_ptr;  backtrack->private_data_ptr = private_data_ptr;
5479  opcode = *cc;  opcode = *cc;
# Line 5454  if (bra == OP_BRAMINZERO) Line 5493  if (bra == OP_BRAMINZERO)
5493  if (framesize < 0)  if (framesize < 0)
5494    {    {
5495    extrasize = needs_control_head ? 2 : 1;    extrasize = needs_control_head ? 2 : 1;
5496    if (framesize != no_stack)    if (framesize == no_frame)
5497      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);
5498    allocate_stack(common, extrasize);    allocate_stack(common, extrasize);
5499    if (needs_control_head)    if (needs_control_head)
# Line 5519  while (1) Line 5558  while (1)
5558    /* Reset stack. */    /* Reset stack. */
5559    if (framesize < 0)    if (framesize < 0)
5560      {      {
5561      if (framesize != no_stack)      if (framesize == no_frame)
5562        OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);        OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
5563      else      else
5564        free_stack(common, extrasize);        free_stack(common, extrasize);
# Line 5871  if (i < name_count) Line 5910  if (i < name_count)
5910  return condition;  return condition;
5911  }  }
5912    
5913    static SLJIT_INLINE void match_once_common(compiler_common *common, pcre_uchar ket, int framesize, int private_data_ptr, BOOL has_alternatives, BOOL needs_control_head)
5914    {
5915    DEFINE_COMPILER;
5916    int stacksize;
5917    
5918    if (framesize < 0)
5919      {
5920      if (framesize == no_frame)
5921        OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
5922      else
5923        {
5924        stacksize = needs_control_head ? 1 : 0;
5925        if (ket != OP_KET || has_alternatives)
5926          stacksize++;
5927        free_stack(common, stacksize);
5928        }
5929    
5930      if (needs_control_head)
5931        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), (ket != OP_KET || has_alternatives) ? sizeof(sljit_sw) : 0);
5932    
5933      /* TMP2 which is set here used by OP_KETRMAX below. */
5934      if (ket == OP_KETRMAX)
5935        OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), 0);
5936      else if (ket == OP_KETRMIN)
5937        {
5938        /* Move the STR_PTR to the private_data_ptr. */
5939        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), 0);
5940        }
5941      }
5942    else
5943      {
5944      stacksize = (ket != OP_KET || has_alternatives) ? 2 : 1;
5945      OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (framesize + stacksize) * sizeof(sljit_sw));
5946      if (needs_control_head)
5947        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), 0);
5948    
5949      if (ket == OP_KETRMAX)
5950        {
5951        /* TMP2 which is set here used by OP_KETRMAX below. */
5952        OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
5953        }
5954      }
5955    if (needs_control_head)
5956      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP1, 0);
5957    }
5958    
5959    static SLJIT_INLINE int match_capture_common(compiler_common *common, int stacksize, int offset, int private_data_ptr)
5960    {
5961    DEFINE_COMPILER;
5962    
5963    if (common->capture_last_ptr != 0)
5964      {
5965      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
5966      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, offset >> 1);
5967      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
5968      stacksize++;
5969      }
5970    if (common->optimized_cbracket[offset >> 1] == 0)
5971      {
5972      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
5973      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
5974      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
5975      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
5976      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);
5977      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
5978      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
5979      stacksize += 2;
5980      }
5981    return stacksize;
5982    }
5983    
5984  /*  /*
5985    Handling bracketed expressions is probably the most complex part.    Handling bracketed expressions is probably the most complex part.
5986    
# Line 5939  pcre_uchar bra = OP_BRA; Line 6049  pcre_uchar bra = OP_BRA;
6049  pcre_uchar ket;  pcre_uchar ket;
6050  assert_backtrack *assert;  assert_backtrack *assert;
6051  BOOL has_alternatives;  BOOL has_alternatives;
6052    BOOL needs_control_head = FALSE;
6053  struct sljit_jump *jump;  struct sljit_jump *jump;
6054  struct sljit_jump *skip;  struct sljit_jump *skip;
6055  struct sljit_label *rmaxlabel = NULL;  struct sljit_label *rmaxlabel = NULL;
# Line 6014  else if (opcode == OP_ONCE || opcode == Line 6125  else if (opcode == OP_ONCE || opcode ==
6125    SLJIT_ASSERT(private_data_ptr != 0);    SLJIT_ASSERT(private_data_ptr != 0);
6126    BACKTRACK_AS(bracket_backtrack)->private_data_ptr = private_data_ptr;    BACKTRACK_AS(bracket_backtrack)->private_data_ptr = private_data_ptr;
6127    if (opcode == OP_ONCE)    if (opcode == OP_ONCE)
6128      BACKTRACK_AS(bracket_backtrack)->u.framesize = get_framesize(common, ccbegin, FALSE);      BACKTRACK_AS(bracket_backtrack)->u.framesize = get_framesize(common, ccbegin, FALSE, &needs_control_head);
6129    }    }
6130    
6131  /* Instructions before the first alternative. */  /* Instructions before the first alternative. */
6132  stacksize = 0;  stacksize = 0;
6133  if ((ket == OP_KETRMAX) || (ket == OP_KETRMIN && bra != OP_BRAMINZERO))  if (ket == OP_KETRMAX || (ket == OP_KETRMIN && bra != OP_BRAMINZERO))
6134    stacksize++;    stacksize++;
6135  if (bra == OP_BRAZERO)  if (bra == OP_BRAZERO)
6136    stacksize++;    stacksize++;
# Line 6028  if (stacksize > 0) Line 6139  if (stacksize > 0)
6139    allocate_stack(common, stacksize);    allocate_stack(common, stacksize);
6140    
6141  stacksize = 0;  stacksize = 0;
6142  if ((ket == OP_KETRMAX) || (ket == OP_KETRMIN && bra != OP_BRAMINZERO))  if (ket == OP_KETRMAX || (ket == OP_KETRMIN && bra != OP_BRAMINZERO))
6143    {    {
6144    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
6145    stacksize++;    stacksize++;
# Line 6091  if (ket == OP_KETRMAX) Line 6202  if (ket == OP_KETRMAX)
6202  /* Handling capturing brackets and alternatives. */  /* Handling capturing brackets and alternatives. */
6203  if (opcode == OP_ONCE)  if (opcode == OP_ONCE)
6204    {    {
6205      stacksize = 0;
6206      if (needs_control_head)
6207        {
6208        OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
6209        stacksize++;
6210        }
6211    
6212    if (BACKTRACK_AS(bracket_backtrack)->u.framesize < 0)    if (BACKTRACK_AS(bracket_backtrack)->u.framesize < 0)
6213      {      {
6214      /* Neither capturing brackets nor recursions are not found in the block. */      /* Neither capturing brackets nor recursions are found in the block. */
6215      if (ket == OP_KETRMIN)      if (ket == OP_KETRMIN)
6216        {        {
6217        OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);        stacksize += 2;
6218        allocate_stack(common, 2);        if (!needs_control_head)
6219        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);          OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
       OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);  
       OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));  
6220        }        }
6221      else if (ket == OP_KETRMAX || has_alternatives)      else
6222        {        {
6223        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);        if (BACKTRACK_AS(bracket_backtrack)->u.framesize == no_frame)
6224        allocate_stack(common, 1);          OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);
6225        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);        if (ket == OP_KETRMAX || has_alternatives)
6226            stacksize++;
6227        }        }
6228      else  
6229        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);      if (stacksize > 0)
6230          allocate_stack(common, stacksize);
6231    
6232        stacksize = 0;
6233        if (needs_control_head)
6234          {
6235          stacksize++;
6236          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
6237          }
6238    
6239        if (ket == OP_KETRMIN)
6240          {
6241          if (needs_control_head)
6242            OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
6243          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
6244          if (BACKTRACK_AS(bracket_backtrack)->u.framesize == no_frame)
6245            OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0, SLJIT_IMM, needs_control_head ? (2 * sizeof(sljit_sw)) : sizeof(sljit_sw));
6246          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);
6247          }
6248        else if (ket == OP_KETRMAX || has_alternatives)
6249          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
6250      }      }
6251    else    else
6252      {      {
6253      if (ket == OP_KETRMIN || ket == OP_KETRMAX || has_alternatives)      if (ket != OP_KET || has_alternatives)
6254          stacksize++;
6255    
6256        stacksize += BACKTRACK_AS(bracket_backtrack)->u.framesize + 1;
6257        allocate_stack(common, stacksize);
6258    
6259        if (needs_control_head)
6260          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
6261    
6262        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
6263        OP2(SLJIT_SUB, TMP2, 0, STACK_TOP, 0, SLJIT_IMM, stacksize * sizeof(sljit_sw));
6264    
6265        stacksize = needs_control_head ? 1 : 0;
6266        if (ket != OP_KET || has_alternatives)
6267        {        {
6268        allocate_stack(common, BACKTRACK_AS(bracket_backtrack)->u.framesize + 2);        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
       OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);  
       OP2(SLJIT_SUB, TMP2, 0, STACK_TOP, 0, SLJIT_IMM, -STACK(BACKTRACK_AS(bracket_backtrack)->u.framesize + 1));  
       OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);  
6269        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);
6270        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);        stacksize++;
6271        init_frame(common, ccbegin, BACKTRACK_AS(bracket_backtrack)->u.framesize + 1, 2, FALSE);        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
6272        }        }
6273      else      else
6274        {        {
       allocate_stack(common, BACKTRACK_AS(bracket_backtrack)->u.framesize + 1);  
       OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);  
       OP2(SLJIT_SUB, TMP2, 0, STACK_TOP, 0, SLJIT_IMM, -STACK(BACKTRACK_AS(bracket_backtrack)->u.framesize));  
6275        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);
6276        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
       init_frame(common, ccbegin, BACKTRACK_AS(bracket_backtrack)->u.framesize, 1, FALSE);  
6277        }        }
6278        init_frame(common, ccbegin, BACKTRACK_AS(bracket_backtrack)->u.framesize + stacksize, stacksize + 1, FALSE);
6279      }      }
6280    }    }
6281  else if (opcode == OP_CBRA || opcode == OP_SCBRA)  else if (opcode == OP_CBRA || opcode == OP_SCBRA)
# Line 6267  if (SLJIT_UNLIKELY(sljit_get_compiler_er Line 6411  if (SLJIT_UNLIKELY(sljit_get_compiler_er
6411    return NULL;    return NULL;
6412    
6413  if (opcode == OP_ONCE)  if (opcode == OP_ONCE)
6414    {    match_once_common(common, ket, BACKTRACK_AS(bracket_backtrack)->u.framesize, private_data_ptr, has_alternatives, needs_control_head);
   if (BACKTRACK_AS(bracket_backtrack)->u.framesize < 0)  
     {  
     OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);  
     /* TMP2 which is set here used by OP_KETRMAX below. */  
     if (ket == OP_KETRMAX)  
       OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), 0);  
     else if (ket == OP_KETRMIN)  
       {  
       /* Move the STR_PTR to the private_data_ptr. */  
       OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), 0);  
       }  
     }  
   else  
     {  
     stacksize = (ket == OP_KETRMIN || ket == OP_KETRMAX || has_alternatives) ? 2 : 1;  
     OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (BACKTRACK_AS(bracket_backtrack)->u.framesize + stacksize) * sizeof(sljit_sw));  
     if (ket == OP_KETRMAX)  
       {  
       /* TMP2 which is set here used by OP_KETRMAX below. */  
       OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));  
       }  
     }  
   }  
6415    
6416  stacksize = 0;  stacksize = 0;
6417  if (ket != OP_KET || bra != OP_BRA)  if (ket != OP_KET || bra != OP_BRA)
# Line 6319  if (ket != OP_KET || bra != OP_BRA) Line 6440  if (ket != OP_KET || bra != OP_BRA)
6440    }    }
6441    
6442  if (offset != 0)  if (offset != 0)
6443    {    stacksize = match_capture_common(common, stacksize, offset, private_data_ptr);
   if (common->capture_last_ptr != 0)  
     {  
     OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);  
     OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, offset >> 1);  
     OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP2, 0);  
     stacksize++;  
     }  
   if (common->optimized_cbracket[offset >> 1] == 0)  
     {  
     OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));  
     OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));  
     OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);  
     OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);  
     OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);  
     OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);  
     OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);  
     stacksize += 2;  
     }  
   }  
6444    
6445  if (has_alternatives)  if (has_alternatives)
6446    {    {
# Line 6409  if ((ket != OP_KET && bra != OP_BRAMINZE Line 6511  if ((ket != OP_KET && bra != OP_BRAMINZE
6511  while (*cc == OP_ALT)  while (*cc == OP_ALT)
6512    cc += GET(cc, 1);    cc += GET(cc, 1);
6513  cc += 1 + LINK_SIZE;  cc += 1 + LINK_SIZE;
6514    
6515    /* Temporarily encoding the needs_control_head in framesize. */
6516    if (opcode == OP_ONCE)
6517      BACKTRACK_AS(bracket_backtrack)->u.framesize = (BACKTRACK_AS(bracket_backtrack)->u.framesize << 1) | (needs_control_head ? 1 : 0);
6518  return cc;  return cc;
6519  }  }
6520    
# Line 6419  backtrack_common *backtrack; Line 6525  backtrack_common *backtrack;
6525  pcre_uchar opcode;  pcre_uchar opcode;
6526  int private_data_ptr;  int private_data_ptr;
6527  int cbraprivptr = 0;  int cbraprivptr = 0;
6528    BOOL needs_control_head;
6529  int framesize;  int framesize;
6530  int stacksize;  int stacksize;
6531  int offset = 0;  int offset = 0;
6532  BOOL zero = FALSE;  BOOL zero = FALSE;
6533  pcre_uchar *ccbegin = NULL;  pcre_uchar *ccbegin = NULL;
6534  int stack;  int stack; /* Also contains the offset of control head. */
6535  struct sljit_label *loop = NULL;  struct sljit_label *loop = NULL;
6536  struct jump_list *emptymatch = NULL;  struct jump_list *emptymatch = NULL;
6537    
# Line 6462  switch(opcode) Line 6569  switch(opcode)
6569    break;    break;
6570    }    }
6571    
6572  framesize = get_framesize(common, cc, FALSE);  framesize = get_framesize(common, cc, FALSE, &needs_control_head);
6573  BACKTRACK_AS(bracketpos_backtrack)->framesize = framesize;  BACKTRACK_AS(bracketpos_backtrack)->framesize = framesize;
6574  if (framesize < 0)  if (framesize < 0)
6575    {    {
# Line 6475  if (framesize < 0) Line 6582  if (framesize < 0)
6582    else    else
6583      stacksize = 1;      stacksize = 1;
6584    
6585      if (needs_control_head)
6586        stacksize++;
6587    if (!zero)    if (!zero)
6588      stacksize++;      stacksize++;
6589    
# Line 6483  if (framesize < 0) Line 6592  if (framesize < 0)
6592    if (framesize == no_frame)    if (framesize == no_frame)
6593      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);
6594    
6595      stack = 0;
6596    if (offset != 0)    if (offset != 0)
6597      {      {
6598        stack = 2;
6599      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
6600      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
6601      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
6602      if (common->capture_last_ptr != 0)      if (common->capture_last_ptr != 0)
6603        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
6604      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);
6605        if (needs_control_head)
6606          OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
6607      if (common->capture_last_ptr != 0)      if (common->capture_last_ptr != 0)
6608          {
6609        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP1, 0);        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP1, 0);
6610          stack = 3;
6611          }
6612      }      }
6613    else    else
6614        {
6615        if (needs_control_head)
6616          OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
6617      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
6618        stack = 1;
6619        }
6620    
6621      if (needs_control_head)
6622        stack++;
6623    if (!zero)    if (!zero)
6624      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize - 1), SLJIT_IMM, 1);      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), SLJIT_IMM, 1);
6625      if (needs_control_head)
6626        {
6627        stack--;
6628        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP2, 0);
6629        }
6630    }    }
6631  else  else
6632    {    {
6633    stacksize = framesize + 1;    stacksize = framesize + 1;
6634    if (!zero)    if (!zero)
6635      stacksize++;      stacksize++;
6636    if (opcode == OP_BRAPOS || opcode == OP_SBRAPOS)    if (needs_control_head)
6637        stacksize++;
6638      if (offset == 0)
6639      stacksize++;      stacksize++;
6640    BACKTRACK_AS(bracketpos_backtrack)->stacksize = stacksize;    BACKTRACK_AS(bracketpos_backtrack)->stacksize = stacksize;
6641    
6642    allocate_stack(common, stacksize);    allocate_stack(common, stacksize);
6643    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
6644    OP2(SLJIT_SUB, TMP2, 0, STACK_TOP, 0, SLJIT_IMM, -STACK(stacksize - 1));    if (needs_control_head)
6645    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
6646      OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0, SLJIT_IMM, -STACK(stacksize - 1));
6647    
6648    stack = 0;    stack = 0;
6649    if (!zero)    if (!zero)
6650      {      {
6651      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 1);      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 1);
6652        stack = 1;
6653        }
6654      if (needs_control_head)
6655        {
6656        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP2, 0);
6657      stack++;      stack++;
6658      }      }
6659    if (opcode == OP_BRAPOS || opcode == OP_SBRAPOS)    if (offset == 0)
6660      {      {
6661      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), STR_PTR, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), STR_PTR, 0);
6662      stack++;      stack++;
6663      }      }
6664    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP1, 0);    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP1, 0);
6665    init_frame(common, cc, stacksize - 1, stacksize - framesize, FALSE);    init_frame(common, cc, stacksize - 1, stacksize - framesize, FALSE);
6666      stack -= 1 + (offset == 0);
6667    }    }
6668    
6669  if (offset != 0)  if (offset != 0)
# Line 6602  while (*cc != OP_KETRPOS) Line 6739  while (*cc != OP_KETRPOS)
6739          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
6740        }        }
6741      }      }
6742    
6743      if (needs_control_head)
6744        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
6745    
6746    JUMPTO(SLJIT_JUMP, loop);    JUMPTO(SLJIT_JUMP, loop);
6747    flush_stubs(common);    flush_stubs(common);
6748    
# Line 6638  while (*cc != OP_KETRPOS) Line 6779  while (*cc != OP_KETRPOS)
6779    ccbegin = cc + 1 + LINK_SIZE;    ccbegin = cc + 1 + LINK_SIZE;
6780    }    }
6781    
6782    /* We don't have to restore the control head in case of a failed match. */
6783    
6784  backtrack->topbacktracks = NULL;  backtrack->topbacktracks = NULL;
6785  if (!zero)  if (!zero)
6786    {    {
# Line 7246  while (cc < ccend) Line 7389  while (cc < ccend)
7389      PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc);      PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc);
7390      SLJIT_ASSERT(common->mark_ptr != 0);      SLJIT_ASSERT(common->mark_ptr != 0);
7391      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
7392      allocate_stack(common, 1);      allocate_stack(common, common->has_skip_arg ? 5 : 1);
7393      OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);      OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
7394      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(common->has_skip_arg ? 4 : 0), TMP2, 0);
7395      OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2));      OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2));
7396      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP2, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP2, 0);
7397      OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0);
7398        if (common->has_skip_arg)
7399          {
7400          OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
7401          OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, STACK_TOP, 0);
7402          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, type_mark);
7403          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), SLJIT_IMM, (sljit_sw)(cc + 2));
7404          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(3), STR_PTR, 0);
7405          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
7406          }
7407      cc += 1 + 2 + cc[1];      cc += 1 + 2 + cc[1];
7408      break;      break;
7409    
# Line 7275  while (cc < ccend) Line 7427  while (cc < ccend)
7427      break;      break;
7428    
7429      case OP_SKIP:      case OP_SKIP:
7430        case OP_SKIP_ARG:
7431      PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc);      PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc);
7432      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
7433      allocate_stack(common, 3);      allocate_stack(common, 3);
7434      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, STACK_TOP, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, STACK_TOP, 0);
7435      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, type_skip);      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, *cc == OP_SKIP ? type_skip : type_skip_arg);
7436      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), STR_PTR, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), *cc == OP_SKIP ? STR_PTR : SLJIT_IMM, *cc == OP_SKIP ? 0 : (sljit_sw)(cc + 2));
7437      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
7438      cc += 1;      cc += (*cc == OP_SKIP_ARG) ? (1 + 2 + cc[1]) : 1;
7439      break;      break;
7440    
7441      case OP_FAIL:      case OP_FAIL:
# Line 7599  pcre_uchar bra = OP_BRA; Line 7752  pcre_uchar bra = OP_BRA;
7752  pcre_uchar ket;  pcre_uchar ket;
7753  assert_backtrack *assert;  assert_backtrack *assert;
7754  BOOL has_alternatives;  BOOL has_alternatives;
7755    BOOL needs_control_head = FALSE;
7756  struct sljit_jump *brazero = NULL;  struct sljit_jump *brazero = NULL;
7757  struct sljit_jump *once = NULL;  struct sljit_jump *once = NULL;
7758  struct sljit_jump *cond = NULL;  struct sljit_jump *cond = NULL;
# Line 7624  if (SLJIT_UNLIKELY(opcode == OP_COND) && Line 7778  if (SLJIT_UNLIKELY(opcode == OP_COND) &&
7778  if (SLJIT_UNLIKELY(opcode == OP_ONCE_NC))  if (SLJIT_UNLIKELY(opcode == OP_ONCE_NC))
7779    opcode = OP_ONCE;    opcode = OP_ONCE;
7780    
7781    /* Decoding the needs_control_head in framesize. */
7782    if (opcode == OP_ONCE)
7783      {
7784      needs_control_head = (CURRENT_AS(bracket_backtrack)->u.framesize & 0x1) != 0;
7785      CURRENT_AS(bracket_backtrack)->u.framesize >>= 1;
7786      }
7787    
7788  if (ket == OP_KETRMAX)  if (ket == OP_KETRMAX)
7789    {    {
7790    if (bra == OP_BRAZERO)    if (bra == OP_BRAZERO)
# Line 7781  if (has_alternatives) Line 7942  if (has_alternatives)
7942      current->top = NULL;      current->top = NULL;
7943      current->topbacktracks = NULL;      current->topbacktracks = NULL;
7944      current->nextbacktracks = NULL;      current->nextbacktracks = NULL;
7945        /* Conditional blocks always have an additional alternative, even if it is empty. */
7946      if (*cc == OP_ALT)      if (*cc == OP_ALT)
7947        {        {
7948        ccprev = cc + 1 + LINK_SIZE;        ccprev = cc + 1 + LINK_SIZE;
7949        cc += GET(cc, 1);        cc += GET(cc, 1);
7950        if (opcode != OP_COND && opcode != OP_SCOND)        if (opcode != OP_COND && opcode != OP_SCOND)
7951          {          {
7952          if (private_data_ptr != 0 && opcode != OP_ONCE)          if (opcode != OP_ONCE)
7953            OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);            {
7954              if (private_data_ptr != 0)
7955                OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
7956              else
7957                OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
7958              }
7959          else          else
7960            OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));            OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(needs_control_head ? 1 : 0));
7961          }          }
7962        compile_matchingpath(common, ccprev, cc, current);        compile_matchingpath(common, ccprev, cc, current);
7963        if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))        if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
# Line 7800  if (has_alternatives) Line 7967  if (has_alternatives)
7967      /* Instructions after the current alternative is succesfully matched. */      /* Instructions after the current alternative is succesfully matched. */
7968      /* There is a similar code in compile_bracket_matchingpath. */      /* There is a similar code in compile_bracket_matchingpath. */
7969      if (opcode == OP_ONCE)      if (opcode == OP_ONCE)
7970        {        match_once_common(common, ket, CURRENT_AS(bracket_backtrack)->u.framesize, private_data_ptr, has_alternatives, needs_control_head);
       if (CURRENT_AS(bracket_backtrack)->u.framesize < 0)  
         {  
         OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);  
         /* TMP2 which is set here used by OP_KETRMAX below. */  
         if (ket == OP_KETRMAX)  
           OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), 0);  
         else if (ket == OP_KETRMIN)  
           {  
           /* Move the STR_PTR to the private_data_ptr. */  
           OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), 0);  
           }  
         }  
       else  
         {  
         OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (CURRENT_AS(bracket_backtrack)->u.framesize + 2) * sizeof(sljit_sw));  
         if (ket == OP_KETRMAX)  
           {  
           /* TMP2 which is set here used by OP_KETRMAX below. */  
           OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));  
           }  
         }  
       }  
7971    
7972      stacksize = 0;      stacksize = 0;
7973      if (ket != OP_KET || bra != OP_BRA)      if (ket != OP_KET || bra != OP_BRA)
# Line 7837  if (has_alternatives) Line 7982  if (has_alternatives)
7982      if (opcode != OP_ONCE)      if (opcode != OP_ONCE)
7983        stacksize++;        stacksize++;
7984    
7985      if (stacksize > 0) {      if (stacksize > 0)
7986          {
7987        if (opcode != OP_ONCE || CURRENT_AS(bracket_backtrack)->u.framesize >= 0)        if (opcode != OP_ONCE || CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
7988          allocate_stack(common, stacksize);          allocate_stack(common, stacksize);
7989        else        else
# Line 7846  if (has_alternatives) Line 7992  if (has_alternatives)
7992          SLJIT_ASSERT(stacksize == 1);          SLJIT_ASSERT(stacksize == 1);
7993          OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));          OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
7994          }          }
7995      }        }
7996    
7997      stacksize = 0;      stacksize = 0;
7998      if (ket != OP_KET || bra != OP_BRA)      if (ket != OP_KET || bra != OP_BRA)
# Line 7859  if (has_alternatives) Line 8005  if (has_alternatives)
8005        }        }
8006    
8007      if (offset != 0)      if (offset != 0)
8008        {        stacksize = match_capture_common(common, stacksize, offset, private_data_ptr);
       if (common->capture_last_ptr != 0)  
         {  
         OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);  
         OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, offset >> 1);  
         OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);  
         stacksize++;  
         }  
       if (common->optimized_cbracket[offset >> 1] == 0)  
         {  
         OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));  
         OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));  
         OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);  
         OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);  
         OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);  
         OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);  
         OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);  
         stacksize += 2;  
         }  
       }  
8009    
8010      if (opcode != OP_ONCE)      if (opcode != OP_ONCE)
8011        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, count++);        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, count++);
# Line 7951  else if (opcode == OP_SBRA || opcode == Line 8078  else if (opcode == OP_SBRA || opcode ==
8078  else if (opcode == OP_ONCE)  else if (opcode == OP_ONCE)
8079    {    {
8080    cc = ccbegin + GET(ccbegin, 1);    cc = ccbegin + GET(ccbegin, 1);
8081      stacksize = needs_control_head ? 1 : 0;
8082    
8083    if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)    if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
8084      {      {
8085      /* Reset head and drop saved frame. */      /* Reset head and drop saved frame. */
8086      stacksize = (ket == OP_KETRMAX || ket == OP_KETRMIN || *cc == OP_ALT) ? 2 : 1;      stacksize += CURRENT_AS(bracket_backtrack)->u.framesize + ((ket != OP_KET || *cc == OP_ALT) ? 2 : 1);
     free_stack(common, CURRENT_AS(bracket_backtrack)->u.framesize + stacksize);  
8087      }      }
8088    else if (ket == OP_KETRMAX || (*cc == OP_ALT && ket != OP_KETRMIN))    else if (ket == OP_KETRMAX || (*cc == OP_ALT && ket != OP_KETRMIN))
8089      {      {
8090      /* The STR_PTR must be released. */      /* The STR_PTR must be released. */
8091      free_stack(common, 1);      stacksize++;
8092      }      }
8093      free_stack(common, stacksize);
8094    
8095    JUMPHERE(once);    JUMPHERE(once);
8096    /* Restore previous private_data_ptr */    /* Restore previous private_data_ptr */
# Line 8212  while (current) Line 8341  while (current)
8341      break;      break;
8342    
8343      case OP_MARK:      case OP_MARK:
8344      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(common->has_skip_arg ? 4 : 0));
8345      free_stack(common, 1);      if (common->has_skip_arg)
8346          OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
8347        free_stack(common, common->has_skip_arg ? 5 : 1);
8348      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP1, 0);      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP1, 0);
8349        if (common->has_skip_arg)
8350          OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP2, 0);
8351      break;      break;
8352    
8353      case OP_PRUNE:      case OP_PRUNE:
# Line 8225  while (current) Line 8358  while (current)
8358        SLJIT_ASSERT(common->control_head_ptr != 0);        SLJIT_ASSERT(common->control_head_ptr != 0);
8359        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
8360        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);
8361        sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_check_control_chain));        sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_check_control_chain));
8362        OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);        OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
8363    
8364        OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);        OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
# Line 8241  while (current) Line 8374  while (current)
8374        JUMPTO(SLJIT_JUMP, common->quit_label);        JUMPTO(SLJIT_JUMP, common->quit_label);
8375      break;      break;
8376    
8377        case OP_SKIP_ARG:
8378        if (!common->local_exit)
8379          {
8380          SLJIT_ASSERT(common->control_head_ptr != 0);
8381          OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
8382          OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);
8383          sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_check_control_chain));
8384          OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
8385    
8386          OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
8387          add_jump(compiler, &common->reset_match, CMP(SLJIT_C_LESS, STR_PTR, 0, SLJIT_IMM, -2));
8388    
8389          /* May not find suitable mark. */
8390          OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_NOMATCH);
8391          if (common->quit_label == NULL)
8392            add_jump(compiler, &common->quit, CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, -1));
8393          else
8394            CMPTO(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, -1, common->quit_label);
8395    
8396          OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
8397          free_stack(common, 3);
8398          OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP1, 0);
8399          }
8400        else
8401          {
8402          /* In recurse or accept. */
8403          if (common->quit_label == NULL)
8404            add_jump(compiler, &common->quit, JUMP(SLJIT_JUMP));
8405          else
8406            JUMPTO(SLJIT_JUMP, common->quit_label);
8407          }
8408        break;
8409    
8410      case OP_COMMIT:      case OP_COMMIT:
8411      if (!common->local_exit)      if (!common->local_exit)
8412        OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_NOMATCH);        OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_NOMATCH);
# Line 8271  DEFINE_COMPILER; Line 8437  DEFINE_COMPILER;
8437  pcre_uchar *cc = common->start + common->currententry->start;  pcre_uchar *cc = common->start + common->currententry->start;
8438  pcre_uchar *ccbegin = cc + 1 + LINK_SIZE + (*cc == OP_BRA ? 0 : IMM2_SIZE);  pcre_uchar *ccbegin = cc + 1 + LINK_SIZE + (*cc == OP_BRA ? 0 : IMM2_SIZE);
8439  pcre_uchar *ccend = bracketend(cc);  pcre_uchar *ccend = bracketend(cc);
8440  int private_data_size = get_private_data_length_for_copy(common, ccbegin, ccend);  BOOL needs_control_head;
8441  int framesize = get_framesize(common, cc, TRUE);  int framesize = get_framesize(common, cc, TRUE, &needs_control_head);
8442    int private_data_size = get_private_data_copy_length(common, ccbegin, ccend, needs_control_head);
8443  int alternativesize;  int alternativesize;
8444  BOOL needs_frame;  BOOL needs_frame;
8445  backtrack_common altbacktrack;  backtrack_common altbacktrack;
# Line 8291  set_jumps(common->currententry->calls, c Line 8458  set_jumps(common->currententry->calls, c
8458  sljit_emit_fast_enter(compiler, TMP2, 0);  sljit_emit_fast_enter(compiler, TMP2, 0);
8459  allocate_stack(common, private_data_size + framesize + alternativesize);  allocate_stack(common, private_data_size + framesize + alternativesize);
8460  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(private_data_size + framesize + alternativesize - 1), TMP2, 0);  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(private_data_size + framesize + alternativesize - 1), TMP2, 0);
8461  copy_private_data(common, ccbegin, ccend, TRUE, private_data_size + framesize + alternativesize, framesize + alternativesize);  copy_private_data(common, ccbegin, ccend, TRUE, private_data_size + framesize + alternativesize, framesize + alternativesize, needs_control_head);
8462  if (common->control_head_ptr != 0)  if (needs_control_head)
8463    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
8464  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr, STACK_TOP, 0);  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr, STACK_TOP, 0);
8465  if (needs_frame)  if (needs_frame)
# Line 8366  OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 1); Line 8533  OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 1);
8533  JUMPHERE(jump);  JUMPHERE(jump);
8534  if (common->quit != NULL)  if (common->quit != NULL)
8535    set_jumps(common->quit, LABEL());    set_jumps(common->quit, LABEL());
8536  copy_private_data(common, ccbegin, ccend, FALSE, private_data_size + framesize + alternativesize, framesize + alternativesize);  copy_private_data(common, ccbegin, ccend, FALSE, private_data_size + framesize + alternativesize, framesize + alternativesize, needs_control_head);
8537  free_stack(common, private_data_size + framesize + alternativesize);  free_stack(common, private_data_size + framesize + alternativesize);
8538  if (common->control_head_ptr != 0)  if (needs_control_head)
8539    {    {
8540    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), 2 * sizeof(sljit_sw));    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), 2 * sizeof(sljit_sw));
8541    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), sizeof(sljit_sw));    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), sizeof(sljit_sw));

Legend:
Removed from v.1275  
changed lines
  Added in v.1278

  ViewVC Help
Powered by ViewVC 1.1.5