Ignore:
Timestamp:
Nov 14, 2007, 6:00:15 PM (18 years ago)
Author:
[email protected]
Message:

2007-11-14 Eric Seidel <[email protected]>

Reviewed by Geoff.

Another round of PCRE cleanups: inlines

SunSpider claims that this, combined with my previous PCRE cleanup were a 0.7% speedup, go figure.

  • pcre/pcre_compile.cpp: (jsRegExpCompile):
  • pcre/pcre_exec.cpp: (match): (jsRegExpExecute):
  • pcre/pcre_internal.h: (PUT): (GET): (PUT2): (GET2): (isNewline):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/pcre/pcre_exec.cpp

    r27752 r27805  
    686686
    687687    BEGIN_OPCODE(CIRC):
    688     if (frame->eptr != md->start_subject && (!md->multiline || !IS_NEWLINE(frame->eptr[-1])))
     688    if (frame->eptr != md->start_subject && (!md->multiline || !isNewline(frame->eptr[-1])))
    689689      RRETURN_NO_MATCH;
    690690    frame->ecode++;
     
    694694
    695695    BEGIN_OPCODE(DOLL):
    696     if (frame->eptr < md->end_subject && (!md->multiline || !IS_NEWLINE(*frame->eptr)))
     696    if (frame->eptr < md->end_subject && (!md->multiline || !isNewline(*frame->eptr)))
    697697      RRETURN_NO_MATCH;
    698698    frame->ecode++;
     
    730730
    731731    BEGIN_OPCODE(ANY):
    732     if (frame->eptr < md->end_subject && IS_NEWLINE(*frame->eptr))
     732    if (frame->eptr < md->end_subject && isNewline(*frame->eptr))
    733733      RRETURN_NO_MATCH;
    734734    if (frame->eptr++ >= md->end_subject) RRETURN_NO_MATCH;
     
    15721572        for (i = 1; i <= min; i++)
    15731573          {
    1574           if (frame->eptr >= md->end_subject || IS_NEWLINE(*frame->eptr))
     1574          if (frame->eptr >= md->end_subject || isNewline(*frame->eptr))
    15751575            RRETURN_NO_MATCH;
    15761576          ++frame->eptr;
     
    16651665            {
    16661666            case OP_ANY:
    1667             if (IS_NEWLINE(c)) RRETURN;
     1667            if (isNewline(c)) RRETURN;
    16681668            break;
    16691669
     
    17271727              for (i = min; i < frame->max; i++)
    17281728                {
    1729                 if (frame->eptr >= md->end_subject || IS_NEWLINE(*frame->eptr)) break;
     1729                if (frame->eptr >= md->end_subject || isNewline(*frame->eptr)) break;
    17301730                frame->eptr++;
    17311731                while (frame->eptr < md->end_subject && (*frame->eptr & 0xc0) == 0x80) frame->eptr++;
     
    17411741              for (i = min; i < frame->max; i++)
    17421742                {
    1743                 if (frame->eptr >= md->end_subject || IS_NEWLINE(*frame->eptr)) break;
     1743                if (frame->eptr >= md->end_subject || isNewline(*frame->eptr)) break;
    17441744                frame->eptr++;
    17451745                }
     
    21602160    if (start_match > match_block.start_subject + start_offset)
    21612161      {
    2162       while (start_match < end_subject && !IS_NEWLINE(start_match[-1]))
     2162      while (start_match < end_subject && !isNewline(start_match[-1]))
    21632163        start_match++;
    21642164      }
Note: See TracChangeset for help on using the changeset viewer.