Changeset 34386 in webkit for trunk/JavaScriptCore/pcre


Ignore:
Timestamp:
Jun 5, 2008, 3:40:23 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-05 Geoffrey Garen <[email protected]>

Reviewed by Stephanie Lewis (or maybe the other way around).


Minor change to PCRE to help out certain compilers.


SunSpider reports no change, maybe a small speedup.

  • pcre/pcre_exec.cpp: (match): Use instructionPtr++ a little less, to avoid confusing the optimizer.
File:
1 edited

Legend:

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

    r31454 r34386  
    12431243                if (stack.currentFrame->args.subjectPtr >= md.endSubject)
    12441244                    RRETURN_NO_MATCH;
    1245                 stack.currentFrame->args.instructionPtr++;
     1245                int b = stack.currentFrame->args.instructionPtr[1];
    12461246                int c = *stack.currentFrame->args.subjectPtr++;
     1247                stack.currentFrame->args.instructionPtr += 2;
    12471248                if (md.ignoreCase) {
    12481249                    if (c < 128)
    12491250                        c = toLowerCase(c);
    1250                     if (toLowerCase(*stack.currentFrame->args.instructionPtr++) == c)
     1251                    if (toLowerCase(b) == c)
    12511252                        RRETURN_NO_MATCH;
    12521253                } else {
    1253                     if (*stack.currentFrame->args.instructionPtr++ == c)
     1254                    if (b == c)
    12541255                        RRETURN_NO_MATCH;
    12551256                }
Note: See TracChangeset for help on using the changeset viewer.