~ubuntu-branches/ubuntu/precise/thunderbird/precise-updates

« back to all changes in this revision

Viewing changes to debian/patches/fix-build-failure-without-yarr-jit.patch

  • Committer: Package Import Robot
  • Author(s): Chris Coulson, Chris Coulson, David Planella, Ben Collins
  • Date: 2012-07-13 22:59:01 UTC
  • mfrom: (1.7.13)
  • Revision ID: package-import@ubuntu.com-20120713225901-9txaa5c2kw0ovbjg
Tags: 14.0+build1-0ubuntu0.12.04.1
* New upstream stable release (THUNDERBIRD_14_0_BUILD1)
  - see LP: #1024564 for USN information

[ Chris Coulson <chris.coulson@canonical.com> ]
* Update globalmenu-extension to 3.2.5
  - Fix a crash in uGlobalMenu::RecycleList::~RecycleList()
  - Fix LP: #1010580 - update the window event timestamp when handling
    menu events
* Drop patches fixed upstream
  - remove debian/patches/revert-bmo621446-investigation.patch
  - update debian/patches/series
* Update desktop file translations
  - update debian/thunderbird.desktop.in
* Ensure that additional actions in the desktop file match the fd.o spec
  in precise
  - update debian/thunderbird.desktop.in
  - update debian/rules
* Add application/x-xpinstall to the MimeType field of the desktop file
  - update debian/thunderbird.desktop.in
* Drop almost all mimetypes from the desktop file. Thunderbird won't display
  any of them if you invoke it with files of these types. It will just 
  open a Compose window and add the file as an attachment
  - update debian/thunderbird.desktop.in
* Drop the ability to select between tree/system libraries using a single
  option in debian/rules. It adds additional complexity and was never used
  - update debian/config/mozconfig.in
  - update debian/control.in
  - update debian/thunderbird-dev.links.in
  - update debian/rules
* Shuffle the order of google-breakpad/src/common/dwarf/Makefile.in to fix a
  variable substitution issue, which was causing some objects to be built with
  the wrong compiler flags, resulting in dump_syms crashing (LP: #1002590)
  - add debian/patches/fix-makefile-substitution-bug.patch
* Don't set LD_LIBRARY_PATH in our shell wrapper, and install
  dependentlibs.list instead now
  - update debian/thunderbird.sh.in
  - update debian/thunderbird.install.in
* Drop StartupWMClass from the desktop file now that WM_CLASS is the same
  as the binary name (also fixes LP: #1012158)
  - update debian/thunderbird.desktop.in
  - update debian/rules
* Apport hook improvements:
  - Sort preferences alphabetically in the apport data
  - Treat preferences set in default addons as default prefs so that
    they don't show up in apport data, unless the preference files have
    been modified
  - Support random pref files dropped in to the Thunderbird install folder,
    and preferences from application bundles
  - Fix ordering issues when loading preferences
* Update the Apport blacklist file after dropping thunderbird-bin
  - update debian/apport/blacklist.in

[ David Planella <david.planella@ubuntu.com > ]
* Add Catalan keywords
  - update debian/thunderbird.desktop.in

[ Ben Collins <ben.collins@ubuntu.com> ]
* Cherry pick patch from aurora to use YARR interpreter on ppc
  - update debian/patches/fix-build-failure-without-yarr-jit.patch
  - update debian/patches/series
* Fix ppc build due to new dtoa library
  - add debian/patches/fix-dtoa-build-on-ppc.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Description: Fix build failure on platforms where YARR JIT is not supported
2
 
From: https://bug691898.bugzilla.mozilla.org/attachment.cgi?id=596771
 
2
From: https://hg.mozilla.org/mozilla-central/rev/f5a3a7b9c6b0
3
3
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=691898
4
4
 
5
5
# HG changeset patch
6
 
# Parent 9fb9c1cfc1df49ba616e0cce1586d708b0f3c0c8
7
6
# User Landry Breuil <landry@openbsd.org>
8
 
Use YARR interpreter instead of PCRE on platforms where YARR JIT is not
9
 
supported
 
7
# Date 1336027290 -7200
 
8
# Node ID f5a3a7b9c6b046af8bec742816a970ab58320764
 
9
# Parent  5338f60cc0005be010f290184c489b9f53ed35b8
 
10
Bug 691898 - Use YARR regexp interpreter instead of PCRE on platforms where YARR JIT is not supported r=dmandelin
 
11
PCRE doesn't build anyway.
10
12
 
11
 
Index: mozilla/mozilla/js/src/Makefile.in
12
 
===================================================================
13
 
--- mozilla.orig/mozilla/js/src/Makefile.in     2012-02-23 02:06:55.000000000 +0000
14
 
+++ mozilla/mozilla/js/src/Makefile.in  2012-02-23 13:25:21.157807364 +0000
15
 
@@ -340,15 +340,20 @@
16
 
 
 
13
--- moz/mozilla/js/src/Makefile.in
 
14
+++ moz.orig/mozilla/js/src/Makefile.in
 
15
@@ -315,30 +315,33 @@ ifeq (mips, $(findstring mips,$(TARGET_C
 
16
 CPPSRCS +=     TrampolineMIPS.cpp
 
17
 endif
 
18
 #
 
19
 # END enclude sources for the method JIT
 
20
 #############################################
 
21
 
 
22
 endif
 
23
 
 
24
-# For architectures without YARR JIT, PCRE is faster than the YARR
 
25
-# interpreter (bug 684559).
 
26
-
17
27
 ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU)))
18
28
 
19
29
-VPATH +=        $(srcdir)/yarr/pcre \
20
 
+VPATH +=        $(srcdir)/assembler \
21
 
+                $(srcdir)/assembler/wtf \
22
 
+                $(srcdir)/yarr \
 
30
+VPATH +=       $(srcdir)/assembler \
 
31
+               $(srcdir)/assembler/wtf \
 
32
+               $(srcdir)/assembler/jit \
 
33
+               $(srcdir)/yarr \
23
34
                $(NULL)
24
35
 
25
 
 CPPSRCS += \
 
36
-CPPSRCS += \
26
37
-                pcre_compile.cpp \
27
38
-                pcre_exec.cpp \
28
39
-                pcre_tables.cpp \
29
40
-                pcre_xclass.cpp \
30
41
-                pcre_ucp_searchfuncs.cpp \
31
 
+                Assertions.cpp \
32
 
+                OSAllocatorOS2.cpp \
33
 
+                OSAllocatorPosix.cpp \
34
 
+                OSAllocatorWin.cpp \
35
 
+                PageBlock.cpp \
36
 
+                YarrInterpreter.cpp \
37
 
+                YarrPattern.cpp \
38
 
+                YarrSyntaxChecker.cpp \
 
42
+CPPSRCS +=     ExecutableAllocator.cpp \
 
43
+               ExecutableAllocatorPosix.cpp \
 
44
+               OSAllocatorOS2.cpp \
 
45
+               OSAllocatorPosix.cpp \
 
46
+               OSAllocatorWin.cpp \
 
47
+               PageBlock.cpp \
 
48
+               YarrInterpreter.cpp \
 
49
+               YarrPattern.cpp \
 
50
+               YarrSyntaxChecker.cpp \
39
51
                $(NULL)
40
52
 else
41
53
 
42
 
@@ -883,10 +888,10 @@
43
 
 # Needed to "configure" it correctly.  Unfortunately these
44
 
 # flags wind up being applied to all code in js/src, not just
45
 
 # the code in js/src/assembler.
46
 
-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
47
 
+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1
48
 
 
49
 
 ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_METHODJIT))
50
 
-CXXFLAGS +=  -DENABLE_JIT=1
51
 
+CXXFLAGS +=  -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
52
 
 endif
53
 
 
54
 
 INCLUDES +=    -I$(srcdir)/assembler -I$(srcdir)/yarr
55
 
Index: mozilla/mozilla/js/src/jsapi.cpp
56
 
===================================================================
57
 
--- mozilla.orig/mozilla/js/src/jsapi.cpp       2012-02-23 02:07:17.000000000 +0000
58
 
+++ mozilla/mozilla/js/src/jsapi.cpp    2012-02-23 13:26:06.801806553 +0000
59
 
@@ -701,7 +701,9 @@
60
 
     ownerThread_(NULL),
61
 
 #endif
62
 
     tempLifoAlloc(TEMP_LIFO_ALLOC_PRIMARY_CHUNK_SIZE),
63
 
+#if ENABLE_ASSEMBLER
64
 
     execAlloc_(NULL),
65
 
+#endif
66
 
     bumpAlloc_(NULL),
67
 
     nativeStackBase(0),
68
 
     nativeStackQuota(0),
69
 
@@ -793,8 +795,12 @@
70
 
 #ifdef DEBUG
71
 
     noGCOrAllocationCheck(0),
72
 
 #endif
73
 
+#if ENABLE_ASSEMBLER
74
 
     inOOMReport(0),
75
 
     jitHardening(false)
76
 
+#else
77
 
+    inOOMReport(0)
78
 
+#endif
79
 
 {
80
 
     /* Initialize infallibly first, so we can goto bad and JS_DestroyRuntime. */
81
 
     JS_INIT_CLIST(&contextList);
82
 
@@ -856,7 +862,9 @@
83
 
 {
84
 
     JS_ASSERT(onOwnerThread());
85
 
 
86
 
+#if ENABLE_ASSEMBLER
87
 
     delete_<JSC::ExecutableAllocator>(execAlloc_);
88
 
+#endif
89
 
     delete_<WTF::BumpPointerAllocator>(bumpAlloc_);
90
 
 
91
 
 #ifdef DEBUG
92
 
@@ -1318,7 +1326,9 @@
93
 
 JS_PUBLIC_API(void)
94
 
 JS_SetJitHardening(JSRuntime *rt, JSBool enabled)
95
 
 {
96
 
+#if ENABLE_ASSEMBLER
97
 
     rt->setJitHardening(!!enabled);
98
 
+#endif
99
 
 }
100
 
 
101
 
 JS_PUBLIC_API(const char *)
102
 
Index: mozilla/mozilla/js/src/jscntxt.cpp
103
 
===================================================================
104
 
--- mozilla.orig/mozilla/js/src/jscntxt.cpp     2012-02-23 02:07:17.000000000 +0000
105
 
+++ mozilla/mozilla/js/src/jscntxt.cpp  2012-02-23 13:25:21.161807364 +0000
106
 
@@ -105,9 +105,11 @@
107
 
 
108
 
     if (regexpCode) {
109
 
         size_t method = 0, regexp = 0, unused = 0;
110
 
+#if ENABLE_ASSEMBLER
111
 
         if (execAlloc_)
112
 
             execAlloc_->sizeOfCode(&method, &regexp, &unused);
113
 
         JS_ASSERT(method == 0);     /* this execAlloc is only used for regexp code */
114
 
+#endif
115
 
         *regexpCode = regexp + unused;
116
 
     }
117
 
 
118
 
@@ -125,6 +127,7 @@
119
 
     JS_ATOMIC_SET(&interrupt, 1);
120
 
 }
121
 
 
122
 
+#if ENABLE_ASSEMBLER
123
 
 void
124
 
 JSRuntime::setJitHardening(bool enabled)
125
 
 {
126
 
@@ -146,6 +149,7 @@
127
 
         js_ReportOutOfMemory(cx);
128
 
     return execAlloc_;
129
 
 }
130
 
+#endif
131
 
 
132
 
 WTF::BumpPointerAllocator *
133
 
 JSRuntime::createBumpPointerAllocator(JSContext *cx)
134
 
Index: mozilla/mozilla/js/src/jscntxt.h
135
 
===================================================================
136
 
--- mozilla.orig/mozilla/js/src/jscntxt.h       2012-02-23 02:07:17.000000000 +0000
137
 
+++ mozilla/mozilla/js/src/jscntxt.h    2012-02-23 13:25:21.161807364 +0000
138
 
@@ -224,16 +224,22 @@
139
 
      * Both of these allocators are used for regular expression code which is shared at the
140
 
      * thread-data level.
141
 
      */
142
 
+#if ENABLE_ASSEMBLER
143
 
     JSC::ExecutableAllocator *execAlloc_;
144
 
+#endif
145
 
     WTF::BumpPointerAllocator *bumpAlloc_;
146
 
 
147
 
+#if ENABLE_ASSEMBLER
148
 
     JSC::ExecutableAllocator *createExecutableAllocator(JSContext *cx);
149
 
+#endif
150
 
     WTF::BumpPointerAllocator *createBumpPointerAllocator(JSContext *cx);
151
 
 
152
 
   public:
153
 
+#if ENABLE_ASSEMBLER
154
 
     JSC::ExecutableAllocator *getExecutableAllocator(JSContext *cx) {
155
 
         return execAlloc_ ? execAlloc_ : createExecutableAllocator(cx);
156
 
     }
157
 
+#endif
158
 
     WTF::BumpPointerAllocator *getBumpPointerAllocator(JSContext *cx) {
159
 
         return bumpAlloc_ ? bumpAlloc_ : createBumpPointerAllocator(cx);
160
 
     }
161
 
@@ -588,7 +594,9 @@
162
 
      */
163
 
     int32_t             inOOMReport;
164
 
 
165
 
+#if ENABLE_ASSEMBLER
166
 
     bool                jitHardening;
167
 
+#endif
168
 
 
169
 
     JSRuntime();
170
 
     ~JSRuntime();
171
 
@@ -683,10 +691,12 @@
172
 
 
173
 
     JS_FRIEND_API(void) triggerOperationCallback();
174
 
 
175
 
+#if ENABLE_ASSEMBLER
176
 
     void setJitHardening(bool enabled);
177
 
     bool getJitHardening() const {
178
 
         return jitHardening;
179
 
     }
180
 
+#endif
181
 
 
182
 
     void sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf, size_t *normal, size_t *temporary,
183
 
                              size_t *regexpCode, size_t *stackCommitted);
184
 
Index: mozilla/mozilla/js/src/jsprvtd.h
185
 
===================================================================
186
 
--- mozilla.orig/mozilla/js/src/jsprvtd.h       2012-02-23 02:07:18.000000000 +0000
187
 
+++ mozilla/mozilla/js/src/jsprvtd.h    2012-02-23 13:25:21.161807364 +0000
188
 
@@ -317,12 +317,13 @@
189
 
 
190
 
 } /* namespace js */
191
 
 
192
 
+#if ENABLE_ASSEMBLER
193
 
 namespace JSC {
194
 
 
195
 
 class ExecutableAllocator;
196
 
 
197
 
 } /* namespace JSC */
198
 
-
199
 
+#endif
200
 
 namespace WTF {
201
 
 
202
 
 class BumpPointerAllocator;
203
 
Index: mozilla/mozilla/js/src/vm/RegExpObject-inl.h
204
 
===================================================================
205
 
--- mozilla.orig/mozilla/js/src/vm/RegExpObject-inl.h   2012-02-23 02:07:40.000000000 +0000
206
 
+++ mozilla/mozilla/js/src/vm/RegExpObject-inl.h        2012-02-23 13:25:21.161807364 +0000
207
 
@@ -136,6 +136,7 @@
 
54
 ###############################################
 
55
 # BEGIN include sources for the Nitro assembler
 
56
 #
 
57
 
 
58
 ENABLE_YARR_JIT = 1
 
59
--- moz/mozilla/js/src/assembler/jit/ExecutableAllocator.h
 
60
+++ moz.orig/mozilla/js/src/assembler/jit/ExecutableAllocator.h
 
61
@@ -462,18 +462,16 @@ public:
 
62
             : "r" (code), "r" (reinterpret_cast<char*>(code) + size)
 
63
             : "r0", "r1", "r2");
 
64
     }
 
65
 #elif WTF_CPU_SPARC
 
66
     static void cacheFlush(void* code, size_t size)
 
67
     {
 
68
         sync_instruction_memory((caddr_t)code, size);
 
69
     }
 
70
-#else
 
71
-    #error "The cacheFlush support is missing on this platform."
 
72
 #endif
 
73
 
 
74
 private:
 
75
 
 
76
 #if ENABLE_ASSEMBLER_WX_EXCLUSIVE
 
77
     static void reprotectRegion(void*, size_t, ProtectionSetting);
 
78
 #endif
 
79
 
 
80
--- moz/mozilla/js/src/vm/RegExpObject-inl.h
 
81
+++ moz.orig/mozilla/js/src/vm/RegExpObject-inl.h
 
82
@@ -132,26 +132,28 @@ RegExpObject::setMultiline(bool enabled)
 
83
 }
 
84
 
 
85
 inline void
 
86
 RegExpObject::setSticky(bool enabled)
 
87
 {
208
88
     setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled));
209
89
 }
210
90
 
212
92
 /* This function should be deleted once bad Android platforms phase out. See bug 604774. */
213
93
 inline bool
214
94
 detail::RegExpCode::isJITRuntimeEnabled(JSContext *cx)
215
 
@@ -146,6 +147,7 @@
 
95
 {
 
96
 #if defined(ANDROID) && defined(JS_METHODJIT)
 
97
     return cx->methodJitEnabled;
 
98
 #else
216
99
     return true;
217
100
 #endif
218
101
 }
219
102
+#endif
220
103
 
221
 
 inline RegExpShared *
222
 
 RegExpToShared(JSContext *cx, JSObject &obj)
223
 
Index: mozilla/mozilla/js/src/vm/RegExpObject.cpp
224
 
===================================================================
225
 
--- mozilla.orig/mozilla/js/src/vm/RegExpObject.cpp     2012-02-23 02:07:40.000000000 +0000
226
 
+++ mozilla/mozilla/js/src/vm/RegExpObject.cpp  2012-02-23 13:25:21.161807364 +0000
227
 
@@ -170,7 +170,6 @@
 
104
 inline bool
 
105
 RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g)
 
106
 {
 
107
     JS_ASSERT(ObjectClassIs(obj, ESClass_RegExp, cx));
 
108
     if (obj.isRegExp())
 
109
         return obj.asRegExp().getShared(cx, g);
 
110
     return Proxy::regexp_toShared(cx, &obj, g);
 
111
--- moz/mozilla/js/src/vm/RegExpObject.cpp
 
112
+++ moz.orig/mozilla/js/src/vm/RegExpObject.cpp
 
113
@@ -163,17 +163,16 @@ MatchPairs::checkAgainst(size_t inputLen
 
114
             continue;
 
115
         JS_ASSERT(size_t(p.limit) <= inputLength);
 
116
     }
 
117
 #endif
 
118
 }
228
119
 
229
120
 /* detail::RegExpCode */
230
121
 
232
123
 void
233
124
 RegExpCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error)
234
125
 {
235
 
@@ -202,46 +201,9 @@
 
126
     switch (error) {
 
127
       case JSC::Yarr::NoError:
 
128
         JS_NOT_REACHED("Called reportYarrError with value for no error");
 
129
         return;
 
130
 #define COMPILE_EMSG(__code, __msg)                                                              \
 
131
@@ -195,73 +194,36 @@ RegExpCode::reportYarrError(JSContext *c
 
132
       COMPILE_EMSG(QuantifierTooLarge, JSMSG_BAD_QUANTIFIER);
 
133
       COMPILE_EMSG(EscapeUnterminated, JSMSG_TRAILING_SLASH);
 
134
 #undef COMPILE_EMSG
 
135
       default:
 
136
         JS_NOT_REACHED("Unknown Yarr error code");
236
137
     }
237
138
 }
238
139
 
273
174
-#endif /* ENABLE_YARR_JIT */
274
175
-
275
176
 bool
276
 
 RegExpCode::compile(JSContext *cx, JSLinearString &pattern, uintN *parenCount, RegExpFlag flags)
 
177
 RegExpCode::compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags)
277
178
 {
278
179
-#if ENABLE_YARR_JIT
279
180
     /* Parse the pattern. */
280
181
     ErrorCode yarrError;
281
182
     YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag),
282
 
@@ -258,7 +220,7 @@
 
183
                             &yarrError);
 
184
     if (yarrError) {
 
185
         reportYarrError(cx, NULL, yarrError);
 
186
         return false;
 
187
     }
 
188
     *parenCount = yarrPattern.m_numSubpatterns;
 
189
 
 
190
     /*
 
191
      * The YARR JIT compiler attempts to compile the parsed pattern. If
 
192
      * it cannot, it informs us via |codeBlock.isFallBack()|, in which
283
193
      * case we have to bytecode compile it.
284
194
      */
285
195
 
288
198
     if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) {
289
199
         JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx);
290
200
         if (!execAlloc) {
291
 
@@ -279,21 +241,11 @@
 
201
             js_ReportOutOfMemory(cx);
 
202
             return false;
 
203
         }
 
204
 
 
205
         JSGlobalData globalData(execAlloc);
 
206
@@ -272,58 +234,41 @@ RegExpCode::compile(JSContext *cx, JSLin
 
207
 #endif
 
208
 
 
209
     WTF::BumpPointerAllocator *bumpAlloc = cx->runtime->getBumpPointerAllocator(cx);
 
210
     if (!bumpAlloc) {
 
211
         js_ReportOutOfMemory(cx);
292
212
         return false;
293
213
     }
294
214
 
312
232
 }
313
233
 
314
234
 RegExpRunStatus
315
 
@@ -308,19 +260,12 @@
 
235
 RegExpCode::execute(JSContext *cx, const jschar *chars, size_t length, size_t start,
 
236
                     int *output, size_t outputCount)
 
237
 {
 
238
     int result;
 
239
 #if ENABLE_YARR_JIT
 
240
     (void) cx; /* Unused. */
 
241
     if (codeBlock.isFallBack())
 
242
         result = JSC::Yarr::interpret(byteCode, chars, start, length, output);
316
243
     else
317
244
         result = JSC::Yarr::execute(codeBlock, chars, start, length, output);
318
245
 #else
333
260
     JS_ASSERT(result >= 0);
334
261
     return RegExpRunStatus_Success;
335
262
 }
336
 
Index: mozilla/mozilla/js/src/vm/RegExpObject.h
337
 
===================================================================
338
 
--- mozilla.orig/mozilla/js/src/vm/RegExpObject.h       2012-02-23 02:07:40.000000000 +0000
339
 
+++ mozilla/mozilla/js/src/vm/RegExpObject.h    2012-02-23 13:25:21.161807364 +0000
340
 
@@ -52,8 +52,6 @@
 
263
 
 
264
 /* RegExpObject */
 
265
 
 
266
 static void
 
267
 regexp_trace(JSTracer *trc, JSObject *obj)
 
268
--- moz/mozilla/js/src/vm/RegExpObject.h
 
269
+++ moz.orig/mozilla/js/src/vm/RegExpObject.h
 
270
@@ -47,20 +47,18 @@
 
271
 #include "jscntxt.h"
 
272
 #include "jsobj.h"
 
273
 
 
274
 #include "js/TemplateLib.h"
 
275
 
 
276
 #include "yarr/Yarr.h"
341
277
 #if ENABLE_YARR_JIT
342
278
 #include "yarr/YarrJIT.h"
 
279
+#endif
343
280
 #include "yarr/YarrSyntaxChecker.h"
344
281
-#else
345
282
-#include "yarr/pcre/pcre.h"
346
 
 #endif
 
283
-#endif
347
284
 
348
285
 /*
349
 
@@ -223,40 +221,33 @@
 
286
  * JavaScript Regular Expressions
 
287
  *
 
288
  * There are several engine concepts associated with a single logical regexp:
 
289
  *
 
290
  *   RegExpObject - The JS-visible object whose .[[Class]] equals "RegExp"
 
291
  *
 
292
@@ -108,78 +106,61 @@ class RegExpObjectBuilder
 
293
 
 
294
 JSObject *
 
295
 CloneRegExpObject(JSContext *cx, JSObject *obj, JSObject *proto);
 
296
 
 
297
 namespace detail {
350
298
 
351
299
 class RegExpCode
352
300
 {
361
309
 
362
310
     /* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */
363
311
     YarrCodeBlock   codeBlock;
364
 
-    BytecodePattern *byteCode;
 
312
+#endif
 
313
     BytecodePattern *byteCode;
365
314
-#else
366
315
-    JSRegExp        *compiled;
367
 
 #endif
368
 
+    BytecodePattern *byteCode;
 
316
-#endif
369
317
 
370
318
   public:
371
319
     RegExpCode()
372
320
       :
373
321
 #if ENABLE_YARR_JIT
374
322
         codeBlock(),
375
 
-        byteCode(NULL)
 
323
+#endif
 
324
         byteCode(NULL)
376
325
-#else
377
326
-        compiled(NULL)
378
 
 #endif
379
 
+        byteCode(NULL)
 
327
-#endif
380
328
     { }
381
329
 
382
330
     ~RegExpCode() {
392
340
     }
393
341
 
394
342
     static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) {
395
 
@@ -268,23 +259,17 @@
 
343
-#if ENABLE_YARR_JIT
 
344
         ErrorCode error = JSC::Yarr::checkSyntax(*source);
 
345
         if (error == JSC::Yarr::NoError)
 
346
             return true;
 
347
 
396
348
         reportYarrError(cx, tokenStream, error);
397
349
         return false;
398
 
 #else
 
350
-#else
399
351
-# error "Syntax checking not implemented for !ENABLE_YARR_JIT"
400
 
+        return true; /* XXX! */
401
 
 #endif
 
352
-#endif
402
353
     }
403
354
 
404
355
 #if ENABLE_YARR_JIT
405
356
     static inline bool isJITRuntimeEnabled(JSContext *cx);
406
 
-    static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
 
357
+#endif
 
358
     static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
407
359
-#else
408
360
-    static void reportPCREError(JSContext *cx, int error);
409
 
 #endif
410
 
+    static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
 
361
-#endif
411
362
 
412
363
     static size_t getOutputSize(size_t pairCount) {
413
364
-#if ENABLE_YARR_JIT
417
368
-#endif
418
369
     }
419
370
 
420
 
     bool compile(JSContext *cx, JSLinearString &pattern, uintN *parenCount, RegExpFlag flags);
421
 
Index: mozilla/mozilla/js/src/yarr/wtfbridge.h
422
 
===================================================================
423
 
--- mozilla.orig/mozilla/js/src/yarr/wtfbridge.h        2012-02-23 02:07:42.000000000 +0000
424
 
+++ mozilla/mozilla/js/src/yarr/wtfbridge.h     2012-02-23 13:25:21.161807364 +0000
425
 
@@ -49,9 +49,7 @@
 
371
     bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags);
 
372
 
 
373
 
 
374
     RegExpRunStatus
 
375
     execute(JSContext *cx, const jschar *chars, size_t length, size_t start,
 
376
             int *output, size_t outputCount);
 
377
--- moz/mozilla/js/src/yarr/wtfbridge.h
 
378
+++ moz.orig/mozilla/js/src/yarr/wtfbridge.h
 
379
@@ -44,19 +44,17 @@
 
380
  * WTF compatibility layer. This file provides various type and data
 
381
  * definitions for use by Yarr.
 
382
  */
 
383
 
 
384
 #include "jsstr.h"
426
385
 #include "jsprvtd.h"
427
386
 #include "vm/String.h"
428
387
 #include "assembler/wtf/Platform.h"
432
391
 
433
392
 namespace JSC { namespace Yarr {
434
393
 
 
394
 /*
 
395
  * Basic type definitions.
 
396
  */
 
397
 
 
398
 typedef jschar UChar;
 
399