Backed out changeset b3124d14db16 (bug 1029910) for Jit failures

This commit is contained in:
Nigel Babu 2014-06-27 08:47:19 +05:30
parent caccbc28e2
commit b768f96cca
2 changed files with 12 additions and 24 deletions

View File

@ -393,13 +393,13 @@ class SnapshotIterator
Value read() {
return allocationValue(readAllocation());
}
Value maybeRead(const Value &placeholder = UndefinedValue(), bool silentFailure = false) {
Value maybeRead(bool silentFailure = false) {
RValueAllocation a = readAllocation();
if (allocationReadable(a))
return allocationValue(a);
if (!silentFailure)
warnUnreadableAllocation();
return placeholder;
return UndefinedValue();
}
void readCommonFrameSlots(Value *scopeChain, Value *rval) {
@ -416,8 +416,7 @@ class SnapshotIterator
template <class Op>
void readFunctionFrameArgs(Op &op, ArgumentsObject **argsObj, Value *thisv,
unsigned start, unsigned end, JSScript *script,
const Value &unreadablePlaceholder = UndefinedValue())
unsigned start, unsigned end, JSScript *script)
{
// Assumes that the common frame arguments have already been read.
if (script->argumentsHasVarBinding()) {
@ -445,7 +444,7 @@ class SnapshotIterator
// We are not always able to read values from the snapshots, some values
// such as non-gc things may still be live in registers and cause an
// error while reading the machine state.
Value v = maybeRead(unreadablePlaceholder);
Value v = maybeRead();
op(v);
}
}
@ -456,7 +455,7 @@ class SnapshotIterator
skip();
}
Value s = maybeRead(/* placeholder = */ UndefinedValue(), true);
Value s = maybeRead(true);
while (moreAllocations())
skip();
@ -532,8 +531,7 @@ class InlineFrameIterator
void readFrameArgsAndLocals(ThreadSafeContext *cx, ArgOp &argOp, LocalOp &localOp,
JSObject **scopeChain, Value *rval,
ArgumentsObject **argsObj, Value *thisv,
ReadFrameArgsBehavior behavior,
const Value &unreadablePlaceholder = UndefinedValue()) const
ReadFrameArgsBehavior behavior) const
{
SnapshotIterator s(si_);
@ -552,10 +550,8 @@ class InlineFrameIterator
// Get the non overflown arguments, which are taken from the inlined
// frame, because it will have the updated value when JSOP_SETARG is
// done.
if (behavior != ReadFrame_Overflown) {
s.readFunctionFrameArgs(argOp, argsObj, thisv, 0, nformal, script(),
unreadablePlaceholder);
}
if (behavior != ReadFrame_Overflown)
s.readFunctionFrameArgs(argOp, argsObj, thisv, 0, nformal, script());
if (behavior != ReadFrame_Formals) {
if (more()) {
@ -583,8 +579,7 @@ class InlineFrameIterator
// Get the overflown arguments
parent_s.readCommonFrameSlots(nullptr, nullptr);
parent_s.readFunctionFrameArgs(argOp, nullptr, nullptr,
nformal, nactual, it.script(),
unreadablePlaceholder);
nformal, nactual, it.script());
} else {
// There is no parent frame to this inlined frame, we can read
// from the frame's Value vector directly.
@ -597,14 +592,8 @@ class InlineFrameIterator
// At this point we've read all the formals in s, and can read the
// locals.
for (unsigned i = 0; i < script()->nfixed(); i++) {
// We have to use maybeRead here, some of these might be recover
// instructions, and currently InlineFrameIter does not support
// recovering slots.
//
// FIXME bug 1029963.
localOp(s.maybeRead(unreadablePlaceholder));
}
for (unsigned i = 0; i < script()->nfixed(); i++)
localOp(s.read());
}
template <class Op>

View File

@ -39,8 +39,7 @@ RematerializedFrame::RematerializedFrame(ThreadSafeContext *cx, uint8_t *top,
{
CopyValueToRematerializedFrame op(slots_);
iter.readFrameArgsAndLocals(cx, op, op, &scopeChain_, &returnValue_,
&argsObj_, &thisValue_, ReadFrame_Actuals,
MagicValue(JS_OPTIMIZED_OUT));
&argsObj_, &thisValue_, ReadFrame_Actuals);
}
/* static */ RematerializedFrame *