зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1427729: Have EnsureBareExitFrame and JSJitFrameIter take only JitActivation parameters; r=jandem
MozReview-Commit-ID: CZKK1D8bThW --HG-- extra : rebase_source : 1b609a2e33583ca0722d4aef9220ab85acfc58c8
This commit is contained in:
Родитель
f0969b8242
Коммит
c21325b457
|
@ -2527,7 +2527,7 @@ testingFunc_inIon(JSContext* cx, unsigned argc, Value* vp)
|
|||
ScriptFrameIter iter(cx);
|
||||
if (!iter.done() && iter.isIon()) {
|
||||
// Reset the counter of the IonScript's script.
|
||||
jit::JSJitFrameIter jitIter(cx);
|
||||
jit::JSJitFrameIter jitIter(cx->activation()->asJit());
|
||||
++jitIter;
|
||||
jitIter.script()->resetWarmUpResetCounter();
|
||||
} else {
|
||||
|
|
|
@ -1900,7 +1900,7 @@ jit::FinishBailoutToBaseline(BaselineBailoutInfo* bailoutInfo)
|
|||
RootedScript outerScript(cx, nullptr);
|
||||
|
||||
MOZ_ASSERT(cx->currentlyRunningInJit());
|
||||
JSJitFrameIter iter(cx);
|
||||
JSJitFrameIter iter(cx->activation()->asJit());
|
||||
uint8_t* outerFp = nullptr;
|
||||
|
||||
// Iter currently points at the exit frame. Get the previous frame
|
||||
|
@ -1962,7 +1962,7 @@ jit::FinishBailoutToBaseline(BaselineBailoutInfo* bailoutInfo)
|
|||
// on.
|
||||
JitActivation* act = cx->activation()->asJit();
|
||||
if (act->hasRematerializedFrame(outerFp)) {
|
||||
JSJitFrameIter iter(cx);
|
||||
JSJitFrameIter iter(cx->activation()->asJit());
|
||||
size_t inlineDepth = numFrames;
|
||||
bool ok = true;
|
||||
while (inlineDepth > 0) {
|
||||
|
|
|
@ -1186,7 +1186,7 @@ JitRuntime::generateBaselineDebugModeOSRHandler(JSContext* cx, uint32_t* noFrame
|
|||
|
||||
/* static */ void
|
||||
DebugModeOSRVolatileJitFrameIter::forwardLiveIterators(const CooperatingContext& cx,
|
||||
uint8_t* oldAddr, uint8_t* newAddr)
|
||||
uint8_t* oldAddr, uint8_t* newAddr)
|
||||
{
|
||||
DebugModeOSRVolatileJitFrameIter* iter;
|
||||
for (iter = cx.context()->liveVolatileJitFrameIter_; iter; iter = iter->prev)
|
||||
|
|
|
@ -142,7 +142,7 @@ BaselineFrame::initForOsr(InterpreterFrame* fp, uint32_t numStackValues)
|
|||
// debugger, wants a valid return address, but it's okay to just pick one.
|
||||
// In debug mode there's always at least 1 ICEntry (since there are always
|
||||
// debug prologue/epilogue calls).
|
||||
JSJitFrameIter frame(cx);
|
||||
JSJitFrameIter frame(cx->activation()->asJit());
|
||||
MOZ_ASSERT(frame.returnAddress() == nullptr);
|
||||
BaselineScript* baseline = fp->script()->baselineScript();
|
||||
frame.current()->setReturnAddress(baseline->returnAddressForIC(baseline->icEntry(0)));
|
||||
|
|
|
@ -327,7 +327,7 @@ CacheRegisterAllocator::restoreIonLiveRegisters(MacroAssembler& masm, LiveRegist
|
|||
static void*
|
||||
GetReturnAddressToIonCode(JSContext* cx)
|
||||
{
|
||||
JSJitFrameIter frame(cx);
|
||||
JSJitFrameIter frame(cx->activation()->asJit());
|
||||
MOZ_ASSERT(frame.type() == JitFrame_Exit,
|
||||
"An exit frame is expected as update functions are called with a VMFunction.");
|
||||
|
||||
|
|
|
@ -31,11 +31,6 @@ JSJitFrameIter::JSJitFrameIter(const JitActivation* activation)
|
|||
}
|
||||
}
|
||||
|
||||
JSJitFrameIter::JSJitFrameIter(JSContext* cx)
|
||||
: JSJitFrameIter(cx->activation()->asJit())
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
JSJitFrameIter::checkInvalidation() const
|
||||
{
|
||||
|
|
|
@ -112,7 +112,6 @@ class JSJitFrameIter
|
|||
public:
|
||||
// See comment above the class.
|
||||
explicit JSJitFrameIter(const JitActivation* activation);
|
||||
explicit JSJitFrameIter(JSContext* cx);
|
||||
|
||||
// Used only by DebugModeOSRVolatileJitFrameIter.
|
||||
void exchangeReturnAddressIfMatch(uint8_t* oldAddr, uint8_t* newAddr) {
|
||||
|
|
|
@ -29,7 +29,7 @@ SafepointIndex::resolve()
|
|||
inline BaselineFrame*
|
||||
GetTopBaselineFrame(JSContext* cx)
|
||||
{
|
||||
JSJitFrameIter frame(cx);
|
||||
JSJitFrameIter frame(cx->activation()->asJit());
|
||||
MOZ_ASSERT(frame.type() == JitFrame_Exit);
|
||||
++frame;
|
||||
if (frame.isBaselineStub())
|
||||
|
|
|
@ -746,7 +746,7 @@ HandleException(ResumeFromException* rfe)
|
|||
// see this frame when they use ScriptFrameIter, and (2)
|
||||
// ScriptFrameIter does not crash when accessing an IonScript
|
||||
// that's destroyed by the ionScript->decref call.
|
||||
EnsureBareExitFrame(cx, current);
|
||||
EnsureBareExitFrame(cx->activation()->asJit(), current);
|
||||
}
|
||||
|
||||
if (overrecursed) {
|
||||
|
@ -763,11 +763,11 @@ HandleException(ResumeFromException* rfe)
|
|||
// Turns a JitFrameLayout into an ExitFrameLayout. Note that it has to be a
|
||||
// bare exit frame so it's ignored by TraceJitExitFrame.
|
||||
void
|
||||
EnsureBareExitFrame(JSContext* cx, JitFrameLayout* frame)
|
||||
EnsureBareExitFrame(JitActivation* act, JitFrameLayout* frame)
|
||||
{
|
||||
ExitFrameLayout* exitFrame = reinterpret_cast<ExitFrameLayout*>(frame);
|
||||
|
||||
if (cx->activation()->asJit()->jsExitFP() == (uint8_t*)frame) {
|
||||
if (act->jsExitFP() == (uint8_t*)frame) {
|
||||
// If we already called this function for the current frame, do
|
||||
// nothing.
|
||||
MOZ_ASSERT(exitFrame->isBareExit());
|
||||
|
@ -775,17 +775,17 @@ EnsureBareExitFrame(JSContext* cx, JitFrameLayout* frame)
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
JSJitFrameIter iter(cx);
|
||||
JSJitFrameIter iter(act);
|
||||
while (!iter.isScripted())
|
||||
++iter;
|
||||
MOZ_ASSERT(iter.current() == frame, "|frame| must be the top JS frame");
|
||||
|
||||
MOZ_ASSERT(!!cx->activation()->asJit()->jsExitFP());
|
||||
MOZ_ASSERT((uint8_t*)exitFrame->footer() >= cx->activation()->asJit()->jsExitFP(),
|
||||
MOZ_ASSERT(!!act->jsExitFP());
|
||||
MOZ_ASSERT((uint8_t*)exitFrame->footer() >= act->jsExitFP(),
|
||||
"Must have space for ExitFooterFrame before jsExitFP");
|
||||
#endif
|
||||
|
||||
cx->activation()->asJit()->setJSExitFP((uint8_t*)frame);
|
||||
act->setJSExitFP((uint8_t*)frame);
|
||||
exitFrame->footer()->setBareExitFrame();
|
||||
MOZ_ASSERT(exitFrame->isBareExit());
|
||||
}
|
||||
|
|
|
@ -284,7 +284,7 @@ struct ResumeFromException
|
|||
|
||||
void HandleException(ResumeFromException* rfe);
|
||||
|
||||
void EnsureBareExitFrame(JSContext* cx, JitFrameLayout* frame);
|
||||
void EnsureBareExitFrame(JitActivation* act, JitFrameLayout* frame);
|
||||
|
||||
void TraceJitActivations(JSContext* cx, const CooperatingContext& target, JSTracer* trc);
|
||||
|
||||
|
@ -312,7 +312,7 @@ MakeFrameDescriptor(uint32_t frameSize, FrameType type, uint32_t headerSize)
|
|||
inline JSScript*
|
||||
GetTopJitJSScript(JSContext* cx)
|
||||
{
|
||||
JSJitFrameIter frame(cx);
|
||||
JSJitFrameIter frame(cx->activation()->asJit());
|
||||
MOZ_ASSERT(frame.type() == JitFrame_Exit);
|
||||
++frame;
|
||||
|
||||
|
|
|
@ -391,7 +391,7 @@ ArrayPushDense(JSContext* cx, HandleArrayObject arr, HandleValue v, uint32_t* le
|
|||
// possible the setOrExtendDenseElements call already invalidated the
|
||||
// IonScript. JSJitFrameIter::ionScript works when the script is invalidated
|
||||
// so we use that instead.
|
||||
JSJitFrameIter frame(cx);
|
||||
JSJitFrameIter frame(cx->activation()->asJit());
|
||||
MOZ_ASSERT(frame.type() == JitFrame_Exit);
|
||||
++frame;
|
||||
IonScript* ionScript = frame.ionScript();
|
||||
|
@ -872,7 +872,7 @@ DebugEpilogue(JSContext* cx, BaselineFrame* frame, jsbytecode* pc, bool ok)
|
|||
// Pop this frame by updating packedExitFP, so that the exception
|
||||
// handling code will start at the previous frame.
|
||||
JitFrameLayout* prefix = frame->framePrefix();
|
||||
EnsureBareExitFrame(cx, prefix);
|
||||
EnsureBareExitFrame(cx->activation()->asJit(), prefix);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче