2011-02-04 Sheriff Bot <webkit.review.bot@gmail.com>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2011 16:28:13 +0000 (16:28 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2011 16:28:13 +0000 (16:28 +0000)
        Unreviewed, rolling out r77625 and r77626.
        http://trac.webkit.org/changeset/77625
        http://trac.webkit.org/changeset/77626
        https://bugs.webkit.org/show_bug.cgi?id=53765

        It broke Windows builds (Requested by Ossy_ on #webkit).

        * Android.jscbindings.mk:
        * CMakeLists.txt:
        * ForwardingHeaders/pcre/pcre.h: Added.
        * ForwardingHeaders/yarr/Yarr.h: Removed.
        * ForwardingHeaders/yarr/YarrInterpreter.h: Removed.
        * ForwardingHeaders/yarr/YarrPattern.h: Removed.
        * WebCore.gyp/WebCore.gyp:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.vcproj/copyForwardingHeaders.cmd:
        * platform/text/RegularExpression.cpp:
        (WebCore::RegularExpression::Private::regexp):
        (WebCore::RegularExpression::Private::compile):
        (WebCore::RegularExpression::Private::Private):
        (WebCore::RegularExpression::Private::create):
        (WebCore::RegularExpression::Private::~Private):
        (WebCore::RegularExpression::match):

2011-02-04  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r77625 and r77626.
        http://trac.webkit.org/changeset/77625
        http://trac.webkit.org/changeset/77626
        https://bugs.webkit.org/show_bug.cgi?id=53765

        It broke Windows builds (Requested by Ossy_ on #webkit).

        * JavaScriptCore.exp:
        * JavaScriptCore.gyp/JavaScriptCore.gyp:
        * JavaScriptCore.gypi:
        * JavaScriptCore.pro:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * create_regex_tables:
        * runtime/RegExp.cpp:
        * wtf/Platform.h:
        * yarr/Yarr.h:
        * yarr/YarrJIT.cpp:
        * yarr/YarrJIT.h:
        * yarr/YarrParser.h:
        * yarr/YarrPattern.h:
        * yarr/YarrSyntaxChecker.h:
        * yarr/yarr.pri: Removed.

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

28 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.exp
Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp
Source/JavaScriptCore/JavaScriptCore.gypi
Source/JavaScriptCore/JavaScriptCore.pro
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/create_regex_tables
Source/JavaScriptCore/runtime/RegExp.cpp
Source/JavaScriptCore/wtf/Platform.h
Source/JavaScriptCore/yarr/Yarr.h
Source/JavaScriptCore/yarr/YarrJIT.cpp
Source/JavaScriptCore/yarr/YarrJIT.h
Source/JavaScriptCore/yarr/YarrParser.h
Source/JavaScriptCore/yarr/YarrPattern.h
Source/JavaScriptCore/yarr/YarrSyntaxChecker.h
Source/JavaScriptCore/yarr/yarr.pri [deleted file]
Source/WebCore/Android.jscbindings.mk
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/ForwardingHeaders/pcre/pcre.h [new file with mode: 0644]
Source/WebCore/ForwardingHeaders/yarr/Yarr.h [deleted file]
Source/WebCore/ForwardingHeaders/yarr/YarrInterpreter.h [deleted file]
Source/WebCore/ForwardingHeaders/yarr/YarrPattern.h [deleted file]
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.vcproj/copyForwardingHeaders.cmd
Source/WebCore/platform/text/RegularExpression.cpp

index 079b660da1e0a5661ff7ad3b9be44cf4945f3e14..31488194fe35ab7710b13f0073f8979629d85ebd 100644 (file)
@@ -1,3 +1,28 @@
+2011-02-04  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r77625 and r77626.
+        http://trac.webkit.org/changeset/77625
+        http://trac.webkit.org/changeset/77626
+        https://bugs.webkit.org/show_bug.cgi?id=53765
+
+        It broke Windows builds (Requested by Ossy_ on #webkit).
+
+        * JavaScriptCore.exp:
+        * JavaScriptCore.gyp/JavaScriptCore.gyp:
+        * JavaScriptCore.gypi:
+        * JavaScriptCore.pro:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * create_regex_tables:
+        * runtime/RegExp.cpp:
+        * wtf/Platform.h:
+        * yarr/Yarr.h:
+        * yarr/YarrJIT.cpp:
+        * yarr/YarrJIT.h:
+        * yarr/YarrParser.h:
+        * yarr/YarrPattern.h:
+        * yarr/YarrSyntaxChecker.h:
+        * yarr/yarr.pri: Removed.
+
 2011-02-04  Jessie Berlin  <jberlin@apple.com>
 
         Windows build fix. Unreviewed.
index b335a418bf9c0d2bd497834d73c6d8c7771e52d6..2fa16f7b618e977a3789f011382dc21317d98412 100644 (file)
@@ -96,6 +96,9 @@ _WTFReportAssertionFailureWithMessage
 _WTFReportBacktrace
 _WTFReportError
 _WTFReportFatalError
+__Z12jsRegExpFreeP8JSRegExp
+__Z15jsRegExpCompilePKti24JSRegExpIgnoreCaseOption23JSRegExpMultilineOptionPjPPKc
+__Z15jsRegExpExecutePK8JSRegExpPKtiiPii
 __ZN14OpaqueJSString6createERKN3JSC7UStringE
 __ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPN3WTF10StringImplE
 __ZN3JSC10Identifier11addSlowCaseEPNS_9ExecStateEPN3WTF10StringImplE
@@ -222,9 +225,6 @@ __ZN3JSC4Heap7protectENS_7JSValueE
 __ZN3JSC4Heap8allocateEm
 __ZN3JSC4Heap9unprotectENS_7JSValueE
 __ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE
-__ZN3JSC4Yarr11YarrPatternC1ERKNS_7UStringEbbPPKc
-__ZN3JSC4Yarr11byteCompileERNS0_11YarrPatternEPN3WTF20BumpPointerAllocatorE
-__ZN3JSC4Yarr9interpretEPNS0_15BytecodePatternEPKtjjPi
 __ZN3JSC6JSCell11getCallDataERNS_8CallDataE
 __ZN3JSC6JSCell11getJSNumberEv
 __ZN3JSC6JSCell14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
index 08e590b64d724a19880f03fcf21fbe0ce4b60faa..56304fa656a32ed6676d248ad53bf0a156928ad0 100644 (file)
       ],
     },
     {
-      'target_name': 'yarr',
+      'target_name': 'pcre',
       'type': '<(library)',
       'dependencies': [
         'wtf',
       'msvs_guid': '49909552-0B0C-4C14-8CF6-DB8A2ADE0934',
       'actions': [
         {
-          'action_name': 'retgen',
+          'action_name': 'dftables',
           'inputs': [
-            '../create_regex_tables',
+            '../pcre/dftables',
           ],
           'outputs': [
-            '<(INTERMEDIATE_DIR)/RegExpJitTables.h',
+            '<(INTERMEDIATE_DIR)/chartables.c',
           ],
-          'action': ['python', '<@(_inputs)', '<@(_outputs)'],
+          'action': ['perl', '-w', '<@(_inputs)', '<@(_outputs)'],
         },
       ],
       'include_dirs': [
         '<(INTERMEDIATE_DIR)',
-        '../runtime',
       ],
       'sources': [
         '<@(javascriptcore_files)',
         # First exclude everything ...
         ['exclude', '../'],
         # ... Then include what we want.
-        ['include', '../yarr/'],
-        # The Yarr JIT isn't used in WebCore.
-        ['exclude', '../yarr/YarrJIT\\.(h|cpp)$'],
+        ['include', '../pcre/'],
+        # ucptable.cpp is #included by pcre_ucp_searchfunchs.cpp and is not
+        # intended to be compiled directly.
+        ['exclude', '../pcre/ucptable.cpp$'],
       ],
       'export_dependent_settings': [
         'wtf',
index 06e90f026b5f24c8d618373120986e825ced6393..85a413c05df7c69069bd8295192382da1b127c46 100644 (file)
             'wtf/win/MainThreadWin.cpp',
             'wtf/win/OwnPtrWin.cpp',
             'wtf/wx/MainThreadWx.cpp',
-            'yarr/Yarr.h',
+            'yarr/Yarr.h'
             'yarr/YarrInterpreter.cpp',
             'yarr/YarrInterpreter.h',
             'yarr/YarrJIT.cpp',
index 056ac6a5d8a978d26f48b54a8c07af2589005aa1..912264773308ed8aa54118bf00453d7706831d20 100644 (file)
@@ -65,7 +65,7 @@ wince* {
     SOURCES += $$QT_SOURCE_TREE/src/3rdparty/ce-compat/ce_time.c
 }
 
-include(yarr/yarr.pri)
+include(pcre/pcre.pri)
 include(wtf/wtf.pri)
 
 INSTALLDEPS += all
@@ -213,7 +213,10 @@ SOURCES += \
     runtime/Structure.cpp \
     runtime/TimeoutChecker.cpp \
     runtime/UString.cpp \
+    yarr/YarrPattern.cpp \
+    yarr/YarrInterpreter.cpp \
     yarr/YarrJIT.cpp \
+    yarr/YarrSyntaxChecker.cpp
 
 # Generated files, simply list them for JavaScriptCore
 
index 769cb9a1a813751734205898aea1439f84c20d22..407dc2997c9da93752908df18a03aba20e0a91e2 100644 (file)
                41359CF70FDD89CB00206180 /* DateMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 41359CF50FDD89CB00206180 /* DateMath.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4409D8470FAF80A200523B87 /* OwnPtrCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 440B7AED0FAF7FCB0073323E /* OwnPtrCommon.h */; settings = {ATTRIBUTES = (Private, ); }; };
                44DD48530FAEA85000D6B4EB /* PassOwnPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 44DD48520FAEA85000D6B4EB /* PassOwnPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               451539B912DC994500EF7AC4 /* Yarr.h in Headers */ = {isa = PBXBuildFile; fileRef = 451539B812DC994500EF7AC4 /* Yarr.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               451539B912DC994500EF7AC4 /* Yarr.h in Headers */ = {isa = PBXBuildFile; fileRef = 451539B812DC994500EF7AC4 /* Yarr.h */; };
                511FC4C9117EE28700425272 /* MD5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511FC4C7117EE23D00425272 /* MD5.cpp */; };
                511FC4CB117EE2A800425272 /* MD5.h in Headers */ = {isa = PBXBuildFile; fileRef = 511FC4CA117EE2A800425272 /* MD5.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5135FAF212D26ACE003C083B /* Decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 5135FAD512D26856003C083B /* Decoder.h */; settings = {ATTRIBUTES = (Private, ); }; };
                86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B4012DB8A8100A9FE7B /* YarrSyntaxChecker.cpp */; };
                86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B4112DB8A8100A9FE7B /* YarrSyntaxChecker.h */; };
                86704B8412DBA33700A9FE7B /* YarrInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B7D12DBA33700A9FE7B /* YarrInterpreter.cpp */; };
-               86704B8512DBA33700A9FE7B /* YarrInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B7E12DBA33700A9FE7B /* YarrInterpreter.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               86704B8512DBA33700A9FE7B /* YarrInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B7E12DBA33700A9FE7B /* YarrInterpreter.h */; };
                86704B8612DBA33700A9FE7B /* YarrJIT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B7F12DBA33700A9FE7B /* YarrJIT.cpp */; };
-               86704B8712DBA33700A9FE7B /* YarrJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8012DBA33700A9FE7B /* YarrJIT.h */; settings = {ATTRIBUTES = (); }; };
-               86704B8812DBA33700A9FE7B /* YarrParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8112DBA33700A9FE7B /* YarrParser.h */; settings = {ATTRIBUTES = (); }; };
+               86704B8712DBA33700A9FE7B /* YarrJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8012DBA33700A9FE7B /* YarrJIT.h */; };
+               86704B8812DBA33700A9FE7B /* YarrParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8112DBA33700A9FE7B /* YarrParser.h */; };
                86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B8212DBA33700A9FE7B /* YarrPattern.cpp */; };
-               86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8312DBA33700A9FE7B /* YarrPattern.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8312DBA33700A9FE7B /* YarrPattern.h */; };
                868BFA08117CEFD100B908B1 /* AtomicString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868BFA00117CEFD100B908B1 /* AtomicString.cpp */; };
                868BFA09117CEFD100B908B1 /* AtomicString.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA01117CEFD100B908B1 /* AtomicString.h */; settings = {ATTRIBUTES = (Private, ); }; };
                868BFA0A117CEFD100B908B1 /* AtomicStringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA02117CEFD100B908B1 /* AtomicStringImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
index c6ce99512634fb81fb2e5d3f32ad7c8b19b53ca6..d1cc1c23c7d1bab4cfc8a5cee8f6b25935e3e50b 100644 (file)
@@ -21,8 +21,6 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 
-import sys
-
 types = {
     "wordchar": { "UseTable" : True, "data": ['_', ('0','9'), ('A', 'Z'), ('a','z')]},
     "nonwordchar": { "UseTable" : True, "Inverse": "wordchar", "data": ['`', (0, ord('0') - 1), (ord('9') + 1, ord('A') - 1), (ord('Z') + 1, ord('_') - 1), (ord('z') + 1, 0xffff)]},
@@ -109,12 +107,6 @@ for name, classes in types.items():
     function += ("}\n\n")
     functions += function
 
-if (len(sys.argv) > 1):
-    f = open(sys.argv[-1], "w")
-    f.write(arrays)
-    f.write(functions)
-    f.close()
-else:
-    print(arrays)
-    print(functions)
+print(arrays)
+print(functions)
 
index 95ce5e9979976ce802694c5dfcc23d84053e4cb6..ee2f0bb7eb5a844a1c2cff26df253bee7a71ac99 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "Lexer.h"
 #include "yarr/Yarr.h"
-#include "yarr/YarrJIT.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 4776c13a742c935c41a7a60c650b153fac74c514..07f57f0a3b0b44045d11a765498d8e6833edbf15 100644 (file)
 #define ENABLE_REGEXP_TRACING 0
 
 /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
-#if PLATFORM(CHROMIUM)
-#define ENABLE_YARR_JIT 0
-
-#elif ENABLE(JIT) && !defined(ENABLE_YARR_JIT)
+#if ENABLE(JIT) && !defined(ENABLE_YARR_JIT)
 #define ENABLE_YARR_JIT 1
 
 /* Setting this flag compares JIT results with interpreter results. */
index de64fdd1b3788169370048bf77a8ac521e740f9e..57176bcb13d485ec6b8d1dddb2e60c82ac597b21 100644 (file)
@@ -29,6 +29,7 @@
 #define Yarr_h
 
 #include "YarrInterpreter.h"
+#include "YarrJIT.h"
 #include "YarrPattern.h"
 
 namespace JSC { namespace Yarr {
@@ -60,6 +61,11 @@ enum JSRegExpResult {
 PassOwnPtr<BytecodePattern> byteCompile(YarrPattern&, BumpPointerAllocator*);
 int interpret(BytecodePattern*, const UChar* input, unsigned start, unsigned length, int* output);
 
+#if ENABLE(YARR_JIT)
+void jitCompile(YarrPattern&, JSGlobalData*, YarrCodeBlock& jitObject);
+int execute(YarrCodeBlock& jitObject, const UChar* input, unsigned start, unsigned length, int* output);
+#endif
+
 } } // namespace JSC::Yarr
 
 #endif // Yarr_h
index e34e6f4c16425ac272d65ea4faa50b3f570174df..cdb7136ad702709e84b51e649640c2746c68a4f4 100644 (file)
@@ -27,7 +27,9 @@
 #include "YarrJIT.h"
 
 #include "ASCIICType.h"
+#include "JSGlobalData.h"
 #include "LinkBuffer.h"
+#include "MacroAssembler.h"
 #include "Yarr.h"
 
 #if ENABLE(YARR_JIT)
index 91c5b85c916f4e52f29ff91a7047fd307afa9d04..414b575063742c9443e26ab05ae8ad16be4d378f 100644 (file)
 
 #if ENABLE(YARR_JIT)
 
-#include "JSGlobalData.h"
 #include "MacroAssembler.h"
 #include "UString.h"
-#include "YarrPattern.h"
 
 #if CPU(X86) && !COMPILER(MSVC)
 #define YARR_CALL __attribute__ ((regparm (3)))
@@ -77,9 +75,6 @@ private:
     bool m_needFallBack;
 };
 
-void jitCompile(YarrPattern&, JSGlobalData*, YarrCodeBlock& jitObject);
-int execute(YarrCodeBlock& jitObject, const UChar* input, unsigned start, unsigned length, int* output);
-
 } } // namespace JSC::Yarr
 
 #endif
index c59310a7cc476a19e3ed8447c086a78085202cb7..8c5741a0debda5f8c719201801ed5800b5fa72d7 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef YarrParser_h
 #define YarrParser_h
 
-#include <runtime/UString.h>
+#include "UString.h"
 #include "Yarr.h"
 #include <wtf/ASCIICType.h>
 #include <wtf/unicode/Unicode.h>
index cfe804f99f5eee19693772225ad307d452ed6b64..d80f692be8146916094f5f11e67a83d06d6bead5 100644 (file)
 #ifndef YarrPattern_h
 #define YarrPattern_h
 
-#include <runtime/UString.h>
 #include <wtf/Vector.h>
 #include <wtf/unicode/Unicode.h>
 
+#include <UString.h>
+
 namespace JSC { namespace Yarr {
 
 struct PatternDisjunction;
index 2013671eb573f9b6e023c30a3b5ad28a6ae9aefc..e48cb9e5550228671ab8597f7967841abacdbf93 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef YarrSyntaxChecker_h
 #define YarrSyntaxChecker_h
 
-#include <runtime/UString.h>
+#include <UString.h>
 
 namespace JSC { namespace Yarr {
 
diff --git a/Source/JavaScriptCore/yarr/yarr.pri b/Source/JavaScriptCore/yarr/yarr.pri
deleted file mode 100644 (file)
index a7b1242..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# Yet Another Regex Runtime - Qt4 build info
-
-SOURCES += \
-    yarr/YarrInterpreter.cpp \
-    yarr/YarrPattern.cpp \
-    yarr/YarrSyntaxChecker.cpp
-
index c671ad9269ffd0a96c52c61d12e65bc8091581d9..26cb4e47fd9ffb8f3f7f8830be2953d86c52dee8 100644 (file)
@@ -39,9 +39,9 @@ BINDING_C_INCLUDES := \
        $(JAVASCRIPTCORE_PATH)/parser \
        $(JAVASCRIPTCORE_PATH)/jit \
        $(JAVASCRIPTCORE_PATH)/interpreter \
+       $(JAVASCRIPTCORE_PATH)/pcre \
        $(JAVASCRIPTCORE_PATH)/profiler \
        $(JAVASCRIPTCORE_PATH)/runtime \
-       $(JAVASCRIPTCORE_PATH)/yarr \
        $(JAVASCRIPTCORE_PATH)/ForwardingHeaders \
        \
        $(base_intermediates)/Source/WebCore/bindings/js \
index 638a2823f761cb4801811fb2a152b96de4c5b8d9..406a5bf526a549de8db43ca513b7996b9380eeba 100644 (file)
@@ -73,11 +73,11 @@ SET(WebCore_INCLUDE_DIRECTORIES
     "${JAVASCRIPTCORE_DIR}/interpreter"
     "${JAVASCRIPTCORE_DIR}/jit"
     "${JAVASCRIPTCORE_DIR}/parser"
+    "${JAVASCRIPTCORE_DIR}/pcre"
     "${JAVASCRIPTCORE_DIR}/profiler"
     "${JAVASCRIPTCORE_DIR}/runtime"
     "${JAVASCRIPTCORE_DIR}/wtf"
     "${JAVASCRIPTCORE_DIR}/wtf/unicode"
-    "${JAVASCRIPTCORE_DIR}/yarr"
     "${DERIVED_SOURCES_DIR}"
     "${CMAKE_SOURCE_DIR}"
     "${CMAKE_BINARY_DIR}"
index c1dedf9e754cf757a46d217cf8fddace13a16ffb..12278f8a6cde038ee04fbd2dd01ce0999c25d544 100644 (file)
@@ -1,3 +1,30 @@
+2011-02-04  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r77625 and r77626.
+        http://trac.webkit.org/changeset/77625
+        http://trac.webkit.org/changeset/77626
+        https://bugs.webkit.org/show_bug.cgi?id=53765
+
+        It broke Windows builds (Requested by Ossy_ on #webkit).
+
+        * Android.jscbindings.mk:
+        * CMakeLists.txt:
+        * ForwardingHeaders/pcre/pcre.h: Added.
+        * ForwardingHeaders/yarr/Yarr.h: Removed.
+        * ForwardingHeaders/yarr/YarrInterpreter.h: Removed.
+        * ForwardingHeaders/yarr/YarrPattern.h: Removed.
+        * WebCore.gyp/WebCore.gyp:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.vcproj/copyForwardingHeaders.cmd:
+        * platform/text/RegularExpression.cpp:
+        (WebCore::RegularExpression::Private::regexp):
+        (WebCore::RegularExpression::Private::compile):
+        (WebCore::RegularExpression::Private::Private):
+        (WebCore::RegularExpression::Private::create):
+        (WebCore::RegularExpression::Private::~Private):
+        (WebCore::RegularExpression::match):
+
 2011-02-04  Peter Varga  <pvarga@webkit.org>
 
         Rubber-stamped by Csaba Osztrogon√°c.
diff --git a/Source/WebCore/ForwardingHeaders/pcre/pcre.h b/Source/WebCore/ForwardingHeaders/pcre/pcre.h
new file mode 100644 (file)
index 0000000..198acc9
--- /dev/null
@@ -0,0 +1,5 @@
+#ifndef WebCore_FWD_pcre_h
+#define WebCore_FWD_pcre_h
+#include <JavaScriptCore/pcre.h>
+#endif
+
diff --git a/Source/WebCore/ForwardingHeaders/yarr/Yarr.h b/Source/WebCore/ForwardingHeaders/yarr/Yarr.h
deleted file mode 100644 (file)
index 9d38201..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef WebCore_FWD_Yarr_h
-#define WebCore_FWD_Yarr_h
-#include <JavaScriptCore/Yarr.h>
-#endif
-
diff --git a/Source/WebCore/ForwardingHeaders/yarr/YarrInterpreter.h b/Source/WebCore/ForwardingHeaders/yarr/YarrInterpreter.h
deleted file mode 100644 (file)
index 00b10a8..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef WebCore_FWD_YarrInterpreter_h
-#define WebCore_FWD_YarrInterpreter_h
-#include <JavaScriptCore/YarrInterpreter.h>
-#endif
-
diff --git a/Source/WebCore/ForwardingHeaders/yarr/YarrPattern.h b/Source/WebCore/ForwardingHeaders/yarr/YarrPattern.h
deleted file mode 100644 (file)
index c2cf0b6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef WebCore_FWD_YarrPattern_h
-#define WebCore_FWD_YarrPattern_h
-#include <JavaScriptCore/YarrPattern.h>
-#endif
-
index 6c9fb7872ebcec0d90d87f0da4d5050f2b198f1d..70df557765016e4c268c02fea8489617ef094577 100644 (file)
         'webcore_bindings_sources',
         'inspector_protocol_sources',
         'injected_script_source',
-        '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
+        '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
         '<(chromium_src_dir)/skia/skia.gyp:skia',
       'type': 'none',
       'dependencies': [
         'webcore_bindings',
-        '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
+        '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
         '<(chromium_src_dir)/skia/skia.gyp:skia',
       ],
       'export_dependent_settings': [
         'webcore_bindings',
-        '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
+        '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
         '<(chromium_src_dir)/skia/skia.gyp:skia',
index 38cdb6308622fae02731414de256d83d45bfeb57..ca2ea4a5d234ec7a136239cfbcbb237ac46a886c 100644 (file)
@@ -339,7 +339,7 @@ SOURCES += \
     bindings/generic/RuntimeEnabledFeatures.cpp
 
 v8 {
-    include($$PWD/../JavaScriptCore/yarr/yarr.pri)
+    include($$PWD/../JavaScriptCore/pcre/pcre.pri)
     include($$PWD/../JavaScriptCore/wtf/wtf.pri)
 
     SOURCES += \
index 6e9b79351afafcfa48d3c08773bbf5c0dff287b0..6b7273351077b1de7c23ab79f987691aefcbe9df 100755 (executable)
                                </File>
                        </Filter>
                        <Filter
-                               Name="yarr"
+                               Name="pcre"
                                >
                                <File
-                                       RelativePath="..\ForwardingHeaders\yarr\Yarr.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\ForwardingHeaders\yarr\YarrInterpreter.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\ForwardingHeaders\yarr\YarrPattern.h"
+                                       RelativePath="..\ForwardingHeaders\pcre\pcre.h"
                                        >
                                </File>
                        </Filter>
index 3351e600884397629a9d34be96cedcc43b9123d9..3da6287b6c07e6e00c7f57d5964382bf9536a4ae 100755 (executable)
@@ -7,12 +7,12 @@ mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\bindings"
 mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\parser"
 mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\runtime"
 mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\masm"
+mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\pcre"
 mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\profiler"
 mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf"
 mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\text"
 mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\unicode"
 mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\unicode\icu"
-mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\yarr"
 
 xcopy /y /d "%ProjectDir%..\config.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%CONFIGURATIONBUILDDIR%\obj\WebCore\DerivedSources\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
@@ -74,11 +74,11 @@ xcopy /y /d "%ProjectDir%..\ForwardingHeaders\bindings\*.h" "%CONFIGURATIONBUILD
 xcopy /y /d "%ProjectDir%..\ForwardingHeaders\parser\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\parser"
 xcopy /y /d "%ProjectDir%..\ForwardingHeaders\runtime\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\runtime"
 xcopy /y /d "%ProjectDir%..\ForwardingHeaders\masm\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\masm"
+xcopy /y /d "%ProjectDir%..\ForwardingHeaders\pcre\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\pcre"
 xcopy /y /d "%ProjectDir%..\ForwardingHeaders\profiler\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\profiler"
 xcopy /y /d "%ProjectDir%..\ForwardingHeaders\wtf\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf"
 xcopy /y /d "%ProjectDir%..\ForwardingHeaders\wtf\text\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\text"
 xcopy /y /d "%ProjectDir%..\ForwardingHeaders\wtf\unicode\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\unicode"
 xcopy /y /d "%ProjectDir%..\ForwardingHeaders\wtf\unicode\icu\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\unicode\icu"
-xcopy /y /d "%ProjectDir%..\ForwardingHeaders\yarr\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\yarr"
 
 if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
index 9fc42a08eb63b90300c1918f321e4795234d04e5..9b063c92009a7e82eacba4b1e2f481bb34e2beb1 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * Copyright (C) 2004, 2008, 2009 Apple Inc. All rights reserved.
  * Copyright (C) 2008 Collabora Ltd.
- * Copyright (C) 2011 Peter Varga (pvarga@webkit.org), University of Szeged
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #include "config.h"
 #include "RegularExpression.h"
 
-#include <wtf/BumpPointerAllocator.h>
-#include <yarr/Yarr.h>
 #include "Logging.h"
+#include <pcre/pcre.h>
 
 namespace WebCore {
 
 class RegularExpression::Private : public RefCounted<RegularExpression::Private> {
 public:
-    static PassRefPtr<Private> create(const String& pattern, TextCaseSensitivity caseSensitivity)
-    {
-        return adoptRef(new Private(pattern, caseSensitivity));
-    }
-
-    int lastMatchLength;
+    static PassRefPtr<Private> create(const String& pattern, TextCaseSensitivity);
+    ~Private();
 
-    unsigned m_numSubpatterns;
-    OwnPtr<JSC::Yarr::BytecodePattern> m_regExpByteCode;
+    JSRegExp* regexp() const { return m_regexp; }
+    int lastMatchLength;    
 
 private:
-    Private(const String& pattern, TextCaseSensitivity caseSensitivity)
-        : lastMatchLength(-1)
-        , m_regExpByteCode(compile(pattern, caseSensitivity))
-        , m_constructionError(0)
-    {
-    }
+    Private(const String& pattern, TextCaseSensitivity);
+    static JSRegExp* compile(const String& pattern, TextCaseSensitivity);
 
-    PassOwnPtr<JSC::Yarr::BytecodePattern> compile(const String& patternString, TextCaseSensitivity caseSensitivity)
-    {
-        JSC::Yarr::YarrPattern pattern(JSC::UString(patternString.impl()), (caseSensitivity == TextCaseInsensitive), false, &m_constructionError);
-        if (m_constructionError) {
-            LOG_ERROR("RegularExpression: YARR compile failed with '%s'", m_constructionError);
-            return PassOwnPtr<JSC::Yarr::BytecodePattern>();
-        }
+    JSRegExp* m_regexp;
+};
 
-        m_numSubpatterns = pattern.m_numSubpatterns;
+inline JSRegExp* RegularExpression::Private::compile(const String& pattern, TextCaseSensitivity caseSensitivity)
+{
+    const char* errorMessage;
+    JSRegExp* regexp = jsRegExpCompile(pattern.characters(), pattern.length(),
+        caseSensitivity == TextCaseSensitive ? JSRegExpDoNotIgnoreCase : JSRegExpIgnoreCase, JSRegExpSingleLine,
+        0, &errorMessage);
+    if (!regexp)
+        LOG_ERROR("RegularExpression: pcre_compile failed with '%s'", errorMessage);
+    return regexp;
+}
 
-        return JSC::Yarr::byteCompile(pattern, &m_regexAllocator);
-    }
+inline RegularExpression::Private::Private(const String& pattern, TextCaseSensitivity caseSensitivity)
+    : lastMatchLength(-1)
+    , m_regexp(compile(pattern, caseSensitivity))
+{
+}
 
-    BumpPointerAllocator m_regexAllocator;
-    const char* m_constructionError;
-};
+inline PassRefPtr<RegularExpression::Private> RegularExpression::Private::create(const String& pattern, TextCaseSensitivity caseSensitivity)
+{
+    return adoptRef(new Private(pattern, caseSensitivity));
+}
+
+RegularExpression::Private::~Private()
+{
+    jsRegExpFree(m_regexp);
+}
 
 RegularExpression::RegularExpression(const String& pattern, TextCaseSensitivity caseSensitivity)
     : d(Private::create(pattern, caseSensitivity))
@@ -93,22 +96,19 @@ RegularExpression& RegularExpression::operator=(const RegularExpression& re)
 
 int RegularExpression::match(const String& str, int startFrom, int* matchLength) const
 {
-    if (!d->m_regExpByteCode)
+    if (!d->regexp())
         return -1;
 
     if (str.isNull())
         return -1;
 
-    const size_t maxOffsets = (d->m_numSubpatterns + 1) * 2;
+    // First 2 offsets are start and end offsets; 3rd entry is used internally by pcre
+    static const size_t maxOffsets = 3;
     int offsets[maxOffsets];
-
-    for (unsigned j = 0, i = 0; i < d->m_numSubpatterns + 1; j += 2, i++)
-        offsets[j] = -1;
-
-    int result = JSC::Yarr::interpret(d->m_regExpByteCode.get(), str.characters(), startFrom, str.length(), offsets);
-    ASSERT(result >= -1);
-
+    int result = jsRegExpExecute(d->regexp(), str.characters(), str.length(), startFrom, offsets, maxOffsets);
     if (result < 0) {
+        if (result != JSRegExpErrorNoMatch)
+            LOG_ERROR("RegularExpression: pcre_exec() failed with result %d", result);
         d->lastMatchLength = -1;
         return -1;
     }