Bug 950452 - Fix SETARG in IonBuilder, r=jandem.
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 20 Dec 2013 13:07:23 -0700
changeset 161471 0c2a1f9f76a0360fe5a008739e41a9207bdf6bf0
parent 161470 226af33429871b63372b3bd3023970ba1c29c119
child 161472 97516134f58b9ad4c23ac4b2052684b8c2f90bdf
push id37925
push userbhackett@mozilla.com
push dateFri, 20 Dec 2013 20:07:28 +0000
treeherdermozilla-inbound@0c2a1f9f76a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs950452
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 950452 - Fix SETARG in IonBuilder, r=jandem.
js/src/jit/IonBuilder.cpp
js/src/jit/MIR.h
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -9260,16 +9260,23 @@ IonBuilder::jsop_setarg(uint32_t arg)
                     if (def == val)
                         continue;
                     otherUses = true;
                 }
                 if (!otherUses) {
                     JS_ASSERT(op->resultTypeSet() == &argTypes[arg]);
                     if (!argTypes[arg].addType(types::Type::UnknownType(), alloc_->lifoAlloc()))
                         return false;
+                    if (val->isMul()) {
+                        val->setResultType(MIRType_Double);
+                        val->toMul()->setSpecialization(MIRType_Double);
+                    } else {
+                        JS_ASSERT(val->type() == MIRType_Int32);
+                    }
+                    val->setResultTypeSet(nullptr);
                 }
             }
         }
     }
 
     current->setArg(arg);
     return true;
 }
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -4092,16 +4092,20 @@ class MMul : public MBinaryArithInstruct
     }
 
     bool updateForReplacement(MDefinition *ins);
 
     bool fallible() const {
         return canBeNegativeZero_ || canOverflow();
     }
 
+    void setSpecialization(MIRType type) {
+        specialization_ = type;
+    }
+
     bool isFloat32Commutative() const { return true; }
 
     void computeRange(TempAllocator &alloc);
     bool truncate();
     bool isOperandTruncated(size_t index) const;
 
     Mode mode() { return mode_; }
 };