From 77af11c19b8389ec2abc035fa2fb804199815260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 12 Oct 2011 10:44:55 +0200 Subject: [PATCH] add patches --- mozilla-670719.patch | 53 ++++++++++++++++++++++++++++++++++ xulrunner-7.0.1-yarr-jit.patch | 44 ++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 mozilla-670719.patch create mode 100644 xulrunner-7.0.1-yarr-jit.patch diff --git a/mozilla-670719.patch b/mozilla-670719.patch new file mode 100644 index 0000000..afae907 --- /dev/null +++ b/mozilla-670719.patch @@ -0,0 +1,53 @@ +# HG changeset patch +# User Mike Hommey +# 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) \ diff --git a/xulrunner-7.0.1-yarr-jit.patch b/xulrunner-7.0.1-yarr-jit.patch new file mode 100644 index 0000000..da64d0f --- /dev/null +++ b/xulrunner-7.0.1-yarr-jit.patch @@ -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 &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. + */