mozilla-yarr-pcre.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Thu, 23 Feb 2012 11:18:26 +0100
changeset 400 6a1811ef3174
parent 391 5425f43ef15c
child 401 aafdccaf5ded
permissions -rw-r--r--
update for 11.0b4 - removed obsolete NSS compat patch - updated KDE patches

# HG changeset patch
# Parent a45e9e6825a2d7e7f4f64df34ccf9fa74fcac6cb
# User Landry Breuil <landry@openbsd.org>
Use YARR interpreter instead of PCRE on platforms where YARR JIT is not
supported

diff --git a/js/src/Makefile.in b/js/src/Makefile.in
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -356,25 +356,30 @@ CPPSRCS += 	checks.cc \
 # END enclude sources for V8 dtoa
 #############################################
 
 # For architectures without YARR JIT, PCRE is faster than the YARR
 # interpreter (bug 684559).
 
 ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU)))
 
-VPATH +=        $(srcdir)/yarr/pcre \
+VPATH +=        $(srcdir)/assembler \
+		$(srcdir)/assembler/wtf \
+		$(srcdir)/yarr \
 		$(NULL)
 
 CPPSRCS += \
-                pcre_compile.cpp \
-                pcre_exec.cpp \
-                pcre_tables.cpp \
-                pcre_xclass.cpp \
-                pcre_ucp_searchfuncs.cpp \
+		Assertions.cpp \
+		OSAllocatorOS2.cpp \
+		OSAllocatorPosix.cpp \
+		OSAllocatorWin.cpp \
+		PageBlock.cpp \
+		YarrInterpreter.cpp \
+		YarrPattern.cpp \
+		YarrSyntaxChecker.cpp \
 		$(NULL)
 else
 
 ###############################################
 # BEGIN include sources for the Nitro assembler
 #
 
 ENABLE_YARR_JIT = 1
@@ -916,20 +921,20 @@ endif
 
 ###############################################
 # BEGIN kludges for the Nitro assembler
 #
 
 # Needed to "configure" it correctly.  Unfortunately these
 # flags wind up being applied to all code in js/src, not just
 # the code in js/src/assembler.
-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1
 
 ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_METHODJIT))
-CXXFLAGS +=  -DENABLE_JIT=1
+CXXFLAGS +=  -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
 endif
 
 INCLUDES +=	-I$(srcdir)/assembler -I$(srcdir)/yarr
 
 ifdef ENABLE_METHODJIT
 # Build a standalone test program that exercises the assembler
 # sources a bit.
 TESTMAIN_OBJS = \
diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h
--- a/js/src/yarr/wtfbridge.h
+++ b/js/src/yarr/wtfbridge.h
@@ -44,19 +44,17 @@
  * WTF compatibility layer. This file provides various type and data
  * definitions for use by Yarr.
  */
 
 #include "jsstr.h"
 #include "jsprvtd.h"
 #include "vm/String.h"
 #include "assembler/wtf/Platform.h"
-#if ENABLE_YARR_JIT
 #include "assembler/jit/ExecutableAllocator.h"
-#endif
 
 namespace JSC { namespace Yarr {
 
 /*
  * Basic type definitions.
  */
 
 typedef jschar UChar;