Make sure we don't get the argument order in BoxDouble wrong again.
authorAndreas Gal <gal@mozilla.com>
Sun, 06 Jul 2008 20:27:50 -0700
changeset 17478 7f3e0b5b05dd1e749b772a6ca4357262b48b46eb
parent 17477 c3568285ff19a11ee557006da9b8e70553e69267
child 17479 d268132c1bf643d4f98d139a5444468bbd87e5ee
push id1452
push usershaver@mozilla.com
push dateFri, 22 Aug 2008 00:08:22 +0000
treeherderautoland@d13bb0868596 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1a1pre
Make sure we don't get the argument order in BoxDouble wrong again.
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -257,35 +257,35 @@ public:
                 return out->ins2(v, demote(out, s1), demote(out, s0));
             }
         }
         return out->ins2(v, s1, s0);
     }
 
     LInsp insCall(int32_t fid, LInsp args[])
     {
+        LInsp s0 = args[0];
         switch (fid) {
         case F_doubleToInt32:
-            LInsp s0 = args[0];
             if (s0->isop(LIR_fadd) || s0->isop(LIR_fsub) || s0->isop(LIR_fmul)) {
                 LInsp lhs = s0->oprnd1();
                 LInsp rhs = s0->oprnd2();
                 if (isPromote(lhs) && isPromote(rhs)) {
                     LOpcode op = LOpcode(s0->opcode() & ~LIR64);
                     return out->ins2(op, demote(out, lhs), demote(out, rhs));
                 }
             }
             if (s0->isop(LIR_i2f) || s0->isop(LIR_u2f)) {
                 return s0->oprnd1();
             }
             break;
         case F_BoxDouble:
-            LInsp s1 = args[1];
-            if (s1->isop(LIR_i2f)) {
-                LInsp i = s1->oprnd1();
+            JS_ASSERT(s0->isQuad());
+            if (s0->isop(LIR_i2f)) {
+                LInsp i = s0->oprnd1();
                 return out->insCall(F_BoxInt32, &i);
             }
             break;
         }
         return out->insCall(fid, args);
     }
 };