/[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 955 by zherczeg, Tue Apr 3 15:32:36 2012 UTC revision 958 by zherczeg, Wed Apr 11 10:19:10 2012 UTC
# Line 6903  if (localsize < 0) Line 6903  if (localsize < 0)
6903    return;    return;
6904    
6905  /* Checking flags and updating ovector_start. */  /* Checking flags and updating ovector_start. */
6906  if (mode == JIT_COMPILE && (re->flags & PCRE_REQCHSET) != 0)  if (mode == JIT_COMPILE && (re->flags & PCRE_REQCHSET) != 0 && (re->options & PCRE_NO_START_OPTIMIZE) == 0)
6907    {    {
6908    common->req_char_ptr = common->ovector_start;    common->req_char_ptr = common->ovector_start;
6909    common->ovector_start += sizeof(sljit_w);    common->ovector_start += sizeof(sljit_w);
# Line 6952  sljit_emit_enter(compiler, 1, 5, 5, loca Line 6952  sljit_emit_enter(compiler, 1, 5, 5, loca
6952    
6953  /* Register init. */  /* Register init. */
6954  reset_ovector(common, (re->top_bracket + 1) * 2);  reset_ovector(common, (re->top_bracket + 1) * 2);
6955  if (mode == JIT_COMPILE && (re->flags & PCRE_REQCHSET) != 0)  if (common->req_char_ptr != 0)
6956    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->req_char_ptr, SLJIT_TEMPORARY_REG1, 0);    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->req_char_ptr, SLJIT_TEMPORARY_REG1, 0);
6957    
6958  OP1(SLJIT_MOV, ARGUMENTS, 0, SLJIT_SAVED_REG1, 0);  OP1(SLJIT_MOV, ARGUMENTS, 0, SLJIT_SAVED_REG1, 0);
# Line 6973  if ((re->options & PCRE_ANCHORED) == 0) Line 6973  if ((re->options & PCRE_ANCHORED) == 0)
6973    {    {
6974    mainloop = mainloop_entry(common, (re->flags & PCRE_HASCRORLF) != 0, (re->options & PCRE_FIRSTLINE) != 0);    mainloop = mainloop_entry(common, (re->flags & PCRE_HASCRORLF) != 0, (re->options & PCRE_FIRSTLINE) != 0);
6975    /* Forward search if possible. */    /* Forward search if possible. */
6976    if ((re->flags & PCRE_FIRSTSET) != 0)    if ((re->options & PCRE_NO_START_OPTIMIZE) == 0)
6977      fast_forward_first_char(common, (pcre_uchar)re->first_char, (re->flags & PCRE_FCH_CASELESS) != 0, (re->options & PCRE_FIRSTLINE) != 0);      {
6978    else if ((re->flags & PCRE_STARTLINE) != 0)      if ((re->flags & PCRE_FIRSTSET) != 0)
6979      fast_forward_newline(common, (re->options & PCRE_FIRSTLINE) != 0);        fast_forward_first_char(common, (pcre_uchar)re->first_char, (re->flags & PCRE_FCH_CASELESS) != 0, (re->options & PCRE_FIRSTLINE) != 0);
6980    else if ((re->flags & PCRE_STARTLINE) == 0 && study != NULL && (study->flags & PCRE_STUDY_MAPPED) != 0)      else if ((re->flags & PCRE_STARTLINE) != 0)
6981      fast_forward_start_bits(common, (sljit_uw)study->start_bits, (re->options & PCRE_FIRSTLINE) != 0);        fast_forward_newline(common, (re->options & PCRE_FIRSTLINE) != 0);
6982        else if ((re->flags & PCRE_STARTLINE) == 0 && study != NULL && (study->flags & PCRE_STUDY_MAPPED) != 0)
6983          fast_forward_start_bits(common, (sljit_uw)study->start_bits, (re->options & PCRE_FIRSTLINE) != 0);
6984        }
6985    }    }
6986  if (mode == JIT_COMPILE && (re->flags & PCRE_REQCHSET) != 0)  if (common->req_char_ptr != 0)
6987    reqbyte_notfound = search_requested_char(common, (pcre_uchar)re->req_char, (re->flags & PCRE_RCH_CASELESS) != 0, (re->flags & PCRE_FIRSTSET) != 0);    reqbyte_notfound = search_requested_char(common, (pcre_uchar)re->req_char, (re->flags & PCRE_RCH_CASELESS) != 0, (re->flags & PCRE_FIRSTSET) != 0);
6988    
6989  /* Store the current STR_PTR in OVECTOR(0). */  /* Store the current STR_PTR in OVECTOR(0). */
# Line 7056  if ((re->options & PCRE_ANCHORED) == 0) Line 7059  if ((re->options & PCRE_ANCHORED) == 0)
7059    {    {
7060    if ((re->options & PCRE_FIRSTLINE) == 0)    if ((re->options & PCRE_FIRSTLINE) == 0)
7061      {      {
7062      if (mode == JIT_COMPILE && study != NULL && study->minlength > 1)      if (mode == JIT_COMPILE && study != NULL && study->minlength > 1 && (re->options & PCRE_NO_START_OPTIMIZE) == 0)
7063        {        {
7064        OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(study->minlength + 1));        OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(study->minlength + 1));
7065        CMPTO(SLJIT_C_LESS_EQUAL, TMP1, 0, STR_END, 0, mainloop);        CMPTO(SLJIT_C_LESS_EQUAL, TMP1, 0, STR_END, 0, mainloop);
# Line 7067  if ((re->options & PCRE_ANCHORED) == 0) Line 7070  if ((re->options & PCRE_ANCHORED) == 0)
7070    else    else
7071      {      {
7072      SLJIT_ASSERT(common->first_line_end != 0);      SLJIT_ASSERT(common->first_line_end != 0);
7073      if (mode == JIT_COMPILE && study != NULL && study->minlength > 1)      if (mode == JIT_COMPILE && study != NULL && study->minlength > 1 && (re->options & PCRE_NO_START_OPTIMIZE) == 0)
7074        {        {
7075        OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(study->minlength + 1));        OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(study->minlength + 1));
7076        OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, STR_END, 0);        OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, STR_END, 0);

Legend:
Removed from v.955  
changed lines
  Added in v.958

  ViewVC Help
Powered by ViewVC 1.1.5