[packages/js185] - added c++ patch (C++ fixes)

qboosh qboosh at pld-linux.org
Sun Sep 2 17:23:31 CEST 2018


commit 6c663e598197188b083c3d24387aacdc9fbf75bb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Sep 2 17:26:23 2018 +0200

    - added c++ patch (C++ fixes)

 js185-c++.patch | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 js185.spec      |   2 +
 2 files changed, 137 insertions(+)
---
diff --git a/js185.spec b/js185.spec
index 7a575fd..092d073 100644
--- a/js185.spec
+++ b/js185.spec
@@ -17,6 +17,7 @@ Group:		Development/Languages
 Source0:	http://ftp.mozilla.org/pub/mozilla.org/js/%{name}-%{version}.tar.gz
 # Source0-md5:	a4574365938222adca0a6bd33329cb32
 Patch0:		%{name}-install.patch
+Patch1:		%{name}-c++.patch
 URL:		http://www.mozilla.org/js/
 BuildRequires:	libstdc++-devel
 BuildRequires:	nspr-devel >= 4.7.0
@@ -97,6 +98,7 @@ Statyczna wersja biblioteki JavaScript 1.8.5.
 %prep
 %setup -q -n js-1.8.5
 %patch0 -p1
+%patch1 -p1
 
 sed -i -e 's/-O3//' js/src/Makefile.in js/src/config/Makefile.in
 
diff --git a/js185-c++.patch b/js185-c++.patch
new file mode 100644
index 0000000..5d6f261
--- /dev/null
+++ b/js185-c++.patch
@@ -0,0 +1,135 @@
+--- js-1.8.5/js/src/jsapi.cpp.orig	2011-03-31 21:08:36.000000000 +0200
++++ js-1.8.5/js/src/jsapi.cpp	2018-09-02 14:14:10.667657383 +0200
+@@ -3985,7 +3985,7 @@
+     AutoIdVector props(cx);
+     JSIdArray *ida;
+     if (!GetPropertyNames(cx, obj, JSITER_OWNONLY, &props) || !VectorToIdArray(cx, props, &ida))
+-        return false;
++        return NULL;
+     for (size_t n = 0; n < size_t(ida->length); ++n)
+         JS_ASSERT(js_CheckForStringIndex(ida->vector[n]) == ida->vector[n]);
+     return ida;
+--- js-1.8.5/js/src/jsfun.cpp.orig	2011-03-31 21:08:36.000000000 +0200
++++ js-1.8.5/js/src/jsfun.cpp	2018-09-02 14:31:53.406679322 +0200
+@@ -2051,7 +2051,7 @@
+ 
+     JSString *str = JS_DecompileFunction(cx, fun, indent);
+     if (!str)
+-        return false;
++        return NULL;
+ 
+     if (!indent)
+         cx->compartment->toSourceCache.put(fun, str);
+@@ -2657,7 +2657,7 @@
+     const Shape *shape = funobj->nativeLookup(id);
+     if (!shape) {
+         if (!ResolveInterpretedFunctionPrototype(cx, funobj))
+-            return false;
++            return NULL;
+         shape = funobj->nativeLookup(id);
+     }
+     JS_ASSERT(!shape->configurable());
+--- js-1.8.5/js/src/jsiter.cpp.orig	2011-03-31 21:08:36.000000000 +0200
++++ js-1.8.5/js/src/jsiter.cpp	2018-09-02 15:19:42.730611626 +0200
+@@ -425,7 +425,7 @@
+          */
+         JSObject *obj = js_NewGCObject(cx, FINALIZE_OBJECT0);
+         if (!obj)
+-            return false;
++            return NULL;
+         obj->init(cx, &js_IteratorClass, NULL, NULL, NULL, false);
+         obj->setMap(cx->compartment->emptyEnumeratorShape);
+         return obj;
+--- js-1.8.5/js/src/jsparse.cpp.orig	2011-03-31 21:08:36.000000000 +0200
++++ js-1.8.5/js/src/jsparse.cpp	2018-09-02 15:21:43.750307087 +0200
+@@ -3352,7 +3352,7 @@
+     if (!outertc->inFunction() && bodyLevel && funAtom && !lambda && outertc->compiling()) {
+         JS_ASSERT(pn->pn_cookie.isFree());
+         if (!DefineGlobal(pn, outertc->asCodeGenerator(), funAtom))
+-            return false;
++            return NULL;
+     }
+ 
+     pn->pn_blockid = outertc->blockid();
+--- js-1.8.5/js/src/jsstr.cpp.orig	2011-03-31 21:08:36.000000000 +0200
++++ js-1.8.5/js/src/jsstr.cpp	2018-09-02 15:25:48.409827842 +0200
+@@ -1734,7 +1734,7 @@
+         if (flat) {
+             patstr = flattenPattern(cx, fm.patstr);
+             if (!patstr)
+-                return false;
++                return NULL;
+         } else {
+             patstr = fm.patstr;
+         }
+@@ -3400,7 +3400,7 @@
+                                  UndefinedValue(), NULL, NULL,
+                                  JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_SHARED, 0, 0,
+                                  NULL)) {
+-        return JS_FALSE;
++        return NULL;
+     }
+ 
+     return proto;
+--- js-1.8.5/js/src/jstypedarray.cpp.orig	2011-03-31 21:08:36.000000000 +0200
++++ js-1.8.5/js/src/jstypedarray.cpp	2018-09-02 15:27:01.783682808 +0200
+@@ -1334,7 +1334,7 @@
+         if (size != 0 && count >= INT32_MAX / size) {
+             JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
+                                  JSMSG_NEED_DIET, "size and count");
+-            return false;
++            return NULL;
+         }
+ 
+         int32 bytelen = size * count;
+@@ -1668,7 +1668,7 @@
+ 
+       default:
+         JS_NOT_REACHED("shouldn't have gotten here");
+-        return false;
++        return NULL;
+     }
+ }
+ 
+--- js-1.8.5/js/src/jsxml.cpp.orig	2011-03-31 21:08:36.000000000 +0200
++++ js-1.8.5/js/src/jsxml.cpp	2018-09-02 15:40:48.813803316 +0200
+@@ -282,7 +282,7 @@
+ 
+     obj = NewBuiltinClassInstanceXML(cx, &js_NamespaceClass);
+     if (!obj)
+-        return JS_FALSE;
++        return NULL;
+     JS_ASSERT(JSVAL_IS_VOID(obj->getNamePrefixVal()));
+     JS_ASSERT(JSVAL_IS_VOID(obj->getNameURIVal()));
+     JS_ASSERT(JSVAL_IS_VOID(obj->getNamespaceDeclared()));
+@@ -431,7 +431,7 @@
+         size_t length = str->length();
+         jschar *chars = (jschar *) cx->malloc((length + 2) * sizeof(jschar));
+         if (!chars)
+-            return JS_FALSE;
++            return NULL;
+         *chars = '@';
+         const jschar *strChars = str->getChars(cx);
+         if (!strChars) {
+--- js-1.8.5/js/src/nanojit/NativeX64.cpp.orig	2011-03-31 21:08:36.000000000 +0200
++++ js-1.8.5/js/src/nanojit/NativeX64.cpp	2018-09-02 15:48:04.513368468 +0200
+@@ -1899,7 +1899,7 @@
+          }
+     }
+ 
+-    static const AVMPLUS_ALIGN16(int64_t) negateMask[] = {0x8000000000000000LL,0};
++    static const AVMPLUS_ALIGN16(uint64_t) negateMask[] = {0x8000000000000000LL,0};
+ 
+     void Assembler::asm_fneg(LIns *ins) {
+         Register rr, ra;
+--- js-1.8.5/js/src/methodjit/InvokeHelpers.cpp.orig	2011-03-31 21:08:36.000000000 +0200
++++ js-1.8.5/js/src/methodjit/InvokeHelpers.cpp	2018-09-02 15:49:54.585820067 +0200
+@@ -728,7 +728,7 @@
+ {
+     JSStackFrame *fp = cx->fp();
+     if (fp->hasImacropc())
+-        return false;
++        return NULL;
+ 
+     JSScript *script = fp->script();
+     return script->maybeNativeCodeForPC(fp->isConstructing(), cx->regs->pc);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/js185.git/commitdiff/6c663e598197188b083c3d24387aacdc9fbf75bb



More information about the pld-cvs-commit mailing list