Backed out changeset 6196ec73ac9a (bug 1042729) for assertions
authorEd Morley <emorley@mozilla.com>
Tue, 05 Aug 2014 13:33:43 +0100
changeset 197923 9f9247db062c2f53f188af3924db3e9c1486646a
parent 197922 208cf26c5af831b732bd79848cefac698b4321cb
child 197924 782b3d5b0df1653b2bc3c6830e931392ff6f9c1a
push id27256
push userkwierso@gmail.com
push dateWed, 06 Aug 2014 00:06:20 +0000
treeherdermozilla-central@6cbdd4d523a7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1042729
milestone34.0a1
backs out6196ec73ac9a8573ffbb9ea4418cc514b9dbead3
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
Backed out changeset 6196ec73ac9a (bug 1042729) for assertions
js/src/jit/IonBuilder.cpp
js/src/jit/MIR.cpp
js/src/jit/MIR.h
js/src/jit/MIRGraph.cpp
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -695,17 +695,17 @@ IonBuilder::build()
         current->add(MProfilerStackOp::New(alloc(), script(), MProfilerStackOp::Enter));
 
     // Guard against over-recursion. Do this before we start unboxing, since
     // this will create an OSI point that will read the incoming argument
     // values, which is nice to do before their last real use, to minimize
     // register/stack pressure.
     MCheckOverRecursed *check = MCheckOverRecursed::New(alloc());
     current->add(check);
-    check->setResumePoint(MResumePoint::Copy(alloc(), current->entryResumePoint()));
+    check->setResumePoint(current->entryResumePoint());
 
     // Parameters have been checked to correspond to the typeset, now we unbox
     // what we can in an infallible manner.
     rewriteParameters();
 
     // It's safe to start emitting actual IR, so now build the scope chain.
     if (!initScopeChain())
         return false;
@@ -730,17 +730,17 @@ IonBuilder::build()
     //       v3 = Unbox(v1, INT32)
     //
     // So we attach the initial resume point to each parameter, which the type
     // analysis explicitly checks (this is the same mechanism used for
     // effectful operations).
     for (uint32_t i = 0; i < info().endArgSlot(); i++) {
         MInstruction *ins = current->getEntrySlot(i)->toInstruction();
         if (ins->type() == MIRType_Value)
-            ins->setResumePoint(MResumePoint::Copy(alloc(), current->entryResumePoint()));
+            ins->setResumePoint(current->entryResumePoint());
     }
 
     // lazyArguments should never be accessed in |argsObjAliasesFormals| scripts.
     if (info().hasArguments() && !info().argsObjAliasesFormals()) {
         lazyArguments_ = MConstant::New(alloc(), MagicValue(JS_OPTIMIZED_ARGUMENTS));
         current->add(lazyArguments_);
     }
 
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -2346,30 +2346,16 @@ MResumePoint::New(TempAllocator &alloc, 
 {
     MResumePoint *resume = new(alloc) MResumePoint(block, pc, parent, mode);
     if (!resume->init(alloc))
         return nullptr;
     resume->inherit(block);
     return resume;
 }
 
-MResumePoint *
-MResumePoint::Copy(TempAllocator &alloc, MResumePoint *src)
-{
-    MResumePoint *resume = new(alloc) MResumePoint(src->block(), src->pc(),
-                                                   src->caller(), src->mode());
-    // Copy the operands from the original resume point, and not from the
-    // current block stack.
-    if (!resume->operands_.init(alloc, src->stackDepth()))
-        return nullptr;
-    for (size_t i = 0; i < resume->stackDepth(); i++)
-        resume->initOperand(i, src->getOperand(i));
-    return resume;
-}
-
 MResumePoint::MResumePoint(MBasicBlock *block, jsbytecode *pc, MResumePoint *caller,
                            Mode mode)
   : MNode(block),
     pc_(pc),
     caller_(caller),
     instruction_(nullptr),
     mode_(mode)
 {
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -10248,17 +10248,16 @@ class MResumePoint MOZ_FINAL : public MN
     }
     const MUse *getUseFor(size_t index) const {
         return &operands_[index];
     }
 
   public:
     static MResumePoint *New(TempAllocator &alloc, MBasicBlock *block, jsbytecode *pc,
                              MResumePoint *parent, Mode mode);
-    static MResumePoint *Copy(TempAllocator &alloc, MResumePoint *src);
 
     MNode::Kind kind() const {
         return MNode::ResumePoint;
     }
     size_t numOperands() const {
         return operands_.length();
     }
     size_t indexOf(const MUse *u) const MOZ_FINAL MOZ_OVERRIDE {
--- a/js/src/jit/MIRGraph.cpp
+++ b/js/src/jit/MIRGraph.cpp
@@ -490,46 +490,42 @@ void
 MBasicBlock::linkOsrValues(MStart *start)
 {
     JS_ASSERT(start->startType() == MStart::StartType_Osr);
 
     MResumePoint *res = start->resumePoint();
 
     for (uint32_t i = 0; i < stackDepth(); i++) {
         MDefinition *def = slots_[i];
-        MInstruction *cloneRp = nullptr;
         if (i == info().scopeChainSlot()) {
             if (def->isOsrScopeChain())
-                cloneRp = def->toOsrScopeChain();
+                def->toOsrScopeChain()->setResumePoint(res);
         } else if (i == info().returnValueSlot()) {
             if (def->isOsrReturnValue())
-                cloneRp = def->toOsrReturnValue();
+                def->toOsrReturnValue()->setResumePoint(res);
         } else if (info().hasArguments() && i == info().argsObjSlot()) {
             JS_ASSERT(def->isConstant() || def->isOsrArgumentsObject());
             JS_ASSERT_IF(def->isConstant(), def->toConstant()->value() == UndefinedValue());
             if (def->isOsrArgumentsObject())
-                cloneRp = def->toOsrArgumentsObject();
+                def->toOsrArgumentsObject()->setResumePoint(res);
         } else {
             JS_ASSERT(def->isOsrValue() || def->isGetArgumentsObjectArg() || def->isConstant() ||
                       def->isParameter());
 
             // A constant Undefined can show up here for an argument slot when the function uses
             // a heavyweight argsobj, but the argument in question is stored on the scope chain.
             JS_ASSERT_IF(def->isConstant(), def->toConstant()->value() == UndefinedValue());
 
             if (def->isOsrValue())
-                cloneRp = def->toOsrValue();
+                def->toOsrValue()->setResumePoint(res);
             else if (def->isGetArgumentsObjectArg())
-                cloneRp = def->toGetArgumentsObjectArg();
+                def->toGetArgumentsObjectArg()->setResumePoint(res);
             else if (def->isParameter())
-                cloneRp = def->toParameter();
+                def->toParameter()->setResumePoint(res);
         }
-
-        if (cloneRp)
-            cloneRp->setResumePoint(MResumePoint::Copy(graph().alloc(), res));
     }
 }
 
 void
 MBasicBlock::setSlot(uint32_t slot, MDefinition *ins)
 {
     slots_[slot] = ins;
 }