git: 760a1742ba6c - main - lang/spidermonkey185: Fix build with clang 12
Danilo G. Baio
dbaio at FreeBSD.org
Sun May 23 23:00:51 UTC 2021
The branch main has been updated by dbaio:
URL: https://cgit.FreeBSD.org/ports/commit/?id=760a1742ba6c55d815211aadbaff10ca9acee76e
commit 760a1742ba6c55d815211aadbaff10ca9acee76e
Author: Dimitry Andric <dim at FreeBSD.org>
AuthorDate: 2021-05-23 22:51:24 +0000
Commit: Danilo G. Baio <dbaio at FreeBSD.org>
CommitDate: 2021-05-23 22:58:48 +0000
lang/spidermonkey185: Fix build with clang 12
PR: 256007
Approved by: koobs (maintainer)
---
lang/spidermonkey185/files/patch-c++11 | 44 ++++++++++++++++++++++
.../files/patch-methodjit_MethodJIT.cpp | 38 +++++++++++++++++++
2 files changed, 82 insertions(+)
diff --git a/lang/spidermonkey185/files/patch-c++11 b/lang/spidermonkey185/files/patch-c++11
index 95a68426f5de..525c295b3332 100644
--- a/lang/spidermonkey185/files/patch-c++11
+++ b/lang/spidermonkey185/files/patch-c++11
@@ -123,6 +123,15 @@ jsxml.cpp:434:20: error: cannot initialize return object of type 'JSString *' wi
JS_ASSERT(!shape->configurable());
--- jsiter.cpp.orig 2011-03-31 19:08:36 UTC
+++ jsiter.cpp
+@@ -267,7 +267,7 @@ Snapshot(JSContext *cx, JSObject *obj, uintN flags, Au
+ */
+ IdSet ht(cx);
+ if (!ht.init(32))
+- return NULL;
++ return false;
+
+ JSObject *pobj = obj;
+ do {
@@ -425,7 +425,7 @@ NewIteratorObject(JSContext *cx, uintN flags)
*/
JSObject *obj = js_NewGCObject(cx, FINALIZE_OBJECT0);
@@ -134,6 +143,23 @@ jsxml.cpp:434:20: error: cannot initialize return object of type 'JSString *' wi
return obj;
--- jsparse.cpp.orig 2011-03-31 19:08:36 UTC
+++ jsparse.cpp
+@@ -1821,14 +1821,14 @@ Compiler::compileFunctionBody(JSContext *cx, JSFunctio
+
+ JSCodeGenerator funcg(&parser, &codePool, ¬ePool, tokenStream.getLineno());
+ if (!funcg.init())
+- return NULL;
++ return false;
+
+ funcg.flags |= TCF_IN_FUNCTION;
+ funcg.setFunction(fun);
+ funcg.bindings.transfer(cx, bindings);
+ fun->setArgCount(funcg.bindings.countArgs());
+ if (!GenerateBlockId(&funcg, funcg.bodyid))
+- return NULL;
++ return false;
+
+ /* FIXME: make Function format the source for a function definition. */
+ tokenStream.mungeCurrentToken(TOK_NAME);
@@ -3352,7 +3352,7 @@ Parser::functionDef(JSAtom *funAtom, FunctionType type
if (!outertc->inFunction() && bodyLevel && funAtom && !lambda && outertc->compiling()) {
JS_ASSERT(pn->pn_cookie.isFree());
@@ -143,6 +169,15 @@ jsxml.cpp:434:20: error: cannot initialize return object of type 'JSString *' wi
}
pn->pn_blockid = outertc->blockid();
+@@ -5058,7 +5058,7 @@ RebindLets(JSParseNode *pn, JSTreeContext *tc)
+ if (!ale) {
+ ale = MakePlaceholder(pn, tc);
+ if (!ale)
+- return NULL;
++ return false;
+ }
+ LinkUseToDef(pn, ALE_DEFN(ale), tc);
+ }
--- jsstr.cpp.orig 2011-03-31 19:08:36 UTC
+++ jsstr.cpp
@@ -1734,7 +1734,7 @@ class RegExpGuard
@@ -154,6 +189,15 @@ jsxml.cpp:434:20: error: cannot initialize return object of type 'JSString *' wi
} else {
patstr = fm.patstr;
}
+@@ -2276,7 +2276,7 @@ BuildDollarReplacement(JSContext *cx, JSString *textst
+ {
+ JSLinearString *textstr = textstrArg->ensureLinear(cx);
+ if (!textstr)
+- return NULL;
++ return false;
+
+ JS_ASSERT(repstr->chars() <= firstDollar && firstDollar < repstr->chars() + repstr->length());
+ size_t matchStart = fm.match();
@@ -3400,7 +3400,7 @@ js_InitStringClass(JSContext *cx, JSObject *obj)
UndefinedValue(), NULL, NULL,
JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_SHARED, 0, 0,
diff --git a/lang/spidermonkey185/files/patch-methodjit_MethodJIT.cpp b/lang/spidermonkey185/files/patch-methodjit_MethodJIT.cpp
new file mode 100644
index 000000000000..b886520e9bd8
--- /dev/null
+++ b/lang/spidermonkey185/files/patch-methodjit_MethodJIT.cpp
@@ -0,0 +1,38 @@
+--- methodjit/MethodJIT.cpp.orig 2011-03-31 19:08:36 UTC
++++ methodjit/MethodJIT.cpp
+@@ -189,7 +189,7 @@ JS_STATIC_ASSERT(offsetof(VMFrame, regs.fp) == 0x38);
+ JS_STATIC_ASSERT(JSVAL_TAG_MASK == 0xFFFF800000000000LL);
+ JS_STATIC_ASSERT(JSVAL_PAYLOAD_MASK == 0x00007FFFFFFFFFFFLL);
+
+-asm volatile (
++asm (
+ ".text\n"
+ ".globl " SYMBOL_STRING(JaegerTrampoline) "\n"
+ SYMBOL_STRING(JaegerTrampoline) ":" "\n"
+@@ -236,7 +236,7 @@ SYMBOL_STRING(JaegerTrampoline) ":" "\n"
+ "jmp *0(%rsp)" "\n"
+ );
+
+-asm volatile (
++asm (
+ ".text\n"
+ ".globl " SYMBOL_STRING(JaegerTrampolineReturn) "\n"
+ SYMBOL_STRING(JaegerTrampolineReturn) ":" "\n"
+@@ -256,7 +256,7 @@ SYMBOL_STRING(JaegerTrampolineReturn) ":" "\n"
+ "ret" "\n"
+ );
+
+-asm volatile (
++asm (
+ ".text\n"
+ ".globl " SYMBOL_STRING(JaegerThrowpoline) "\n"
+ SYMBOL_STRING(JaegerThrowpoline) ":" "\n"
+@@ -281,7 +281,7 @@ SYMBOL_STRING(JaegerThrowpoline) ":" "\n"
+
+ JS_STATIC_ASSERT(offsetof(VMFrame, regs.fp) == 0x38);
+
+-asm volatile (
++asm (
+ ".text\n"
+ ".globl " SYMBOL_STRING(InjectJaegerReturn) "\n"
+ SYMBOL_STRING(InjectJaegerReturn) ":" "\n"
More information about the dev-commits-ports-all
mailing list