Treat LDefVar as a call instruction (bug 756777, r=sstangl).
authorDavid Anderson <danderson@mozilla.com>
Tue, 22 May 2012 23:13:50 -0700
changeset 96011 9a4817a83ca6686d99c719e24f2ee980cd2bf6e8
parent 96010 afbfcebb1976458d567ad875cf8f0762770ddb94
child 96012 038b237f7dad75a2a289f38b8a76963e6c4c1e7d
push id931
push userdanderson@mozilla.com
push dateWed, 23 May 2012 06:14:31 +0000
reviewerssstangl
bugs756777
milestone15.0a1
Treat LDefVar as a call instruction (bug 756777, r=sstangl).
js/src/ion/LIR-Common.h
js/src/ion/Lowering.cpp
--- a/js/src/ion/LIR-Common.h
+++ b/js/src/ion/LIR-Common.h
@@ -291,17 +291,17 @@ class LCheckOverRecursed : public LInstr
         setTemp(0, limitreg);
     }
 
     const LAllocation *limitTemp() {
         return getTemp(0)->output();
     }
 };
 
-class LDefVar : public LInstructionHelper<0, 1, 1>
+class LDefVar : public LCallInstructionHelper<0, 1, 1>
 {
   public:
     LIR_HEADER(DefVar);
 
     LDefVar(const LAllocation &scopeChain, const LDefinition &namereg)
     {
         setOperand(0, scopeChain);
         setTemp(0, namereg);
--- a/js/src/ion/Lowering.cpp
+++ b/js/src/ion/Lowering.cpp
@@ -112,18 +112,18 @@ LIRGenerator::visitCheckOverRecursed(MCh
         return false;
 
     return true;
 }
 
 bool
 LIRGenerator::visitDefVar(MDefVar *ins)
 {
-    LAllocation scopeChain = useRegister(ins->scopeChain());
-    LDefVar *lir = new LDefVar(scopeChain, temp());
+    LDefVar *lir = new LDefVar(useFixed(ins->scopeChain(), CallTempReg0),
+                               tempFixed(CallTempReg1));
 
     if (!add(lir, ins))
         return false;
     if (!assignSafepoint(lir, ins))
         return false;
 
     return true;
 }