$OpenBSD$ index d2ed077..9d6fd5d 100644 --- js/src/jit/IonAnalysis.cpp.orig Fri Feb 20 15:40:37 2015 +++ js/src/jit/IonAnalysis.cpp Fri Feb 20 15:40:37 2015 @@ -137,6 +137,14 @@ jit::EliminateDeadResumePointOperands(MIRGenerator *mir, MIRGraph &graph) continue; } + // The operand is an uneliminable slot. This currently + // includes argument slots in non-strict scripts (due to being + // observable via Function.arguments). + if (!block->info().canOptimizeOutSlot(uses->index())) { + uses++; + continue; + } + // Store an optimized out magic value in place of all dead // resume point operands. Making any such substitution can in // general alter the interpreter's behavior, even though the @@ -233,18 +241,11 @@ IsPhiObservable(MPhi *phi, Observability observe) return true; } - // If the Phi is one of the formal argument, and we are using an argument - // 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 (fun && info.hasArguments()) { - uint32_t first = info.firstArgSlot(); - if (first <= slot && slot - first < info.nargs()) { - // If arguments obj aliases formals, then the arg slots will never be used. - if (info.argsObjAliasesFormals()) - return false; - return true; - } - } + // The Phi is an uneliminable slot. Currently this includes argument slots + // in non-strict scripts (due to being observable via Function.arguments). + if (fun && !info.canOptimizeOutSlot(slot)) + return true; + return false; }