/[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 736 by zherczeg, Sun Oct 16 15:48:03 2011 UTC revision 752 by zherczeg, Sat Nov 19 15:28:29 2011 UTC
# Line 52  POSSIBILITY OF SUCH DAMAGE. Line 52  POSSIBILITY OF SUCH DAMAGE.
52  we just include it. This way we don't need to touch the build  we just include it. This way we don't need to touch the build
53  system files. */  system files. */
54    
55    #define SLJIT_MALLOC(size) (pcre_malloc)(size)
56    #define SLJIT_FREE(ptr) (pcre_free)(ptr)
57  #define SLJIT_CONFIG_AUTO 1  #define SLJIT_CONFIG_AUTO 1
58    #define SLJIT_CONFIG_STATIC 1
59  #define SLJIT_VERBOSE 0  #define SLJIT_VERBOSE 0
60  #define SLJIT_DEBUG 0  #define SLJIT_DEBUG 0
61    
# Line 276  typedef struct compiler_common { Line 279  typedef struct compiler_common {
279    int bsr_nltype;    int bsr_nltype;
280    int endonly;    int endonly;
281    sljit_w ctypes;    sljit_w ctypes;
282      sljit_uw name_table;
283      sljit_w name_count;
284      sljit_w name_entry_size;
285    struct sljit_label *acceptlabel;    struct sljit_label *acceptlabel;
286    stub_list *stubs;    stub_list *stubs;
287    recurse_entry *entries;    recurse_entry *entries;
# Line 551  switch(*cc) Line 557  switch(*cc)
557    case OP_REF:    case OP_REF:
558    case OP_REFI:    case OP_REFI:
559    case OP_CREF:    case OP_CREF:
560      case OP_NCREF:
561      case OP_RREF:
562      case OP_NRREF:
563    case OP_CLOSE:    case OP_CLOSE:
564    cc += 3;    cc += 3;
565    return cc;    return cc;
# Line 1979  struct sljit_jump *beginend; Line 1988  struct sljit_jump *beginend;
1988  struct sljit_jump *jump;  struct sljit_jump *jump;
1989  #endif  #endif
1990    
1991  SLJIT_ASSERT(ctype_word == 0x10);  SLJIT_COMPILE_ASSERT(ctype_word == 0x10, ctype_word_must_be_16);
1992    
1993  sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, 1, 5, 5, common->localsize);  sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, 1, 5, 5, common->localsize);
1994  /* Get type of the previous char, and put it to LOCALS1. */  /* Get type of the previous char, and put it to LOCALS1. */
# Line 3794  common->accept = save_accept; Line 3803  common->accept = save_accept;
3803  return cc + 1 + LINK_SIZE;  return cc + 1 + LINK_SIZE;
3804  }  }
3805    
3806    static sljit_w SLJIT_CALL do_searchovector(sljit_w refno, sljit_w* locals, uschar *name_table)
3807    {
3808    int condition = FALSE;
3809    uschar *slotA = name_table;
3810    uschar *slotB;
3811    sljit_w name_count = locals[LOCALS0 / sizeof(sljit_w)];
3812    sljit_w name_entry_size = locals[LOCALS1 / sizeof(sljit_w)];
3813    sljit_w no_capture;
3814    int i;
3815    
3816    locals += OVECTOR_START / sizeof(sljit_w);
3817    no_capture = locals[1];
3818    
3819    for (i = 0; i < name_count; i++)
3820      {
3821      if (GET2(slotA, 0) == refno) break;
3822      slotA += name_entry_size;
3823      }
3824    
3825    if (i < name_count)
3826      {
3827      /* Found a name for the number - there can be only one; duplicate names
3828      for different numbers are allowed, but not vice versa. First scan down
3829      for duplicates. */
3830    
3831      slotB = slotA;
3832      while (slotB > name_table)
3833        {
3834        slotB -= name_entry_size;
3835        if (strcmp((char *)slotA + 2, (char *)slotB + 2) == 0)
3836          {
3837          condition = locals[GET2(slotB, 0) << 1] != no_capture;
3838          if (condition) break;
3839          }
3840        else break;
3841        }
3842    
3843      /* Scan up for duplicates */
3844      if (!condition)
3845        {
3846        slotB = slotA;
3847        for (i++; i < name_count; i++)
3848          {
3849          slotB += name_entry_size;
3850          if (strcmp((char *)slotA + 2, (char *)slotB + 2) == 0)
3851            {
3852            condition = locals[GET2(slotB, 0) << 1] != no_capture;
3853            if (condition) break;
3854            }
3855          else break;
3856          }
3857        }
3858      }
3859    return condition;
3860    }
3861    
3862    static sljit_w SLJIT_CALL do_searchgroups(sljit_w recno, sljit_w* locals, uschar *name_table)
3863    {
3864    int condition = FALSE;
3865    uschar *slotA = name_table;
3866    uschar *slotB;
3867    sljit_w name_count = locals[LOCALS0 / sizeof(sljit_w)];
3868    sljit_w name_entry_size = locals[LOCALS1 / sizeof(sljit_w)];
3869    sljit_w group_num = locals[POSSESSIVE0 / sizeof(sljit_w)];
3870    int i;
3871    
3872    for (i = 0; i < name_count; i++)
3873      {
3874      if (GET2(slotA, 0) == recno) break;
3875      slotA += name_entry_size;
3876      }
3877    
3878    if (i < name_count)
3879      {
3880      /* Found a name for the number - there can be only one; duplicate
3881      names for different numbers are allowed, but not vice versa. First
3882      scan down for duplicates. */
3883    
3884      slotB = slotA;
3885      while (slotB > name_table)
3886        {
3887        slotB -= name_entry_size;
3888        if (strcmp((char *)slotA + 2, (char *)slotB + 2) == 0)
3889          {
3890          condition = GET2(slotB, 0) == group_num;
3891          if (condition) break;
3892          }
3893        else break;
3894        }
3895    
3896      /* Scan up for duplicates */
3897      if (!condition)
3898        {
3899        slotB = slotA;
3900        for (i++; i < name_count; i++)
3901          {
3902          slotB += name_entry_size;
3903          if (strcmp((char *)slotA + 2, (char *)slotB + 2) == 0)
3904            {
3905            condition = GET2(slotB, 0) == group_num;
3906            if (condition) break;
3907            }
3908          else break;
3909          }
3910        }
3911      }
3912    return condition;
3913    }
3914    
3915  /*  /*
3916    Handling bracketed expressions is probably the most complex part.    Handling bracketed expressions is probably the most complex part.
3917    
# Line 3878  if (*cc == OP_BRAZERO || *cc == OP_BRAMI Line 3996  if (*cc == OP_BRAZERO || *cc == OP_BRAMI
3996    
3997  opcode = *cc;  opcode = *cc;
3998  ccbegin = cc;  ccbegin = cc;
3999    hotpath = ccbegin + 1 + LINK_SIZE;
4000    
4001  if ((opcode == OP_COND || opcode == OP_SCOND) && cc[1 + LINK_SIZE] == OP_DEF)  if ((opcode == OP_COND || opcode == OP_SCOND) && cc[1 + LINK_SIZE] == OP_DEF)
4002    {    {
4003    /* Drop this bracket_fallback. */    /* Drop this bracket_fallback. */
# Line 3889  ket = *(bracketend(cc) - 1 - LINK_SIZE); Line 4009  ket = *(bracketend(cc) - 1 - LINK_SIZE);
4009  SLJIT_ASSERT(ket == OP_KET || ket == OP_KETRMAX || ket == OP_KETRMIN);  SLJIT_ASSERT(ket == OP_KET || ket == OP_KETRMAX || ket == OP_KETRMIN);
4010  SLJIT_ASSERT(!((bra == OP_BRAZERO && ket == OP_KETRMIN) || (bra == OP_BRAMINZERO && ket == OP_KETRMAX)));  SLJIT_ASSERT(!((bra == OP_BRAZERO && ket == OP_KETRMIN) || (bra == OP_BRAMINZERO && ket == OP_KETRMAX)));
4011  cc += GET(cc, 1);  cc += GET(cc, 1);
4012  has_alternatives = *cc == OP_ALT || opcode == OP_COND || opcode == OP_SCOND;  
4013    has_alternatives = *cc == OP_ALT;
4014    if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
4015      {
4016      has_alternatives = (*hotpath == OP_RREF) ? FALSE : TRUE;
4017      if (*hotpath == OP_NRREF)
4018        {
4019        stacksize = GET2(hotpath, 1);
4020        if (common->currententry == NULL || stacksize == RREF_ANY)
4021          has_alternatives = FALSE;
4022        else if (common->currententry->start == 0)
4023          has_alternatives = stacksize != 0;
4024        else
4025          has_alternatives = stacksize != GET2(common->start, common->currententry->start + 1 + LINK_SIZE);
4026        }
4027      }
4028    
4029  if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN))  if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN))
4030    opcode = OP_SCOND;    opcode = OP_SCOND;
4031  if (SLJIT_UNLIKELY(opcode == OP_ONCE_NC))  if (SLJIT_UNLIKELY(opcode == OP_ONCE_NC))
# Line 3902  if (opcode == OP_CBRA || opcode == OP_SC Line 4038  if (opcode == OP_CBRA || opcode == OP_SC
4038    localptr = OVECTOR_PRIV(offset);    localptr = OVECTOR_PRIV(offset);
4039    offset <<= 1;    offset <<= 1;
4040    FALLBACK_AS(bracket_fallback)->localptr = localptr;    FALLBACK_AS(bracket_fallback)->localptr = localptr;
4041      hotpath += 2;
4042    }    }
4043  else if (opcode == OP_ONCE || opcode == OP_SBRA || opcode == OP_SCOND)  else if (opcode == OP_ONCE || opcode == OP_SBRA || opcode == OP_SCOND)
4044    {    {
# Line 4058  else if (has_alternatives) Line 4195  else if (has_alternatives)
4195    }    }
4196    
4197  /* Generating code for the first alternative. */  /* Generating code for the first alternative. */
 hotpath = ccbegin + 1 + LINK_SIZE;  
 if (offset != 0)  
   hotpath += 2;  
4198  if (opcode == OP_COND || opcode == OP_SCOND)  if (opcode == OP_COND || opcode == OP_SCOND)
4199    {    {
4200    if (*hotpath == OP_CREF)    if (*hotpath == OP_CREF)
4201      {      {
4202        SLJIT_ASSERT(has_alternatives);
4203      add_jump(compiler, &(FALLBACK_AS(bracket_fallback)->u.condfailed),      add_jump(compiler, &(FALLBACK_AS(bracket_fallback)->u.condfailed),
4204        CMP(SLJIT_C_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR((GET2(hotpath, 1) << 1)), SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)));        CMP(SLJIT_C_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(GET2(hotpath, 1) << 1), SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)));
4205      hotpath += 3;      hotpath += 3;
4206      }      }
4207      else if (*hotpath == OP_NCREF)
4208        {
4209        SLJIT_ASSERT(has_alternatives);
4210        stacksize = GET2(hotpath, 1);
4211        jump = CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(stacksize << 1), SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1));
4212    
4213        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, STACK_TOP, 0);
4214        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, SLJIT_IMM, common->name_count);
4215        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, SLJIT_IMM, common->name_entry_size);
4216        OP1(SLJIT_MOV, SLJIT_TEMPORARY_REG1, 0, SLJIT_IMM, stacksize);
4217        OP1(SLJIT_MOV, SLJIT_TEMPORARY_REG2, 0, SLJIT_LOCALS_REG, 0);
4218        OP1(SLJIT_MOV, SLJIT_TEMPORARY_REG3, 0, SLJIT_IMM, common->name_table);
4219        sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_searchovector));
4220        OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1);
4221        add_jump(compiler, &(FALLBACK_AS(bracket_fallback)->u.condfailed), CMP(SLJIT_C_EQUAL, SLJIT_TEMPORARY_REG1, 0, SLJIT_IMM, 0));
4222    
4223        JUMPHERE(jump);
4224        hotpath += 3;
4225        }
4226      else if (*hotpath == OP_RREF || *hotpath == OP_NRREF)
4227        {
4228        /* Never has other case. */
4229        FALLBACK_AS(bracket_fallback)->u.condfailed = NULL;
4230    
4231        stacksize = GET2(hotpath, 1);
4232        if (common->currententry == NULL)
4233          stacksize = 0;
4234        else if (stacksize == RREF_ANY)
4235          stacksize = 1;
4236        else if (common->currententry->start == 0)
4237          stacksize = stacksize == 0;
4238        else
4239          stacksize = stacksize == GET2(common->start, common->currententry->start + 1 + LINK_SIZE);
4240    
4241        if (*hotpath == OP_RREF || stacksize || common->currententry == NULL)
4242          {
4243          SLJIT_ASSERT(!has_alternatives);
4244          if (stacksize != 0)
4245            hotpath += 3;
4246          else
4247            {
4248            if (*cc == OP_ALT)
4249              {
4250              hotpath = cc + 1 + LINK_SIZE;
4251              cc += GET(cc, 1);
4252              }
4253            else
4254              hotpath = cc;
4255            }
4256          }
4257        else
4258          {
4259          SLJIT_ASSERT(has_alternatives);
4260    
4261          stacksize = GET2(hotpath, 1);
4262          OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, STACK_TOP, 0);
4263          OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, SLJIT_IMM, common->name_count);
4264          OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, SLJIT_IMM, common->name_entry_size);
4265          OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, SLJIT_IMM, GET2(common->start, common->currententry->start + 1 + LINK_SIZE));
4266          OP1(SLJIT_MOV, SLJIT_TEMPORARY_REG1, 0, SLJIT_IMM, stacksize);
4267          OP1(SLJIT_MOV, SLJIT_TEMPORARY_REG2, 0, SLJIT_LOCALS_REG, 0);
4268          OP1(SLJIT_MOV, SLJIT_TEMPORARY_REG3, 0, SLJIT_IMM, common->name_table);
4269          sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_searchgroups));
4270          OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1);
4271          add_jump(compiler, &(FALLBACK_AS(bracket_fallback)->u.condfailed), CMP(SLJIT_C_EQUAL, SLJIT_TEMPORARY_REG1, 0, SLJIT_IMM, 0));
4272          hotpath += 3;
4273          }
4274        }
4275    else    else
4276      {      {
4277      SLJIT_ASSERT(*hotpath >= OP_ASSERT && *hotpath <= OP_ASSERTBACK_NOT);      SLJIT_ASSERT(has_alternatives && *hotpath >= OP_ASSERT && *hotpath <= OP_ASSERTBACK_NOT);
4278      /* Similar code as PUSH_FALLBACK macro. */      /* Similar code as PUSH_FALLBACK macro. */
4279      assert = sljit_alloc_memory(compiler, sizeof(assert_fallback));      assert = sljit_alloc_memory(compiler, sizeof(assert_fallback));
4280      if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))      if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
# Line 5231  jump_list *jumplistitem = NULL; Line 5434  jump_list *jumplistitem = NULL;
5434  uschar bra = OP_BRA;  uschar bra = OP_BRA;
5435  uschar ket;  uschar ket;
5436  assert_fallback *assert;  assert_fallback *assert;
5437    BOOL has_alternatives;
5438  struct sljit_jump *brazero = NULL;  struct sljit_jump *brazero = NULL;
5439  struct sljit_jump *once = NULL;  struct sljit_jump *once = NULL;
5440  struct sljit_jump *cond = NULL;  struct sljit_jump *cond = NULL;
# Line 5246  opcode = *cc; Line 5450  opcode = *cc;
5450  ccbegin = cc;  ccbegin = cc;
5451  ket = *(bracketend(ccbegin) - 1 - LINK_SIZE);  ket = *(bracketend(ccbegin) - 1 - LINK_SIZE);
5452  cc += GET(cc, 1);  cc += GET(cc, 1);
5453    has_alternatives = *cc == OP_ALT;
5454    if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
5455      has_alternatives = (ccbegin[1 + LINK_SIZE] >= OP_ASSERT && ccbegin[1 + LINK_SIZE] <= OP_ASSERTBACK_NOT) || CURRENT_AS(bracket_fallback)->u.condfailed != NULL;
5456  if (opcode == OP_CBRA || opcode == OP_SCBRA)  if (opcode == OP_CBRA || opcode == OP_SCBRA)
5457    offset = (GET2(ccbegin, 1 + LINK_SIZE)) << 1;    offset = (GET2(ccbegin, 1 + LINK_SIZE)) << 1;
5458  if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN))  if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN))
# Line 5294  else if (bra == OP_BRAZERO) Line 5501  else if (bra == OP_BRAZERO)
5501    brazero = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0);    brazero = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0);
5502    }    }
5503    
5504  if (opcode == OP_ONCE)  if (SLJIT_UNLIKELY(opcode == OP_ONCE))
5505    {    {
5506    if (CURRENT_AS(bracket_fallback)->u.framesize >= 0)    if (CURRENT_AS(bracket_fallback)->u.framesize >= 0)
5507      {      {
# Line 5303  if (opcode == OP_ONCE) Line 5510  if (opcode == OP_ONCE)
5510      }      }
5511    once = JUMP(SLJIT_JUMP);    once = JUMP(SLJIT_JUMP);
5512    }    }
5513    else if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
5514      {
5515      if (has_alternatives)
5516        {
5517        /* Always exactly one alternative. */
5518        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
5519        free_stack(common, 1);
5520    
5521        jumplistitem = sljit_alloc_memory(compiler, sizeof(jump_list));
5522        if (SLJIT_UNLIKELY(!jumplistitem))
5523          return;
5524        jumplist = jumplistitem;
5525        jumplistitem->next = NULL;
5526        jumplistitem->jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 1);
5527        }
5528      }
5529  else if (*cc == OP_ALT)  else if (*cc == OP_ALT)
5530    {    {
5531    /* Build a jump list. Get the last successfully matched branch index. */    /* Build a jump list. Get the last successfully matched branch index. */
# Line 5334  else if (*cc == OP_ALT) Line 5557  else if (*cc == OP_ALT)
5557    
5558    cc = ccbegin + GET(ccbegin, 1);    cc = ccbegin + GET(ccbegin, 1);
5559    }    }
 else if (opcode == OP_COND || opcode == OP_SCOND)  
   {  
   /* Always one. */  
   OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));  
   free_stack(common, 1);  
   
   jumplistitem = sljit_alloc_memory(compiler, sizeof(jump_list));  
   if (SLJIT_UNLIKELY(!jumplistitem))  
     return;  
   jumplist = jumplistitem;  
   jumplistitem->next = NULL;  
   jumplistitem->jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 1);  
   }  
5560    
5561  COMPILE_FALLBACKPATH(current->top);  COMPILE_FALLBACKPATH(current->top);
5562  if (current->topfallbacks)  if (current->topfallbacks)
5563    set_jumps(current->topfallbacks, LABEL());    set_jumps(current->topfallbacks, LABEL());
5564    
5565  if (opcode == OP_COND || opcode == OP_SCOND)  if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
5566    {    {
5567    /* Conditional block always has at most one alternative. */    /* Conditional block always has at most one alternative. */
5568    if (ccbegin[1 + LINK_SIZE] >= OP_ASSERT && ccbegin[1 + LINK_SIZE] <= OP_ASSERTBACK_NOT)    if (ccbegin[1 + LINK_SIZE] >= OP_ASSERT && ccbegin[1 + LINK_SIZE] <= OP_ASSERTBACK_NOT)
5569      {      {
5570        SLJIT_ASSERT(has_alternatives);
5571      assert = CURRENT_AS(bracket_fallback)->u.assert;      assert = CURRENT_AS(bracket_fallback)->u.assert;
5572      if (assert->framesize >= 0 && (ccbegin[1 + LINK_SIZE] == OP_ASSERT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK))      if (assert->framesize >= 0 && (ccbegin[1 + LINK_SIZE] == OP_ASSERT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK))
5573        {        {
# Line 5367  if (opcode == OP_COND || opcode == OP_SC Line 5578  if (opcode == OP_COND || opcode == OP_SC
5578      cond = JUMP(SLJIT_JUMP);      cond = JUMP(SLJIT_JUMP);
5579      set_jumps(CURRENT_AS(bracket_fallback)->u.assert->condfailed, LABEL());      set_jumps(CURRENT_AS(bracket_fallback)->u.assert->condfailed, LABEL());
5580      }      }
5581    else    else if (CURRENT_AS(bracket_fallback)->u.condfailed != NULL)
5582      {      {
5583        SLJIT_ASSERT(has_alternatives);
5584      cond = JUMP(SLJIT_JUMP);      cond = JUMP(SLJIT_JUMP);
5585      set_jumps(CURRENT_AS(bracket_fallback)->u.condfailed, LABEL());      set_jumps(CURRENT_AS(bracket_fallback)->u.condfailed, LABEL());
5586      }      }
5587      else
5588        SLJIT_ASSERT(!has_alternatives);
5589    }    }
5590    
5591  if (*cc == OP_ALT || opcode == OP_COND || opcode == OP_SCOND)  if (has_alternatives)
5592    {    {
5593    count = 1;    count = 1;
5594    do    do
# Line 5880  struct sljit_compiler *compiler; Line 6094  struct sljit_compiler *compiler;
6094  fallback_common rootfallback;  fallback_common rootfallback;
6095  compiler_common common_data;  compiler_common common_data;
6096  compiler_common *common = &common_data;  compiler_common *common = &common_data;
6097  const unsigned char *tables = re->tables;  const uschar *tables = re->tables;
6098  pcre_study_data *study;  pcre_study_data *study;
6099  uschar *ccend;  uschar *ccend;
6100  executable_function *function;  executable_function *function;
# Line 5941  else Line 6155  else
6155    }    }
6156  common->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;  common->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;
6157  common->ctypes = (sljit_w)(tables + ctypes_offset);  common->ctypes = (sljit_w)(tables + ctypes_offset);
6158    common->name_table = (sljit_w)re + re->name_table_offset;
6159    common->name_count = re->name_count;
6160    common->name_entry_size = re->name_entry_size;
6161  common->acceptlabel = NULL;  common->acceptlabel = NULL;
6162  common->stubs = NULL;  common->stubs = NULL;
6163  common->entries = NULL;  common->entries = NULL;

Legend:
Removed from v.736  
changed lines
  Added in v.752

  ViewVC Help
Powered by ViewVC 1.1.5