$OpenBSD: patch-js_src_vm_RegExpObject_h,v 1.1 2012/02/20 20:21:43 landry Exp $ https://bug691898.bugzilla.mozilla.org/attachment.cgi?id=588391 use yarr interpreter on ppc --- js/src/vm/RegExpObject.h.orig Wed Jan 11 18:14:49 2012 +++ js/src/vm/RegExpObject.h Mon Jan 16 17:07:48 2012 @@ -49,8 +49,6 @@ #include "yarr/Yarr.h" #if ENABLE_YARR_JIT #include "yarr/YarrJIT.h" -#else -#include "yarr/pcre/pcre.h" #endif namespace js { @@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed(byteCode); -#else - if (compiled) - jsRegExpFree(compiled); -#endif } #if ENABLE_YARR_JIT static inline bool isJITRuntimeEnabled(JSContext *cx); - void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); -#else - void reportPCREError(JSContext *cx, int error); #endif + void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount, RegExpFlag flags); @@ -205,11 +194,7 @@ class RegExpPrivateCode int *output, size_t outputCount); static size_t getOutputSize(size_t pairCount) { -#if ENABLE_YARR_JIT return pairCount * 2; -#else - return pairCount * 3; /* Should be x2, but PCRE has... needs. */ -#endif } };