Bug 1190002 - Don't compile baseline stubs for sets to unboxed arrays when there is no JIT FPU support, r=jandem.
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 09 Aug 2015 18:52:08 -0600
changeset 257041 1a410d6cb2baa66b81b077eebb0bd9057b1837be
parent 257040 dc52da1924d23dbc7fae2f2b29dfcccf0325ac59
child 257042 3f95d4a32526b9934a033183074ed28e4e16787b
push idunknown
push userunknown
push dateunknown
reviewersjandem
bugs1190002
milestone42.0a1
Bug 1190002 - Don't compile baseline stubs for sets to unboxed arrays when there is no JIT FPU support, r=jandem.
js/src/jit/BaselineIC.cpp
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -4760,16 +4760,20 @@ CanOptimizeDenseOrUnboxedArraySetElem(JS
 
     *isAddingCaseOut = false;
     *protoDepthOut = 0;
 
     // Some initial sanity checks.
     if (initLength < oldInitLength || capacity < oldCapacity)
         return false;
 
+    // Unboxed arrays need to be able to emit floating point code.
+    if (obj->is<UnboxedArrayObject>() && !obj->runtimeFromMainThread()->jitSupportsFloatingPoint)
+        return false;
+
     Shape* shape = obj->maybeShape();
 
     // Cannot optimize if the shape changed.
     if (oldShape != shape)
         return false;
 
     // Cannot optimize if the capacity changed.
     if (oldCapacity != capacity)