pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/firefox31 Clang warns about implicit nullptr -> bo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0fd7e18a331d
branches:  trunk
changeset: 652452:0fd7e18a331d
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Jun 02 20:04:43 2015 +0000

description:
Clang warns about implicit nullptr -> bool casts, so avoid them.
Use three register form ofo orrhi for GAS compatibility.

diffstat:

 www/firefox31/distinfo                                           |    6 +-
 www/firefox31/patches/patch-js_src_builtin_TypedObject.cpp       |  142 ++++++++++
 www/firefox31/patches/patch-js_src_frontend_BytecodeCompiler.cpp |   13 +
 www/firefox31/patches/patch-media_libtheora_lib_arm_armbits.s    |   40 +-
 4 files changed, 187 insertions(+), 14 deletions(-)

diffs (300 lines):

diff -r bee52a3771e6 -r 0fd7e18a331d www/firefox31/distinfo
--- a/www/firefox31/distinfo    Tue Jun 02 20:02:45 2015 +0000
+++ b/www/firefox31/distinfo    Tue Jun 02 20:04:43 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2015/05/26 12:18:23 ryoon Exp $
+$NetBSD: distinfo,v 1.13 2015/06/02 20:04:43 joerg Exp $
 
 SHA1 (firefox-31.7.0esr.source.tar.bz2) = d8c79d4228c15ff903e79362d2392401329e027f
 RMD160 (firefox-31.7.0esr.source.tar.bz2) = 1f04f235a3b2b0f2ac5d33951ae04e2131e5fff7
@@ -82,7 +82,9 @@
 SHA1 (patch-js__src__vm__SPSProfiler.cpp) = 989ba25e4c5308d21d07baa802decce13609a475
 SHA1 (patch-js_src_Makefile.in) = 780e408dfddfd90c6013b316e2e52800c62eee5e
 SHA1 (patch-js_src_assembler_jit_ExecutableAllocator.h) = 819180c7ba72dc2641fe6cdce373f492e73cb5ff
+SHA1 (patch-js_src_builtin_TypedObject.cpp) = 46579b0f981a36de46f9006f64cc38eb25f55b88
 SHA1 (patch-js_src_ctypes_CTypes.h) = 768a084239f92a424c1c7dc9eaaf9be9456ca9f0
+SHA1 (patch-js_src_frontend_BytecodeCompiler.cpp) = 21b03691058598482361210601ba225c2bc44008
 SHA1 (patch-js_src_frontend_ParseMaps.cpp) = c00117d79b78904bc50a1d664a8fc0e4e339bfbc
 SHA1 (patch-js_src_gc_Memory.cpp) = 872db8ab6d86ca25956bf3e1b396ab46f8573cf0
 SHA1 (patch-js_src_jit_AsmJSModule.cpp) = 7e1876ef605f783889ae811c96bbf31d766aee6e
@@ -99,7 +101,7 @@
 SHA1 (patch-media_libpng_pngpriv.h) = c9cefd1b5dd85fbd0c875c3f9bc108975398fe3a
 SHA1 (patch-media_libsoundtouch_src_cpu__detect__x86.cpp) = db61737afa7773e8cbd82976de3a02c917174696
 SHA1 (patch-media_libtheora_Makefile.in) = 80ac9cb20760fe4d94047f7cb1c6a16bbdd6b505
-SHA1 (patch-media_libtheora_lib_arm_armbits.s) = 26fed6cf160adcb3bb8cafac9fb1a5722a9b620f
+SHA1 (patch-media_libtheora_lib_arm_armbits.s) = aca0505651b7f2780c297273e0c23e0d273d64ed
 SHA1 (patch-media_libtheora_lib_arm_armcpu.c) = c9a14ab4b34caf718ba0a35388b2cb1c31ddc733
 SHA1 (patch-media_libtheora_lib_arm_armfrag.s) = 7458ac02d891920cd40201a242c4603afae01509
 SHA1 (patch-media_libtheora_lib_arm_armidct.s) = d0a2c53431c79a705427bc92219e09d76dd83097
diff -r bee52a3771e6 -r 0fd7e18a331d www/firefox31/patches/patch-js_src_builtin_TypedObject.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox31/patches/patch-js_src_builtin_TypedObject.cpp        Tue Jun 02 20:04:43 2015 +0000
@@ -0,0 +1,142 @@
+$NetBSD: patch-js_src_builtin_TypedObject.cpp,v 1.3 2015/06/02 20:04:43 joerg Exp $
+
+--- js/src/builtin/TypedObject.cpp.orig        2015-05-30 18:52:27.000000000 +0000
++++ js/src/builtin/TypedObject.cpp
+@@ -710,12 +710,12 @@ ArrayMetaTypeDescr::construct(JSContext*
+     contents.append(")");
+     RootedAtom stringRepr(cx, contents.finishAtom());
+     if (!stringRepr)
+-        return nullptr;
++        return false;
+ 
+     // Extract ArrayType.prototype
+     RootedObject arrayTypePrototype(cx, GetPrototype(cx, arrayTypeGlobal));
+     if (!arrayTypePrototype)
+-        return nullptr;
++        return false;
+ 
+     // Create the instance of ArrayType
+     Rooted<UnsizedArrayTypeDescr*> obj(cx);
+@@ -728,7 +728,7 @@ ArrayMetaTypeDescr::construct(JSContext*
+     if (!JSObject::defineProperty(cx, obj, cx->names().length,
+                                   UndefinedHandleValue, nullptr, nullptr,
+                                   JSPROP_READONLY | JSPROP_PERMANENT))
+-        return nullptr;
++        return false;
+ 
+     args.rval().setObject(*obj);
+     return true;
+@@ -762,7 +762,7 @@ UnsizedArrayTypeDescr::dimension(JSConte
+     if (!size.isValid()) {
+         JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
+                              JSMSG_TYPEDOBJECT_TOO_BIG);
+-        return nullptr;
++        return false;
+     }
+ 
+     // Construct a canonical string `new ArrayType(<elementType>).dimension(N)`:
+@@ -775,7 +775,7 @@ UnsizedArrayTypeDescr::dimension(JSConte
+     contents.append(")");
+     RootedAtom stringRepr(cx, contents.finishAtom());
+     if (!stringRepr)
+-        return nullptr;
++        return false;
+ 
+     // Create the sized type object.
+     Rooted<SizedArrayTypeDescr*> obj(cx);
+@@ -793,7 +793,7 @@ UnsizedArrayTypeDescr::dimension(JSConte
+     if (!JSObject::defineProperty(cx, obj, cx->names().length,
+                                   lengthVal, nullptr, nullptr,
+                                   JSPROP_READONLY | JSPROP_PERMANENT))
+-        return nullptr;
++        return false;
+ 
+     // Add `unsized` property, which is a link from the sized
+     // array to the unsized array.
+@@ -801,7 +801,7 @@ UnsizedArrayTypeDescr::dimension(JSConte
+     if (!JSObject::defineProperty(cx, obj, cx->names().unsized,
+                                   unsizedTypeDescrValue, nullptr, nullptr,
+                                   JSPROP_READONLY | JSPROP_PERMANENT))
+-        return nullptr;
++        return false;
+ 
+     args.rval().setObject(*obj);
+     return true;
+@@ -1253,7 +1253,7 @@ DefineSimpleTypeDescr(JSContext* cx,
+     Rooted<TypedProto*> proto(cx);
+     proto = NewObjectWithProto<TypedProto>(cx, objProto, nullptr, TenuredObject);
+     if (!proto)
+-        return nullptr;
++        return false;
+     proto->initTypeDescrSlot(*descr);
+     descr->initReservedSlot(JS_DESCR_SLOT_TYPROTO, ObjectValue(*proto));
+ 
+@@ -1358,14 +1358,14 @@ GlobalObject::initTypedObjectModule(JSCo
+ #define BINARYDATA_SCALAR_DEFINE(constant_, type_, name_)                       \
+     if (!DefineSimpleTypeDescr<ScalarTypeDescr>(cx, global, module, constant_,      \
+                                             cx->names().name_))                 \
+-        return nullptr;
++        return false;
+     JS_FOR_EACH_SCALAR_TYPE_REPR(BINARYDATA_SCALAR_DEFINE)
+ #undef BINARYDATA_SCALAR_DEFINE
+ 
+ #define BINARYDATA_REFERENCE_DEFINE(constant_, type_, name_)                    \
+     if (!DefineSimpleTypeDescr<ReferenceTypeDescr>(cx, global, module, constant_,   \
+                                                cx->names().name_))              \
+-        return nullptr;
++        return false;
+     JS_FOR_EACH_REFERENCE_TYPE_REPR(BINARYDATA_REFERENCE_DEFINE)
+ #undef BINARYDATA_REFERENCE_DEFINE
+ 
+@@ -1375,14 +1375,14 @@ GlobalObject::initTypedObjectModule(JSCo
+     arrayType = DefineMetaTypeDescr<ArrayMetaTypeDescr>(
+         cx, global, module, TypedObjectModuleObject::ArrayTypePrototype);
+     if (!arrayType)
+-        return nullptr;
++        return false;
+ 
+     RootedValue arrayTypeValue(cx, ObjectValue(*arrayType));
+     if (!JSObject::defineProperty(cx, module, cx->names().ArrayType,
+                                   arrayTypeValue,
+                                   nullptr, nullptr,
+                                   JSPROP_READONLY | JSPROP_PERMANENT))
+-        return nullptr;
++        return false;
+ 
+     // StructType.
+ 
+@@ -1390,14 +1390,14 @@ GlobalObject::initTypedObjectModule(JSCo
+     structType = DefineMetaTypeDescr<StructMetaTypeDescr>(
+         cx, global, module, TypedObjectModuleObject::StructTypePrototype);
+     if (!structType)
+-        return nullptr;
++        return false;
+ 
+     RootedValue structTypeValue(cx, ObjectValue(*structType));
+     if (!JSObject::defineProperty(cx, module, cx->names().StructType,
+                                   structTypeValue,
+                                   nullptr, nullptr,
+                                   JSPROP_READONLY | JSPROP_PERMANENT))
+-        return nullptr;
++        return false;
+ 
+     // Everything is setup, install module on the global object:
+     RootedValue moduleValue(cx, ObjectValue(*module));
+@@ -1407,7 +1407,7 @@ GlobalObject::initTypedObjectModule(JSCo
+                                   nullptr, nullptr,
+                                   0))
+     {
+-        return nullptr;
++        return false;
+     }
+ 
+     return module;
+@@ -2466,7 +2466,7 @@ TypedObject::constructUnsized(JSContext*
+         if (length < 0) {
+             JS_ReportErrorNumber(cx, js_GetErrorMessage,
+                                  nullptr, JSMSG_TYPEDOBJECT_BAD_ARGS);
+-            return nullptr;
++            return false;
+         }
+         Rooted<TypedObject*> obj(cx, createZeroed(cx, callee, length));
+         if (!obj)
diff -r bee52a3771e6 -r 0fd7e18a331d www/firefox31/patches/patch-js_src_frontend_BytecodeCompiler.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox31/patches/patch-js_src_frontend_BytecodeCompiler.cpp  Tue Jun 02 20:04:43 2015 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-js_src_frontend_BytecodeCompiler.cpp,v 1.3 2015/06/02 20:04:43 joerg Exp $
+
+--- js/src/frontend/BytecodeCompiler.cpp.orig  2015-05-30 18:55:53.000000000 +0000
++++ js/src/frontend/BytecodeCompiler.cpp
+@@ -544,7 +544,7 @@ CompileFunctionBody(JSContext* cx, Mutab
+ 
+     RootedScriptSource sourceObject(cx, CreateScriptSourceObject(cx, options));
+     if (!sourceObject)
+-        return nullptr;
++        return false;
+     ScriptSource* ss = sourceObject->source();
+ 
+     SourceCompressionTask sct(cx);
diff -r bee52a3771e6 -r 0fd7e18a331d www/firefox31/patches/patch-media_libtheora_lib_arm_armbits.s
--- a/www/firefox31/patches/patch-media_libtheora_lib_arm_armbits.s     Tue Jun 02 20:02:45 2015 +0000
+++ b/www/firefox31/patches/patch-media_libtheora_lib_arm_armbits.s     Tue Jun 02 20:04:43 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-media_libtheora_lib_arm_armbits.s,v 1.1 2015/04/28 12:06:34 joerg Exp $
+$NetBSD: patch-media_libtheora_lib_arm_armbits.s,v 1.2 2015/06/02 20:04:43 joerg Exp $
 
 --- media/libtheora/lib/arm/armbits.s.orig     2015-04-10 13:06:36.000000000 +0000
 +++ media/libtheora/lib/arm/armbits.s
@@ -10,7 +10,7 @@
        AREA    |.text|, CODE, READONLY
  
        ; Explicitly specifying alignment here because some versions of
-@@ -73,25 +74,25 @@ oc_pack_read_refill
+@@ -73,28 +74,28 @@ oc_pack_read_refill
  ;  negative.
        CMP r10,r11            ; ptr<stop => HI
        CMPHI r3,#7            ;   available<=24 => HI
@@ -18,28 +18,35 @@
 +      LDRBHI r14,[r11],#1    ;     r14 = *ptr++
        SUBHI r3,#8            ;     available += 8
        ; (HI) Stall...
-       ORRHI r2,r14,LSL r3    ;     r2 = window|=r14<<32-available
+-      ORRHI r2,r14,LSL r3    ;     r2 = window|=r14<<32-available
++      ORRHI r2,r2,r14,LSL r3    ;     r2 = window|=r14<<32-available
        CMPHI r10,r11          ;     ptr<stop => HI
        CMPHI r3,#7            ;       available<=24 => HI
 -      LDRHIB r14,[r11],#1    ;         r14 = *ptr++
 +      LDRBHI r14,[r11],#1    ;         r14 = *ptr++
        SUBHI r3,#8            ;         available += 8
        ; (HI) Stall...
-       ORRHI r2,r14,LSL r3    ;         r2 = window|=r14<<32-available
+-      ORRHI r2,r14,LSL r3    ;         r2 = window|=r14<<32-available
++      ORRHI r2,r2,r14,LSL r3    ;         r2 = window|=r14<<32-available
        CMPHI r10,r11          ;         ptr<stop => HI
        CMPHI r3,#7            ;           available<=24 => HI
 -      LDRHIB r14,[r11],#1    ;             r14 = *ptr++
 +      LDRBHI r14,[r11],#1    ;             r14 = *ptr++
        SUBHI r3,#8            ;             available += 8
        ; (HI) Stall...
-       ORRHI r2,r14,LSL r3    ;             r2 = window|=r14<<32-available
+-      ORRHI r2,r14,LSL r3    ;             r2 = window|=r14<<32-available
++      ORRHI r2,r2,r14,LSL r3    ;             r2 = window|=r14<<32-available
        CMPHI r10,r11          ;             ptr<stop => HI
        CMPHI r3,#7            ;               available<=24 => HI
 -      LDRHIB r14,[r11],#1    ;                 r14 = *ptr++
 +      LDRBHI r14,[r11],#1    ;                 r14 = *ptr++
        SUBHI r3,#8            ;                 available += 8
        ; (HI) Stall...
-       ORRHI r2,r14,LSL r3    ;                 r2 = window|=r14<<32-available
+-      ORRHI r2,r14,LSL r3    ;                 r2 = window|=r14<<32-available
++      ORRHI r2,r2,r14,LSL r3    ;                 r2 = window|=r14<<32-available
+       SUBS r3,r0,r3          ; r3 = available-=_bits, available<bits => GT
+       BLT oc_pack_read_refill_last
+       MOV r0,r2,LSR r0       ; r0 = window>>32-_bits
 @@ -110,7 +111,7 @@ oc_pack_read_refill_last
        CMP r11,r10            ; ptr<stop => LO
  ; If we didn't hit the end of the packet, then pull enough of the next byte to
@@ -49,7 +56,7 @@
  ; Otherwise, set the EOF flag and pretend we have lots of available bits.
        MOVHS r14,#1           ; (HS) r14 = 1
        ADDLO r10,r3,r1        ; (LO) r10 = available
-@@ -189,12 +190,12 @@ oc_huff_token_decode_refill
+@@ -189,32 +190,32 @@ oc_huff_token_decode_refill
  ; We can't possibly need more than 15 bits, so available must be <= 15.
  ; Therefore we can load at least two bytes without checking it.
        CMP r2,r3              ; ptr<stop => HI
@@ -57,14 +64,18 @@
 +      LDRBHI r14,[r3],#1     ;   r14 = *ptr++
        RSBHI r5,r5,#24        ; (HI) available = 32-(available+=8)
        RSBLS r5,r5,#32        ; (LS) r5 = 32-available
-       ORRHI r4,r14,LSL r5    ;   r4 = window|=r14<<32-available
+-      ORRHI r4,r14,LSL r5    ;   r4 = window|=r14<<32-available
++      ORRHI r4,r4,r14,LSL r5    ;   r4 = window|=r14<<32-available
        CMPHI r2,r3            ;   ptr<stop => HI
 -      LDRHIB r14,[r3],#1     ;     r14 = *ptr++
 +      LDRBHI r14,[r3],#1     ;     r14 = *ptr++
        SUBHI r5,#8            ;     available += 8
        ; (HI) Stall...
-       ORRHI r4,r14,LSL r5    ;     r4 = window|=r14<<32-available
-@@ -204,14 +205,14 @@ oc_huff_token_decode_refill
+-      ORRHI r4,r14,LSL r5    ;     r4 = window|=r14<<32-available
++      ORRHI r4,r4,r14,LSL r5    ;     r4 = window|=r14<<32-available
+ ; We can use unsigned compares for both the pointers and for available
+ ;  (allowing us to chain condition codes) because available will never be
+ ;  larger than 32 (or we wouldn't be here), and thus 32-available will never be
  ;  negative.
        CMPHI r2,r3            ;     ptr<stop => HI
        CMPHI r5,#7            ;       available<=24 => HI
@@ -72,7 +83,8 @@
 +      LDRBHI r14,[r3],#1     ;         r14 = *ptr++
        SUBHI r5,#8            ;         available += 8
        ; (HI) Stall...
-       ORRHI r4,r14,LSL r5    ;         r4 = window|=r14<<32-available
+-      ORRHI r4,r14,LSL r5    ;         r4 = window|=r14<<32-available
++      ORRHI r4,r4,r14,LSL r5    ;         r4 = window|=r14<<32-available
        CMP r2,r3              ; ptr<stop => HI
        MOVLS r5,#-1<<30       ; (LS) available = OC_LOTS_OF_BITS+32
        CMPHI r5,#7            ; (HI) available<=24 => HI
@@ -80,4 +92,8 @@
 +      LDRBHI r14,[r3],#1     ; (HI)   r14 = *ptr++
        SUBHI r5,#8            ; (HI)   available += 8
        ; (HI) Stall...
-       ORRHI r4,r14,LSL r5    ; (HI)   r4 = window|=r14<<32-available
+-      ORRHI r4,r14,LSL r5    ; (HI)   r4 = window|=r14<<32-available
++      ORRHI r4,r4,r14,LSL r5    ; (HI)   r4 = window|=r14<<32-available
+       RSB r14,r10,#32        ; r14 = 32-n
+       MOV r14,r4,LSR r14     ; r14 = bits=window>>32-n
+       ADD r12,r12,r14        ;



Home | Main Index | Thread Index | Old Index