Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 580226 Details for
Bug 814879
FTBFS: Buld failure on PPC64: ./yarr/pcre/pcre.h:49:18: fatal error: jstl.h: No such file or directory
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Use YARR interpreter instead of PCRE on platforms where YARR JIT is not supported
mozilla-691898.patch (text/plain), 12.20 KB, created by
Gustavo Luiz Duarte
on 2012-04-25 18:11:10 UTC
(
hide
)
Description:
Use YARR interpreter instead of PCRE on platforms where YARR JIT is not supported
Filename:
MIME Type:
Creator:
Gustavo Luiz Duarte
Created:
2012-04-25 18:11:10 UTC
Size:
12.20 KB
patch
obsolete
>Index: xulrunner-12.0/mozilla-release/js/src/Makefile.in >=================================================================== >--- xulrunner-12.0.orig/mozilla-release/js/src/Makefile.in >+++ xulrunner-12.0/mozilla-release/js/src/Makefile.in >@@ -354,15 +354,20 @@ CPPSRCS += checks.cc \ > > ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(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 > >@@ -896,10 +901,10 @@ endif > # 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 >Index: xulrunner-12.0/mozilla-release/js/src/jscntxt.cpp >=================================================================== >--- xulrunner-12.0.orig/mozilla-release/js/src/jscntxt.cpp >+++ xulrunner-12.0/mozilla-release/js/src/jscntxt.cpp >@@ -104,8 +104,10 @@ JSRuntime::sizeOfExcludingThis(JSMallocS > > if (regexpCode) { > size_t method = 0, regexp = 0, unused = 0; >+#if ENABLE_ASSEMBLER > if (execAlloc_) > execAlloc_->sizeOfCode(&method, ®exp, &unused); >+#endif > JS_ASSERT(method == 0); /* this execAlloc is only used for regexp code */ > *regexpCode = regexp + unused; > } >@@ -124,6 +126,7 @@ JSRuntime::triggerOperationCallback() > JS_ATOMIC_SET(&interrupt, 1); > } > >+#if ENABLE_ASSEMBLER > JSC::ExecutableAllocator * > JSRuntime::createExecutableAllocator(JSContext *cx) > { >@@ -135,6 +138,7 @@ JSRuntime::createExecutableAllocator(JSC > js_ReportOutOfMemory(cx); > return execAlloc_; > } >+#endif > > WTF::BumpPointerAllocator * > JSRuntime::createBumpPointerAllocator(JSContext *cx) >Index: xulrunner-12.0/mozilla-release/js/src/jscntxt.h >=================================================================== >--- xulrunner-12.0.orig/mozilla-release/js/src/jscntxt.h >+++ xulrunner-12.0/mozilla-release/js/src/jscntxt.h >@@ -221,18 +221,24 @@ struct JSRuntime > * Both of these allocators are used for regular expression code which is shared at the > * thread-data level. > */ >+#if ENABLE_ASSEMBLER > JSC::ExecutableAllocator *execAlloc_; >+#endif > WTF::BumpPointerAllocator *bumpAlloc_; > js::RegExpPrivateCache *repCache_; > >+#if ENABLE_ASSEMBLER > JSC::ExecutableAllocator *createExecutableAllocator(JSContext *cx); >+#endif > WTF::BumpPointerAllocator *createBumpPointerAllocator(JSContext *cx); > js::RegExpPrivateCache *createRegExpPrivateCache(JSContext *cx); > > public: >+#if ENABLE_ASSEMBLER > JSC::ExecutableAllocator *getExecutableAllocator(JSContext *cx) { > return execAlloc_ ? execAlloc_ : createExecutableAllocator(cx); > } >+#endif > WTF::BumpPointerAllocator *getBumpPointerAllocator(JSContext *cx) { > return bumpAlloc_ ? bumpAlloc_ : createBumpPointerAllocator(cx); > } >Index: xulrunner-12.0/mozilla-release/js/src/jsprvtd.h >=================================================================== >--- xulrunner-12.0.orig/mozilla-release/js/src/jsprvtd.h >+++ xulrunner-12.0/mozilla-release/js/src/jsprvtd.h >@@ -329,12 +329,13 @@ typedef Handle<Value> Handl > > } /* namespace js */ > >+#if ENABLE_ASSEMBLER > namespace JSC { > > class ExecutableAllocator; > > } /* namespace JSC */ >- >+#endif > namespace WTF { > > class BumpPointerAllocator; >Index: xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h >=================================================================== >--- xulrunner-12.0.orig/mozilla-release/js/src/vm/RegExpObject-inl.h >+++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h >@@ -357,6 +357,7 @@ detail::RegExpPrivate::create(JSContext > return RetType(priv); > } > >+#if ENABLE_YARR_JIT > /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ > inline bool > detail::RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) >@@ -367,12 +368,12 @@ detail::RegExpPrivateCode::isJITRuntimeE > return true; > #endif > } >+#endif > > inline bool > detail::RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, > uintN *parenCount, RegExpFlag flags) > { >-#if ENABLE_YARR_JIT > /* Parse the pattern. */ > ErrorCode yarrError; > YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), >@@ -389,7 +390,7 @@ detail::RegExpPrivateCode::compile(JSCon > * case we have to bytecode compile it. > */ > >-#ifdef JS_METHODJIT >+#if ENABLE_YARR_JIT && defined(JS_METHODJIT) > if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { > JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); > if (!execAlloc) { >@@ -410,21 +411,11 @@ detail::RegExpPrivateCode::compile(JSCon > return false; > } > >+#if ENABLE_YARR_JIT > codeBlock.setFallBack(true); >+#endif > byteCode = byteCompile(yarrPattern, bumpAlloc).get(); > return true; >-#else /* !defined(ENABLE_YARR_JIT) */ >- int error = 0; >- compiled = jsRegExpCompile(pattern.chars(), pattern.length(), >- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase, >- multiline() ? JSRegExpMultiline : JSRegExpSingleLine, >- parenCount, &error); >- if (error) { >- reportPCREError(cx, error); >- return false; >- } >- return true; >-#endif > } > > inline bool >@@ -466,19 +457,12 @@ detail::RegExpPrivateCode::execute(JSCon > else > result = JSC::Yarr::execute(codeBlock, chars, start, length, output); > #else >- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount); >+ result = JSC::Yarr::interpret(byteCode, chars, start, length, output); > #endif > > if (result == -1) > return RegExpRunStatus_Success_NotFound; > >-#if !ENABLE_YARR_JIT >- if (result < 0) { >- reportPCREError(cx, result); >- return RegExpRunStatus_Error; >- } >-#endif >- > JS_ASSERT(result >= 0); > return RegExpRunStatus_Success; > } >Index: xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp >=================================================================== >--- xulrunner-12.0.orig/mozilla-release/js/src/vm/RegExpObject.cpp >+++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp >@@ -392,7 +392,6 @@ Class js::RegExpClass = { > regexp_trace > }; > >-#if ENABLE_YARR_JIT > void > RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) > { >@@ -424,42 +423,6 @@ RegExpPrivateCode::reportYarrError(JSCon > } > } > >-#else /* !ENABLE_YARR_JIT */ >- >-void >-RegExpPrivateCode::reportPCREError(JSContext *cx, int error) >-{ >-#define REPORT(msg_) \ >- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \ >- return >- switch (error) { >- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX); >- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred."); >- case 1: REPORT(JSMSG_TRAILING_SLASH); >- case 2: REPORT(JSMSG_TRAILING_SLASH); >- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX); >- case 4: REPORT(JSMSG_BAD_QUANTIFIER); >- case 5: REPORT(JSMSG_BAD_QUANTIFIER); >- case 6: REPORT(JSMSG_BAD_CLASS_RANGE); >- case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX); >- case 8: REPORT(JSMSG_BAD_CLASS_RANGE); >- case 9: REPORT(JSMSG_BAD_QUANTIFIER); >- case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); >- case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX); >- case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN); >- case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX); >- case 14: REPORT(JSMSG_MISSING_PAREN); >- case 15: REPORT(JSMSG_BAD_BACKREF); >- case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX); >- case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX); >- default: >- JS_NOT_REACHED("Precondition violation: unknown PCRE error code."); >- } >-#undef REPORT >-} >- >-#endif /* ENABLE_YARR_JIT */ >- > bool > js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut) > { >Index: xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h >=================================================================== >--- xulrunner-12.0.orig/mozilla-release/js/src/vm/RegExpObject.h >+++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h >@@ -52,8 +52,6 @@ > #if ENABLE_YARR_JIT > #include "yarr/YarrJIT.h" > #include "yarr/YarrSyntaxChecker.h" >-#else >-#include "yarr/pcre/pcre.h" > #endif > > namespace js { >@@ -242,40 +240,33 @@ static const jschar GreedyStarChars[] = > /* Abstracts away the gross |RegExpPrivate| backend details. */ > class RegExpPrivateCode > { >-#if ENABLE_YARR_JIT > typedef JSC::Yarr::BytecodePattern BytecodePattern; > typedef JSC::Yarr::ErrorCode ErrorCode; >+ typedef JSC::Yarr::YarrPattern YarrPattern; >+#if ENABLE_YARR_JIT > typedef JSC::Yarr::JSGlobalData JSGlobalData; > typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock; >- typedef JSC::Yarr::YarrPattern YarrPattern; > > /* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */ > YarrCodeBlock codeBlock; >- BytecodePattern *byteCode; >-#else >- JSRegExp *compiled; > #endif >+ BytecodePattern *byteCode; > > public: > RegExpPrivateCode() > : > #if ENABLE_YARR_JIT > codeBlock(), >- byteCode(NULL) >-#else >- compiled(NULL) > #endif >+ byteCode(NULL) > { } > > ~RegExpPrivateCode() { > #if ENABLE_YARR_JIT > codeBlock.release(); >+#endif > if (byteCode) > Foreground::delete_<BytecodePattern>(byteCode); >-#else >- if (compiled) >- jsRegExpFree(compiled); >-#endif > } > > static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) { >@@ -287,23 +278,17 @@ class RegExpPrivateCode > reportYarrError(cx, tokenStream, error); > return false; > #else >-# error "Syntax checking not implemented for !ENABLE_YARR_JIT" >+ return true; /* XXX! */ > #endif > } > > #if ENABLE_YARR_JIT > static inline bool isJITRuntimeEnabled(JSContext *cx); >- static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); >-#else >- static void reportPCREError(JSContext *cx, int error); > #endif >+ static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); > > 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 > } > > inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount, >Index: xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h >=================================================================== >--- xulrunner-12.0.orig/mozilla-release/js/src/yarr/wtfbridge.h >+++ xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h >@@ -49,9 +49,7 @@ > #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 { > >Index: xulrunner-12.0/mozilla-release/js/src/jsapi.cpp >=================================================================== >--- xulrunner-12.0.orig/mozilla-release/js/src/jsapi.cpp >+++ xulrunner-12.0/mozilla-release/js/src/jsapi.cpp >@@ -699,7 +699,9 @@ JSRuntime::JSRuntime() > ownerThread_(NULL), > #endif > tempLifoAlloc(TEMP_LIFO_ALLOC_PRIMARY_CHUNK_SIZE), >+#if ENABLE_ASSEMBLER > execAlloc_(NULL), >+#endif > bumpAlloc_(NULL), > repCache_(NULL), > interpreterFrames(NULL), >@@ -840,8 +842,9 @@ JSRuntime::init(uint32_t maxbytes) > JSRuntime::~JSRuntime() > { > JS_ASSERT(onOwnerThread()); >- >+#if ENABLE_ASSEMBLER > delete_<JSC::ExecutableAllocator>(execAlloc_); >+#endif > delete_<WTF::BumpPointerAllocator>(bumpAlloc_); > JS_ASSERT(!repCache_); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 814879
: 580226 |
580229
|
580231