[Pcre-svn] [1010] code/trunk/pcre_jit_compile.c: Final touch…

Góra strony
Delete this message
Autor: Subversion repository
Data:  
Dla: pcre-svn
Temat: [Pcre-svn] [1010] code/trunk/pcre_jit_compile.c: Final touches on capturing bracket optimization.
Revision: 1010
          http://vcs.pcre.org/viewvc?view=rev&revision=1010
Author:   zherczeg
Date:     2012-08-23 09:05:11 +0100 (Thu, 23 Aug 2012)


Log Message:
-----------
Final touches on capturing bracket optimization. (Recursion doesn't affect it)

Modified Paths:
--------------
    code/trunk/pcre_jit_compile.c


Modified: code/trunk/pcre_jit_compile.c
===================================================================
--- code/trunk/pcre_jit_compile.c    2012-08-22 12:01:22 UTC (rev 1009)
+++ code/trunk/pcre_jit_compile.c    2012-08-23 08:05:11 UTC (rev 1010)
@@ -900,9 +900,6 @@
 #endif


     case OP_RECURSE:
-    alternative = common->start + GET(cc, 1);
-    if (alternative != common->start)
-      common->optimized_cbracket[GET2(alternative, 1 + LINK_SIZE)] = 0;
     /* Set its value only once. */
     if (common->recursive_head == 0)
       {
@@ -1304,7 +1301,6 @@


     case OP_CBRAPOS:
     case OP_SCBRAPOS:
-    SLJIT_ASSERT(common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0);
     private_data_length += 2;
     cc += 1 + LINK_SIZE + IMM2_SIZE;
     break;
@@ -5937,6 +5933,9 @@
   case OP_CBRAPOS:
   case OP_SCBRAPOS:
   offset = GET2(cc, 1 + LINK_SIZE);
+  /* This case cannot be optimized in the same was as
+  normal capturing brackets. */
+  SLJIT_ASSERT(common->optimized_cbracket[offset] == 0);
   cbraprivptr = OVECTOR_PRIV(offset);
   offset <<= 1;
   ccbegin = cc + 1 + LINK_SIZE + IMM2_SIZE;