2008-06-05 Geoffrey Garen <ggaren@apple.com>
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jun 2008 22:40:23 +0000 (22:40 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jun 2008 22:40:23 +0000 (22:40 +0000)
        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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34386 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/pcre/pcre_exec.cpp

index 897df5653fef49028aa673b44c18dfecbc0108dd..319ca968d33a5c187b27844c37186acfcaeca15e 100644 (file)
@@ -1,3 +1,15 @@
+2008-06-05  Geoffrey Garen  <ggaren@apple.com>
+
+        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.
+
 2008-06-05  Alexey Proskuryakov  <ap@webkit.org>
 
         Re-landing an independent part of a previously rolled out threading patch.
index 06baa76512c5bc40396b01a9502c66387edc4b0f..bd02fe0a542acb57130f707ec68e870bd279a9a0 100644 (file)
@@ -1242,15 +1242,16 @@ RECURSE:
             BEGIN_OPCODE(NOT): {
                 if (stack.currentFrame->args.subjectPtr >= md.endSubject)
                     RRETURN_NO_MATCH;
-                stack.currentFrame->args.instructionPtr++;
+                int b = stack.currentFrame->args.instructionPtr[1];
                 int c = *stack.currentFrame->args.subjectPtr++;
+                stack.currentFrame->args.instructionPtr += 2;
                 if (md.ignoreCase) {
                     if (c < 128)
                         c = toLowerCase(c);
-                    if (toLowerCase(*stack.currentFrame->args.instructionPtr++) == c)
+                    if (toLowerCase(b) == c)
                         RRETURN_NO_MATCH;
                 } else {
-                    if (*stack.currentFrame->args.instructionPtr++ == c)
+                    if (b == c)
                         RRETURN_NO_MATCH;
                 }
                 NEXT_OPCODE;