Bug 863961 - Remove overconservative assertion on argument slots never being phi-ed in needsArgsObj scripts. r=nbp

This commit is contained in:
Kannan Vijayan 2013-04-30 17:25:16 -04:00
parent b4111746cf
commit bb596eaee8
3 changed files with 6 additions and 5 deletions

View File

@ -134,7 +134,7 @@ class CompileInfo
JS_ASSERT(fun());
return hasArguments() ? 2 : 1;
}
uint32_t firstActualArgSlot() const {
uint32_t firstArgSlot() const {
return nimplicit_;
}
uint32_t argSlotUnchecked(uint32_t i) const {

View File

@ -204,10 +204,11 @@ IsPhiObservable(MPhi *phi, Observability observe)
// object in the function. The phi might be observable after a bailout.
// For inlined frames this is not needed, as they are captured in the inlineResumePoint.
if (info.fun() && info.hasArguments()) {
uint32_t first = info.firstActualArgSlot();
uint32_t first = info.firstArgSlot();
if (first <= slot && slot - first < info.nargs()) {
// If arguments obj aliases formals, then no arguments slots should ever be phis.
JS_ASSERT(!info.argsObjAliasesFormals());
// If arguments obj aliases formals, then the arg slots will never be used.
if (info.argsObjAliasesFormals())
return false;
return true;
}
}

View File

@ -5409,7 +5409,7 @@ IonBuilder::newPendingLoopHeader(MBasicBlock *predecessor, jsbytecode *pc, bool
bool haveValue = false;
Value existingValue;
{
uint32_t arg = i - info().firstActualArgSlot();
uint32_t arg = i - info().firstArgSlot();
uint32_t var = i - info().firstLocalSlot();
if (arg < info().nargs()) {
if (!script()->formalIsAliased(arg)) {