add patches

This commit is contained in:
Dan Horák 2011-10-12 10:44:55 +02:00
parent 2963938883
commit 77af11c19b
2 changed files with 97 additions and 0 deletions

53
mozilla-670719.patch Normal file
View File

@ -0,0 +1,53 @@
# HG changeset patch
# User Mike Hommey <mh+mozilla@glandium.org>
# Date 1313846520 -7200
# Node ID fdc3b63938f5a76d99c1e2bb12fd448465debc94
# Parent 07a5a618ebe3f67b23100ceb1b51e92bb79be0cd
Bug 670719 - Only add -DENABLE_JIT=1 to CXXFLAGS if any of trace/method/yarr jit is enabled.
diff --git a/js/src/Makefile.in b/js/src/Makefile.in
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -433,16 +433,19 @@ CPPSRCS += \
YarrPattern.cpp \
YarrSyntaxChecker.cpp \
$(NULL)
else
###############################################
# BEGIN include sources for the Nitro assembler
#
+
+ENABLE_YARR_JIT = 1
+
VPATH += $(srcdir)/assembler \
$(srcdir)/assembler/wtf \
$(srcdir)/assembler/jit \
$(srcdir)/assembler/assembler \
$(srcdir)/methodjit \
$(srcdir)/yarr \
$(NONE)
@@ -1070,17 +1073,21 @@ 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 -DENABLE_JIT=1
+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
+
+ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT))
+CXXFLAGS += -DENABLE_JIT=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 = \
Assertions.$(OBJ_SUFFIX) \

View File

@ -0,0 +1,44 @@
diff -up xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h.yarr-jit xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h
--- xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h.yarr-jit 2011-09-28 22:24:50.000000000 +0200
+++ xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h 2011-10-11 17:35:10.000000000 +0200
@@ -491,7 +491,9 @@ RegExp::compileHelper(JSContext *cx, JSL
}
#endif
+#if ENABLE_YARR_JIT
codeBlock.setFallBack(true);
+#endif
byteCode = JSC::Yarr::byteCompile(yarrPattern, cx->compartment->regExpAllocator).get();
return true;
diff -up xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h.yarr-jit xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h
--- xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h.yarr-jit 2011-09-28 22:24:52.000000000 +0200
+++ xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h 2011-10-11 17:35:10.000000000 +0200
@@ -50,7 +50,9 @@
#include "jstl.h"
#include "vm/String.h"
#include "assembler/wtf/Platform.h"
+#if ENABLE_YARR_JIT
#include "assembler/jit/ExecutableAllocator.h"
+#endif
namespace JSC { namespace Yarr {
@@ -261,6 +263,8 @@ deleteAllValues(Vector<T, N> &v) {
v.deleteAllValues();
}
+#if ENABLE_YARR_JIT
+
/*
* Minimal JSGlobalData. This used by Yarr to get the allocator.
*/
@@ -272,6 +276,8 @@ class JSGlobalData {
: regexAllocator(regexAllocator) { }
};
+#endif
+
/*
* Sentinel value used in Yarr.
*/