Bug 1093573 part 8 - Add JitFrame_Unwound_BaselineJS. r=nbp

This commit is contained in:
Jan de Mooij 2014-11-11 17:50:44 +01:00
parent 4c046656c2
commit aceb051a8d
4 changed files with 15 additions and 0 deletions

View File

@ -2608,6 +2608,7 @@ InvalidateActivation(FreeOp *fop, const JitActivationIterator &activations, bool
JitSpew(JitSpew_IonInvalidate, "#%d rectifier frame @ %p", frameno, it.fp());
break;
case JitFrame_Unwound_IonJS:
case JitFrame_Unwound_BaselineJS:
case JitFrame_Unwound_BaselineStub:
MOZ_CRASH("invalid");
case JitFrame_Unwound_Rectifier:

View File

@ -54,6 +54,7 @@ JitFrameIterator::isFakeExitFrame() const
{
bool res = (prevType() == JitFrame_Unwound_Rectifier ||
prevType() == JitFrame_Unwound_IonJS ||
prevType() == JitFrame_Unwound_BaselineJS ||
prevType() == JitFrame_Unwound_BaselineStub ||
(prevType() == JitFrame_Entry && type() == JitFrame_Exit));
MOZ_ASSERT_IF(res, type() == JitFrame_Exit || type() == JitFrame_BaselineJS);

View File

@ -280,6 +280,7 @@ SizeOfFramePrefix(FrameType type)
case JitFrame_BaselineJS:
case JitFrame_IonJS:
case JitFrame_Bailout:
case JitFrame_Unwound_BaselineJS:
case JitFrame_Unwound_IonJS:
return IonJSFrameLayout::Size();
case JitFrame_BaselineStub:
@ -332,6 +333,8 @@ JitFrameIterator::operator++()
type_ = current()->prevType();
if (type_ == JitFrame_Unwound_IonJS)
type_ = JitFrame_IonJS;
else if (type_ == JitFrame_Unwound_BaselineJS)
type_ = JitFrame_BaselineJS;
else if (type_ == JitFrame_Unwound_BaselineStub)
type_ = JitFrame_BaselineStub;
returnAddressToFp_ = current()->returnAddress();
@ -808,6 +811,7 @@ void
EnsureExitFrame(IonCommonFrameLayout *frame)
{
if (frame->prevType() == JitFrame_Unwound_IonJS ||
frame->prevType() == JitFrame_Unwound_BaselineJS ||
frame->prevType() == JitFrame_Unwound_BaselineStub ||
frame->prevType() == JitFrame_Unwound_Rectifier)
{
@ -835,6 +839,12 @@ EnsureExitFrame(IonCommonFrameLayout *frame)
return;
}
if (frame->prevType() == JitFrame_BaselineJS) {
frame->changePrevType(JitFrame_Unwound_BaselineJS);
return;
}
MOZ_ASSERT(frame->prevType() == JitFrame_IonJS);
frame->changePrevType(JitFrame_Unwound_IonJS);
}
@ -1357,6 +1367,7 @@ MarkJitActivation(JSTracer *trc, const JitActivationIterator &activations)
MarkBailoutFrame(trc, frames);
break;
case JitFrame_Unwound_IonJS:
case JitFrame_Unwound_BaselineJS:
MOZ_CRASH("invalid");
case JitFrame_Rectifier:
MarkRectifierFrame(trc, frames);
@ -2506,6 +2517,7 @@ JitFrameIterator::dump() const
fprintf(stderr, " Frame size: %u\n", unsigned(current()->prevFrameLocalSize()));
break;
case JitFrame_Unwound_IonJS:
case JitFrame_Unwound_BaselineJS:
fprintf(stderr, "Warning! Unwound JS frames are not observable.\n");
break;
case JitFrame_Exit:

View File

@ -45,6 +45,7 @@ enum FrameType
// An unwound JS frame is a JS frame signalling that its callee frame has been
// turned into an exit frame (see EnsureExitFrame). Used by Ion bailouts and
// Baseline exception unwinding.
JitFrame_Unwound_BaselineJS,
JitFrame_Unwound_IonJS,
// Like Unwound_IonJS, but the caller is a baseline stub frame.