[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

msaboff at apple.com msaboff at apple.com
Wed Dec 22 13:42:57 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 834cd1cab214c4297824b2d06ccafe2b72e2df94
Author: msaboff at apple.com <msaboff at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 23 22:23:19 2010 +0000

    2010-09-23  Michael Saboff  <msaboff at apple.com>
    
            Reviewed by Geoffrey Garen.
    
            Removed extraneous truncation of ovector on entry and error exit.
            Changed the initialization to -1 of vector to only initialize
            the start indecies, which is sufficient for the pattern/subpatterns.
            Changed the JIT code to not clear the end index for subpatterns
            as it isn't needed.  These changes are worth ~2.7% on v8-regexp.
            https://bugs.webkit.org/show_bug.cgi?id=46404
    
            * runtime/RegExp.cpp:
            (JSC::RegExp::match):
            * yarr/RegexJIT.cpp:
            (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68207 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 64f6f97..8c729c8 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-23  Michael Saboff  <msaboff at apple.com>
+
+        Reviewed by Geoffrey Garen.
+
+        Removed extraneous truncation of ovector on entry and error exit.
+        Changed the initialization to -1 of vector to only initialize
+        the start indecies, which is sufficient for the pattern/subpatterns.
+        Changed the JIT code to not clear the end index for subpatterns
+        as it isn't needed.  These changes are worth ~2.7% on v8-regexp.
+        https://bugs.webkit.org/show_bug.cgi?id=46404
+
+        * runtime/RegExp.cpp:
+        (JSC::RegExp::match):
+        * yarr/RegexJIT.cpp:
+        (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
+
 2010-09-22  Oliver Hunt  <oliver at apple.com>
 
         Reviewed by Geoff Garen.
diff --git a/JavaScriptCore/runtime/RegExp.cpp b/JavaScriptCore/runtime/RegExp.cpp
index d4545cb..485401a 100644
--- a/JavaScriptCore/runtime/RegExp.cpp
+++ b/JavaScriptCore/runtime/RegExp.cpp
@@ -115,8 +115,6 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
 {
     if (startOffset < 0)
         startOffset = 0;
-    if (ovector)
-        ovector->resize(0);
     
 #if ENABLE(REGEXP_TRACING)
     m_rtMatchCallCount++;
@@ -142,7 +140,10 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
         }
 
         ASSERT(offsetVector);
-        for (int j = 0; j < offsetVectorSize; ++j)
+        // Initialize offsetVector with the return value (index 0) and the 
+        // first subpattern start indicies (even index values) set to -1.
+        // No need to init the subpattern end indicies.
+        for (unsigned j = 0, i = 0; i < m_numSubpatterns + 1; j += 2, i++)            
             offsetVector[j] = -1;
 
 #if ENABLE(YARR_JIT)
@@ -157,8 +158,6 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
             if (result != -1)
                 fprintf(stderr, "jsRegExpExecute failed with result %d\n", result);
 #endif
-            if (ovector)
-                ovector->clear();
         }
         
 #if ENABLE(REGEXP_TRACING)
diff --git a/JavaScriptCore/yarr/RegexJIT.cpp b/JavaScriptCore/yarr/RegexJIT.cpp
index 0ca6281..1b80464 100644
--- a/JavaScriptCore/yarr/RegexJIT.cpp
+++ b/JavaScriptCore/yarr/RegexJIT.cpp
@@ -986,10 +986,8 @@ class RegexGenerator : private MacroAssembler {
             parenthesesState.plantJumpToBacktrackIfExists(this);
             // A failure WITHIN the parens jumps here
             parenthesesState.linkAlternativeBacktracks(this);
-            if (term.invertOrCapture) {
+            if (term.invertOrCapture)
                 store32(Imm32(-1), Address(output, (term.parentheses.subpatternId << 1) * sizeof(int)));
-                store32(Imm32(-1), Address(output, ((term.parentheses.subpatternId << 1) + 1) * sizeof(int)));
-            }
 
             if (term.quantityType == QuantifierGreedy)
                 storeToFrame(Imm32(0), parenthesesFrameLocation);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list