Don't automatically assume that uint32array reads will produce doubles, bug 785543. r=luke
authorBrian Hackett <bhackett1024@gmail.com>
Sat, 25 Aug 2012 06:11:55 -0600
changeset 105467 1a6fa8dd582bcefa1ebbf529c3ec9ce57c392188
parent 105466 8dc1dad174fd82765acec3ddce5ce99418a499d8
child 105468 39da15b8b6aaad0f65535ef66e806a4b52564c9a
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersluke
bugs785543
milestone17.0a1
Don't automatically assume that uint32array reads will produce doubles, bug 785543. r=luke
js/src/jsinfer.cpp
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -1059,18 +1059,17 @@ PropertyAccess(JSContext *cx, JSScript *
      * time for typed arrays. Propagate the possible element types of the array
      * to sites reading from it.
      */
     if (object->singleton && object->singleton->isTypedArray() && JSID_IS_VOID(id)) {
         if (access != PROPERTY_WRITE) {
             int arrayKind = object->proto->getClass() - TypedArray::protoClasses;
             JS_ASSERT(arrayKind >= 0 && arrayKind < TypedArray::TYPE_MAX);
 
-            bool maybeDouble = (arrayKind == TypedArray::TYPE_UINT32 ||
-                                arrayKind == TypedArray::TYPE_FLOAT32 ||
+            bool maybeDouble = (arrayKind == TypedArray::TYPE_FLOAT32 ||
                                 arrayKind == TypedArray::TYPE_FLOAT64);
             target->addType(cx, maybeDouble ? Type::DoubleType() : Type::Int32Type());
         }
         return;
     }
 
     /*
      * Try to resolve reads from the VM state ahead of time, e.g. for reads