Steal the reference to cx from the BoxDouble call instead of observing the load.
authorAndreas Gal <gal@mozilla.com>
Thu, 10 Jul 2008 17:03:59 -0700
changeset 17588 ee609b5493d2c898afb29969891d685f7768db4f
parent 17587 aa3c905521b57a1bf389a877a30b2b1cf32994fd
child 17589 c01216792073c56cb3d056210d43724a9045182d
push id1452
push usershaver@mozilla.com
push dateFri, 22 Aug 2008 00:08:22 +0000
treeherdermozilla-central@d13bb0868596 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1a1pre
Steal the reference to cx from the BoxDouble call instead of observing the load.
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -188,33 +188,23 @@ static bool isPromoteUint(LIns *i)
 
 static bool isPromote(LIns *i)
 {
     return isPromoteInt(i) || isPromoteUint(i);;
 }
 
 class FuncFilter: public LirWriter
 {
-    LInsp cx_ins;
     TraceRecorder& recorder;
 public:
     FuncFilter(LirWriter *out, TraceRecorder& _recorder):
         LirWriter(out), recorder(_recorder)
     {
-        cx_ins = NULL;
     }
 
-    LInsp insLoad(LOpcode op, LIns* base, LIns* d) {
-        LInsp v = out->insLoad(op, base, d); 
-        if (base == recorder.getFragment()->state && 
-                d->isconst() && d->constval() == offsetof(InterpState,cx))
-            cx_ins = v;
-        return v;
-    }
-    
     LInsp ins1(LOpcode v, LInsp s0)
     {
         switch (v) {
         case LIR_i2f:
             if (s0->oprnd1()->isCall() && s0->imm8() == F_doubleToInt32)
                 return callArgN(s0->oprnd1(), 1);
             break;
         case LIR_u2f:
@@ -280,20 +270,20 @@ public:
                     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:
-            JS_ASSERT(s0->isQuad() && cx_ins != NULL);
+            JS_ASSERT(s0->isQuad());
             if (s0->isop(LIR_i2f)) {
-                LIns* args[] = { s0->oprnd1(), cx_ins };
-                return out->insCall(F_BoxInt32, args);
+                LIns* args2[] = { s0->oprnd1(), args[1] };
+                return out->insCall(F_BoxInt32, args2);
             }
             break;
         }
         return out->insCall(fid, args);
     }
 };
 
 /* In debug mode vpname contains a textual description of the type of the