/[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 1451 by zherczeg, Mon Jan 13 21:25:53 2014 UTC revision 1452 by zherczeg, Tue Jan 28 16:07:52 2014 UTC
# Line 398  typedef struct compiler_common { Line 398  typedef struct compiler_common {
398    struct sljit_label *quit_label;    struct sljit_label *quit_label;
399    struct sljit_label *forced_quit_label;    struct sljit_label *forced_quit_label;
400    struct sljit_label *accept_label;    struct sljit_label *accept_label;
401      struct sljit_label *ff_newline_shortcut;
402    stub_list *stubs;    stub_list *stubs;
403    label_addr_list *label_addrs;    label_addr_list *label_addrs;
404    recurse_entry *entries;    recurse_entry *entries;
# Line 3871  if (common->nltype == NLTYPE_FIXED && co Line 3872  if (common->nltype == NLTYPE_FIXED && co
3872    JUMPHERE(lastchar);    JUMPHERE(lastchar);
3873    
3874    if (firstline)    if (firstline)
3875      OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0);      OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
3876    return;    return;
3877    }    }
3878    
# Line 3881  firstchar = CMP(SLJIT_C_LESS_EQUAL, STR_ Line 3882  firstchar = CMP(SLJIT_C_LESS_EQUAL, STR_
3882  skip_char_back(common);  skip_char_back(common);
3883    
3884  loop = LABEL();  loop = LABEL();
3885    common->ff_newline_shortcut = loop;
3886    
3887  read_char_range(common, common->nlmin, common->nlmax, TRUE);  read_char_range(common, common->nlmin, common->nlmax, TRUE);
3888  lastchar = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);  lastchar = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
3889  if (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF)  if (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF)
# Line 10133  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SL Line 10136  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SL
10136    
10137  if ((re->options & PCRE_ANCHORED) == 0)  if ((re->options & PCRE_ANCHORED) == 0)
10138    {    {
10139    if ((re->options & PCRE_FIRSTLINE) == 0)    if (common->ff_newline_shortcut != NULL)
10140      CMPTO(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0, mainloop_label);      {
10141        if ((re->options & PCRE_FIRSTLINE) == 0)
10142          CMPTO(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0, common->ff_newline_shortcut);
10143        /* There cannot be more newlines here. */
10144        }
10145    else    else
10146      CMPTO(SLJIT_C_LESS, STR_PTR, 0, TMP1, 0, mainloop_label);      {
10147        if ((re->options & PCRE_FIRSTLINE) == 0)
10148          CMPTO(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0, mainloop_label);
10149        else
10150          CMPTO(SLJIT_C_LESS, STR_PTR, 0, TMP1, 0, mainloop_label);
10151        }
10152    }    }
10153    
10154  /* No more remaining characters. */  /* No more remaining characters. */

Legend:
Removed from v.1451  
changed lines
  Added in v.1452

  ViewVC Help
Powered by ViewVC 1.1.5