mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 20:17:37 +00:00
Bug 999559 part 1 - Rename IonFrameIterator to JitFrameIterator. r=shu
--HG-- rename : js/src/jit/IonFrameIterator-inl.h => js/src/jit/JitFrameIterator-inl.h rename : js/src/jit/IonFrameIterator.h => js/src/jit/JitFrameIterator.h
This commit is contained in:
parent
3db3aca9c1
commit
f5b5ee3aa7
@ -15,7 +15,7 @@
|
||||
#include "jit/Snapshots.h"
|
||||
#include "vm/TraceLogging.h"
|
||||
|
||||
#include "jit/IonFrameIterator-inl.h"
|
||||
#include "jit/JitFrameIterator-inl.h"
|
||||
#include "vm/Stack-inl.h"
|
||||
|
||||
using namespace js;
|
||||
@ -24,15 +24,15 @@ using namespace js::jit;
|
||||
// These constructor are exactly the same except for the type of the iterator
|
||||
// which is given to the SnapshotIterator constructor. Doing so avoid the
|
||||
// creation of virtual functions for the IonIterator but may introduce some
|
||||
// weirdness as IonInlineIterator is using an IonFrameIterator reference.
|
||||
// weirdness as IonInlineIterator is using a JitFrameIterator reference.
|
||||
//
|
||||
// If a function relies on ionScript() or to use OsiIndex(), due to the
|
||||
// lack of virtual, these functions will use the IonFrameIterator reference
|
||||
// lack of virtual, these functions will use the JitFrameIterator reference
|
||||
// contained in the InlineFrameIterator and thus are not able to recover
|
||||
// correctly the data stored in IonBailoutIterator.
|
||||
//
|
||||
// Currently, such cases should not happen because our only use case of the
|
||||
// IonFrameIterator within InlineFrameIterator is to read the frame content, or
|
||||
// JitFrameIterator within InlineFrameIterator is to read the frame content, or
|
||||
// to clone it to find the parent scripted frame. Both use cases are fine and
|
||||
// should not cause any issue since the only potential issue is to read the
|
||||
// bailed out frame.
|
||||
@ -63,7 +63,7 @@ IonBailoutIterator::dump() const
|
||||
++frames;
|
||||
}
|
||||
} else {
|
||||
IonFrameIterator::dump();
|
||||
JitFrameIterator::dump();
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,8 +151,8 @@ jit::InvalidationBailout(InvalidationBailoutStack *sp, size_t *frameSizeOut,
|
||||
}
|
||||
|
||||
IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
|
||||
const IonFrameIterator &frame)
|
||||
: IonFrameIterator(activations),
|
||||
const JitFrameIterator &frame)
|
||||
: JitFrameIterator(activations),
|
||||
machine_(frame.machineState())
|
||||
{
|
||||
returnAddressToFp_ = frame.returnAddressToFp();
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
#include "jstypes.h"
|
||||
|
||||
#include "jit/IonFrameIterator.h"
|
||||
#include "jit/IonFrames.h"
|
||||
#include "jit/JitFrameIterator.h"
|
||||
#include "vm/Stack.h"
|
||||
|
||||
namespace js {
|
||||
@ -111,8 +111,8 @@ class InvalidationBailoutStack;
|
||||
|
||||
// This iterator is constructed at a time where there is no exit frame at the
|
||||
// moment. They must be initialized to the first JS frame instead of the exit
|
||||
// frame as usually done with IonFrameIterator.
|
||||
class IonBailoutIterator : public IonFrameIterator
|
||||
// frame as usually done with JitFrameIterator.
|
||||
class IonBailoutIterator : public JitFrameIterator
|
||||
{
|
||||
MachineState machine_;
|
||||
uint32_t snapshotOffset_;
|
||||
@ -122,7 +122,7 @@ class IonBailoutIterator : public IonFrameIterator
|
||||
public:
|
||||
IonBailoutIterator(const JitActivationIterator &activations, BailoutStack *sp);
|
||||
IonBailoutIterator(const JitActivationIterator &activations, InvalidationBailoutStack *sp);
|
||||
IonBailoutIterator(const JitActivationIterator &activations, const IonFrameIterator &frame);
|
||||
IonBailoutIterator(const JitActivationIterator &activations, const JitFrameIterator &frame);
|
||||
|
||||
SnapshotOffset snapshotOffset() const {
|
||||
JS_ASSERT(topIonScript_);
|
||||
@ -138,7 +138,7 @@ class IonBailoutIterator : public IonFrameIterator
|
||||
IonScript *ionScript() const {
|
||||
if (topIonScript_)
|
||||
return topIonScript_;
|
||||
return IonFrameIterator::ionScript();
|
||||
return JitFrameIterator::ionScript();
|
||||
}
|
||||
|
||||
void dump() const;
|
||||
|
@ -1538,7 +1538,7 @@ jit::FinishBailoutToBaseline(BaselineBailoutInfo *bailoutInfo)
|
||||
RootedScript outerScript(cx, nullptr);
|
||||
|
||||
JS_ASSERT(cx->currentlyRunningInJit());
|
||||
IonFrameIterator iter(cx);
|
||||
JitFrameIterator iter(cx);
|
||||
|
||||
uint32_t frameno = 0;
|
||||
while (frameno < numFrames) {
|
||||
|
@ -28,7 +28,7 @@ MarkLocals(BaselineFrame *frame, JSTracer *trc, unsigned start, unsigned end)
|
||||
}
|
||||
|
||||
void
|
||||
BaselineFrame::trace(JSTracer *trc, IonFrameIterator &frameIterator)
|
||||
BaselineFrame::trace(JSTracer *trc, JitFrameIterator &frameIterator)
|
||||
{
|
||||
replaceCalleeToken(MarkCalleeToken(trc, calleeToken()));
|
||||
|
||||
@ -208,7 +208,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).
|
||||
IonFrameIterator iter(cx);
|
||||
JitFrameIterator iter(cx);
|
||||
JS_ASSERT(iter.returnAddress() == nullptr);
|
||||
BaselineScript *baseline = fp->script()->baselineScript();
|
||||
iter.current()->setReturnAddress(baseline->returnAddressForIC(baseline->icEntry(0)));
|
||||
|
@ -296,7 +296,7 @@ class BaselineFrame
|
||||
flags_ |= OVER_RECURSED;
|
||||
}
|
||||
|
||||
void trace(JSTracer *trc, IonFrameIterator &frame);
|
||||
void trace(JSTracer *trc, JitFrameIterator &frame);
|
||||
|
||||
bool isFunctionFrame() const {
|
||||
return CalleeTokenIsFunction(calleeToken());
|
||||
|
@ -773,7 +773,7 @@ IsTopFrameConstructing(JSContext *cx)
|
||||
{
|
||||
JS_ASSERT(cx->currentlyRunningInJit());
|
||||
JitActivationIterator activations(cx->runtime());
|
||||
IonFrameIterator iter(activations);
|
||||
JitFrameIterator iter(activations);
|
||||
JS_ASSERT(iter.type() == JitFrame_Exit);
|
||||
|
||||
++iter;
|
||||
|
@ -931,7 +931,7 @@ jit::ToggleBaselineSPS(JSRuntime *runtime, bool enable)
|
||||
static void
|
||||
MarkActiveBaselineScripts(JSRuntime *rt, const JitActivationIterator &activation)
|
||||
{
|
||||
for (jit::IonFrameIterator iter(activation); !iter.done(); ++iter) {
|
||||
for (jit::JitFrameIterator iter(activation); !iter.done(); ++iter) {
|
||||
switch (iter.type()) {
|
||||
case JitFrame_BaselineJS:
|
||||
iter.script()->baselineScript()->setActive();
|
||||
|
@ -2514,7 +2514,7 @@ InvalidateActivation(FreeOp *fop, uint8_t *ionTop, bool invalidateAll)
|
||||
|
||||
size_t frameno = 1;
|
||||
|
||||
for (IonFrameIterator it(ionTop, SequentialExecution); !it.done(); ++it, ++frameno) {
|
||||
for (JitFrameIterator it(ionTop, SequentialExecution); !it.done(); ++it, ++frameno) {
|
||||
JS_ASSERT_IF(frameno == 1, it.type() == JitFrame_Exit);
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -2880,7 +2880,7 @@ jit::ForbidCompilation(JSContext *cx, JSScript *script, ExecutionMode mode)
|
||||
case SequentialExecution:
|
||||
if (script->hasIonScript()) {
|
||||
// It is only safe to modify script->ion if the script is not currently
|
||||
// running, because IonFrameIterator needs to tell what ionScript to
|
||||
// running, because JitFrameIterator needs to tell what ionScript to
|
||||
// use (either the one on the JSScript, or the one hidden in the
|
||||
// breadcrumbs Invalidation() leaves). Therefore, if invalidation
|
||||
// fails, we cannot disable the script.
|
||||
|
@ -11,11 +11,11 @@
|
||||
|
||||
#include "jit/IonFrames.h"
|
||||
|
||||
#include "jit/IonFrameIterator.h"
|
||||
#include "jit/JitFrameIterator.h"
|
||||
#include "jit/LIR.h"
|
||||
#include "vm/ForkJoin.h"
|
||||
|
||||
#include "jit/IonFrameIterator-inl.h"
|
||||
#include "jit/JitFrameIterator-inl.h"
|
||||
|
||||
namespace js {
|
||||
namespace jit {
|
||||
@ -31,28 +31,28 @@ SafepointIndex::resolve()
|
||||
}
|
||||
|
||||
inline uint8_t *
|
||||
IonFrameIterator::returnAddress() const
|
||||
JitFrameIterator::returnAddress() const
|
||||
{
|
||||
IonCommonFrameLayout *current = (IonCommonFrameLayout *) current_;
|
||||
return current->returnAddress();
|
||||
}
|
||||
|
||||
inline size_t
|
||||
IonFrameIterator::prevFrameLocalSize() const
|
||||
JitFrameIterator::prevFrameLocalSize() const
|
||||
{
|
||||
IonCommonFrameLayout *current = (IonCommonFrameLayout *) current_;
|
||||
return current->prevFrameLocalSize();
|
||||
}
|
||||
|
||||
inline FrameType
|
||||
IonFrameIterator::prevType() const
|
||||
JitFrameIterator::prevType() const
|
||||
{
|
||||
IonCommonFrameLayout *current = (IonCommonFrameLayout *) current_;
|
||||
return current->prevType();
|
||||
}
|
||||
|
||||
inline bool
|
||||
IonFrameIterator::isFakeExitFrame() const
|
||||
JitFrameIterator::isFakeExitFrame() const
|
||||
{
|
||||
bool res = (prevType() == JitFrame_Unwound_Rectifier ||
|
||||
prevType() == JitFrame_Unwound_IonJS ||
|
||||
@ -62,7 +62,7 @@ IonFrameIterator::isFakeExitFrame() const
|
||||
}
|
||||
|
||||
inline IonExitFrameLayout *
|
||||
IonFrameIterator::exitFrame() const
|
||||
JitFrameIterator::exitFrame() const
|
||||
{
|
||||
JS_ASSERT(type() == JitFrame_Exit);
|
||||
JS_ASSERT(!isFakeExitFrame());
|
||||
@ -72,7 +72,7 @@ IonFrameIterator::exitFrame() const
|
||||
inline BaselineFrame *
|
||||
GetTopBaselineFrame(JSContext *cx)
|
||||
{
|
||||
IonFrameIterator iter(cx);
|
||||
JitFrameIterator iter(cx);
|
||||
JS_ASSERT(iter.type() == JitFrame_Exit);
|
||||
++iter;
|
||||
if (iter.isBaselineStub())
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "vm/ForkJoin.h"
|
||||
#include "vm/Interpreter.h"
|
||||
|
||||
#include "jit/IonFrameIterator-inl.h"
|
||||
#include "jit/JitFrameIterator-inl.h"
|
||||
#include "vm/Probes-inl.h"
|
||||
|
||||
namespace js {
|
||||
@ -72,7 +72,7 @@ ReadFrameBooleanSlot(IonJSFrameLayout *fp, int32_t slot)
|
||||
return *(bool *)((char *)fp + OffsetOfFrameSlot(slot));
|
||||
}
|
||||
|
||||
IonFrameIterator::IonFrameIterator(JSContext *cx)
|
||||
JitFrameIterator::JitFrameIterator(JSContext *cx)
|
||||
: current_(cx->mainThread().ionTop),
|
||||
type_(JitFrame_Exit),
|
||||
returnAddressToFp_(nullptr),
|
||||
@ -83,7 +83,7 @@ IonFrameIterator::IonFrameIterator(JSContext *cx)
|
||||
{
|
||||
}
|
||||
|
||||
IonFrameIterator::IonFrameIterator(const ActivationIterator &activations)
|
||||
JitFrameIterator::JitFrameIterator(const ActivationIterator &activations)
|
||||
: current_(activations.jitTop()),
|
||||
type_(JitFrame_Exit),
|
||||
returnAddressToFp_(nullptr),
|
||||
@ -94,7 +94,7 @@ IonFrameIterator::IonFrameIterator(const ActivationIterator &activations)
|
||||
{
|
||||
}
|
||||
|
||||
IonFrameIterator::IonFrameIterator(IonJSFrameLayout *fp, ExecutionMode mode)
|
||||
JitFrameIterator::JitFrameIterator(IonJSFrameLayout *fp, ExecutionMode mode)
|
||||
: current_((uint8_t *)fp),
|
||||
type_(JitFrame_IonJS),
|
||||
returnAddressToFp_(fp->returnAddress()),
|
||||
@ -104,14 +104,14 @@ IonFrameIterator::IonFrameIterator(IonJSFrameLayout *fp, ExecutionMode mode)
|
||||
}
|
||||
|
||||
bool
|
||||
IonFrameIterator::checkInvalidation() const
|
||||
JitFrameIterator::checkInvalidation() const
|
||||
{
|
||||
IonScript *dummy;
|
||||
return checkInvalidation(&dummy);
|
||||
}
|
||||
|
||||
bool
|
||||
IonFrameIterator::checkInvalidation(IonScript **ionScriptOut) const
|
||||
JitFrameIterator::checkInvalidation(IonScript **ionScriptOut) const
|
||||
{
|
||||
uint8_t *returnAddr = returnAddressToFp();
|
||||
JSScript *script = this->script();
|
||||
@ -137,13 +137,13 @@ IonFrameIterator::checkInvalidation(IonScript **ionScriptOut) const
|
||||
}
|
||||
|
||||
CalleeToken
|
||||
IonFrameIterator::calleeToken() const
|
||||
JitFrameIterator::calleeToken() const
|
||||
{
|
||||
return ((IonJSFrameLayout *) current_)->calleeToken();
|
||||
}
|
||||
|
||||
JSFunction *
|
||||
IonFrameIterator::callee() const
|
||||
JitFrameIterator::callee() const
|
||||
{
|
||||
JS_ASSERT(isScripted());
|
||||
JS_ASSERT(isFunctionFrame());
|
||||
@ -151,7 +151,7 @@ IonFrameIterator::callee() const
|
||||
}
|
||||
|
||||
JSFunction *
|
||||
IonFrameIterator::maybeCallee() const
|
||||
JitFrameIterator::maybeCallee() const
|
||||
{
|
||||
if (isScripted() && (isFunctionFrame()))
|
||||
return callee();
|
||||
@ -159,7 +159,7 @@ IonFrameIterator::maybeCallee() const
|
||||
}
|
||||
|
||||
bool
|
||||
IonFrameIterator::isNative() const
|
||||
JitFrameIterator::isNative() const
|
||||
{
|
||||
if (type_ != JitFrame_Exit || isFakeExitFrame())
|
||||
return false;
|
||||
@ -167,7 +167,7 @@ IonFrameIterator::isNative() const
|
||||
}
|
||||
|
||||
bool
|
||||
IonFrameIterator::isOOLNative() const
|
||||
JitFrameIterator::isOOLNative() const
|
||||
{
|
||||
if (type_ != JitFrame_Exit)
|
||||
return false;
|
||||
@ -175,7 +175,7 @@ IonFrameIterator::isOOLNative() const
|
||||
}
|
||||
|
||||
bool
|
||||
IonFrameIterator::isOOLPropertyOp() const
|
||||
JitFrameIterator::isOOLPropertyOp() const
|
||||
{
|
||||
if (type_ != JitFrame_Exit)
|
||||
return false;
|
||||
@ -183,7 +183,7 @@ IonFrameIterator::isOOLPropertyOp() const
|
||||
}
|
||||
|
||||
bool
|
||||
IonFrameIterator::isOOLProxy() const
|
||||
JitFrameIterator::isOOLProxy() const
|
||||
{
|
||||
if (type_ != JitFrame_Exit)
|
||||
return false;
|
||||
@ -191,7 +191,7 @@ IonFrameIterator::isOOLProxy() const
|
||||
}
|
||||
|
||||
bool
|
||||
IonFrameIterator::isDOMExit() const
|
||||
JitFrameIterator::isDOMExit() const
|
||||
{
|
||||
if (type_ != JitFrame_Exit)
|
||||
return false;
|
||||
@ -199,13 +199,13 @@ IonFrameIterator::isDOMExit() const
|
||||
}
|
||||
|
||||
bool
|
||||
IonFrameIterator::isFunctionFrame() const
|
||||
JitFrameIterator::isFunctionFrame() const
|
||||
{
|
||||
return CalleeTokenIsFunction(calleeToken());
|
||||
}
|
||||
|
||||
JSScript *
|
||||
IonFrameIterator::script() const
|
||||
JitFrameIterator::script() const
|
||||
{
|
||||
JS_ASSERT(isScripted());
|
||||
if (isBaselineJS())
|
||||
@ -216,7 +216,7 @@ IonFrameIterator::script() const
|
||||
}
|
||||
|
||||
void
|
||||
IonFrameIterator::baselineScriptAndPc(JSScript **scriptRes, jsbytecode **pcRes) const
|
||||
JitFrameIterator::baselineScriptAndPc(JSScript **scriptRes, jsbytecode **pcRes) const
|
||||
{
|
||||
JS_ASSERT(isBaselineJS());
|
||||
JSScript *script = this->script();
|
||||
@ -246,7 +246,7 @@ IonFrameIterator::baselineScriptAndPc(JSScript **scriptRes, jsbytecode **pcRes)
|
||||
}
|
||||
|
||||
Value *
|
||||
IonFrameIterator::actualArgs() const
|
||||
JitFrameIterator::actualArgs() const
|
||||
{
|
||||
return jsFrame()->argv() + 1;
|
||||
}
|
||||
@ -275,7 +275,7 @@ SizeOfFramePrefix(FrameType type)
|
||||
}
|
||||
|
||||
uint8_t *
|
||||
IonFrameIterator::prevFp() const
|
||||
JitFrameIterator::prevFp() const
|
||||
{
|
||||
size_t currentSize = SizeOfFramePrefix(type_);
|
||||
// This quick fix must be removed as soon as bug 717297 land. This is
|
||||
@ -290,8 +290,8 @@ IonFrameIterator::prevFp() const
|
||||
return current_ + currentSize;
|
||||
}
|
||||
|
||||
IonFrameIterator &
|
||||
IonFrameIterator::operator++()
|
||||
JitFrameIterator &
|
||||
JitFrameIterator::operator++()
|
||||
{
|
||||
JS_ASSERT(type_ != JitFrame_Entry);
|
||||
|
||||
@ -319,7 +319,7 @@ IonFrameIterator::operator++()
|
||||
}
|
||||
|
||||
uintptr_t *
|
||||
IonFrameIterator::spillBase() const
|
||||
JitFrameIterator::spillBase() const
|
||||
{
|
||||
// Get the base address to where safepoint registers are spilled.
|
||||
// Out-of-line calls do not unwind the extra padding space used to
|
||||
@ -329,7 +329,7 @@ IonFrameIterator::spillBase() const
|
||||
}
|
||||
|
||||
MachineState
|
||||
IonFrameIterator::machineState() const
|
||||
JitFrameIterator::machineState() const
|
||||
{
|
||||
SafepointReader reader(ionScript(), safepoint());
|
||||
uintptr_t *spill = spillBase();
|
||||
@ -446,7 +446,7 @@ HandleExceptionIon(JSContext *cx, const InlineFrameIterator &frame, ResumeFromEx
|
||||
}
|
||||
|
||||
static void
|
||||
HandleExceptionBaseline(JSContext *cx, const IonFrameIterator &frame, ResumeFromException *rfe,
|
||||
HandleExceptionBaseline(JSContext *cx, const JitFrameIterator &frame, ResumeFromException *rfe,
|
||||
bool *calledDebugEpilogue)
|
||||
{
|
||||
JS_ASSERT(frame.isBaselineJS());
|
||||
@ -583,7 +583,7 @@ HandleException(ResumeFromException *rfe)
|
||||
if (cx->runtime()->hasIonReturnOverride())
|
||||
cx->runtime()->takeIonReturnOverride();
|
||||
|
||||
IonFrameIterator iter(cx);
|
||||
JitFrameIterator iter(cx);
|
||||
while (!iter.isEntry()) {
|
||||
bool overrecursed = false;
|
||||
if (iter.isIonJS()) {
|
||||
@ -693,7 +693,7 @@ void
|
||||
HandleParallelFailure(ResumeFromException *rfe)
|
||||
{
|
||||
ForkJoinContext *cx = ForkJoinContext::current();
|
||||
IonFrameIterator iter(cx->perThreadData->ionTop, ParallelExecution);
|
||||
JitFrameIterator iter(cx->perThreadData->ionTop, ParallelExecution);
|
||||
|
||||
parallel::Spew(parallel::SpewBailouts, "Bailing from VM reentry");
|
||||
|
||||
@ -774,7 +774,7 @@ MarkCalleeToken(JSTracer *trc, CalleeToken token)
|
||||
|
||||
#ifdef JS_NUNBOX32
|
||||
static inline uintptr_t
|
||||
ReadAllocation(const IonFrameIterator &frame, const LAllocation *a)
|
||||
ReadAllocation(const JitFrameIterator &frame, const LAllocation *a)
|
||||
{
|
||||
if (a->isGeneralReg()) {
|
||||
Register reg = a->toGeneralReg()->reg();
|
||||
@ -791,7 +791,7 @@ ReadAllocation(const IonFrameIterator &frame, const LAllocation *a)
|
||||
#endif
|
||||
|
||||
static void
|
||||
MarkActualArguments(JSTracer *trc, const IonFrameIterator &frame)
|
||||
MarkActualArguments(JSTracer *trc, const JitFrameIterator &frame)
|
||||
{
|
||||
IonJSFrameLayout *layout = frame.jsFrame();
|
||||
JS_ASSERT(CalleeTokenIsFunction(layout->calleeToken()));
|
||||
@ -806,7 +806,7 @@ MarkActualArguments(JSTracer *trc, const IonFrameIterator &frame)
|
||||
|
||||
#ifdef JS_NUNBOX32
|
||||
static inline void
|
||||
WriteAllocation(const IonFrameIterator &frame, const LAllocation *a, uintptr_t value)
|
||||
WriteAllocation(const JitFrameIterator &frame, const LAllocation *a, uintptr_t value)
|
||||
{
|
||||
if (a->isGeneralReg()) {
|
||||
Register reg = a->toGeneralReg()->reg();
|
||||
@ -825,7 +825,7 @@ WriteAllocation(const IonFrameIterator &frame, const LAllocation *a, uintptr_t v
|
||||
#endif
|
||||
|
||||
static void
|
||||
MarkIonJSFrame(JSTracer *trc, const IonFrameIterator &frame)
|
||||
MarkIonJSFrame(JSTracer *trc, const JitFrameIterator &frame)
|
||||
{
|
||||
IonJSFrameLayout *layout = (IonJSFrameLayout *)frame.fp();
|
||||
|
||||
@ -895,7 +895,7 @@ MarkIonJSFrame(JSTracer *trc, const IonFrameIterator &frame)
|
||||
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
static void
|
||||
UpdateIonJSFrameForMinorGC(JSTracer *trc, const IonFrameIterator &frame)
|
||||
UpdateIonJSFrameForMinorGC(JSTracer *trc, const JitFrameIterator &frame)
|
||||
{
|
||||
// Minor GCs may move slots/elements allocated in the nursery. Update
|
||||
// any slots/elements pointers stored in this frame.
|
||||
@ -941,7 +941,7 @@ UpdateIonJSFrameForMinorGC(JSTracer *trc, const IonFrameIterator &frame)
|
||||
#endif
|
||||
|
||||
static void
|
||||
MarkBaselineStubFrame(JSTracer *trc, const IonFrameIterator &frame)
|
||||
MarkBaselineStubFrame(JSTracer *trc, const JitFrameIterator &frame)
|
||||
{
|
||||
// Mark the ICStub pointer stored in the stub frame. This is necessary
|
||||
// so that we don't destroy the stub code after unlinking the stub.
|
||||
@ -958,7 +958,7 @@ MarkBaselineStubFrame(JSTracer *trc, const IonFrameIterator &frame)
|
||||
void
|
||||
JitActivationIterator::jitStackRange(uintptr_t *&min, uintptr_t *&end)
|
||||
{
|
||||
IonFrameIterator frames(jitTop(), SequentialExecution);
|
||||
JitFrameIterator frames(jitTop(), SequentialExecution);
|
||||
|
||||
if (frames.isFakeExitFrame()) {
|
||||
min = reinterpret_cast<uintptr_t *>(frames.fp());
|
||||
@ -994,7 +994,7 @@ JitActivationIterator::jitStackRange(uintptr_t *&min, uintptr_t *&end)
|
||||
}
|
||||
|
||||
static void
|
||||
MarkJitExitFrame(JSTracer *trc, const IonFrameIterator &frame)
|
||||
MarkJitExitFrame(JSTracer *trc, const JitFrameIterator &frame)
|
||||
{
|
||||
// Ignore fake exit frames created by EnsureExitFrame.
|
||||
if (frame.isFakeExitFrame())
|
||||
@ -1134,7 +1134,7 @@ MarkJitExitFrame(JSTracer *trc, const IonFrameIterator &frame)
|
||||
}
|
||||
|
||||
static void
|
||||
MarkRectifierFrame(JSTracer *trc, const IonFrameIterator &frame)
|
||||
MarkRectifierFrame(JSTracer *trc, const JitFrameIterator &frame)
|
||||
{
|
||||
// Mark thisv.
|
||||
//
|
||||
@ -1157,7 +1157,7 @@ MarkJitActivation(JSTracer *trc, const JitActivationIterator &activations)
|
||||
}
|
||||
#endif
|
||||
|
||||
for (IonFrameIterator frames(activations); !frames.done(); ++frames) {
|
||||
for (JitFrameIterator frames(activations); !frames.done(); ++frames) {
|
||||
switch (frames.type()) {
|
||||
case JitFrame_Exit:
|
||||
MarkJitExitFrame(trc, frames);
|
||||
@ -1197,7 +1197,7 @@ UpdateJitActivationsForMinorGC(JSRuntime *rt, JSTracer *trc)
|
||||
{
|
||||
JS_ASSERT(trc->runtime()->isHeapMinorCollecting());
|
||||
for (JitActivationIterator activations(rt); !activations.done(); ++activations) {
|
||||
for (IonFrameIterator frames(activations); !frames.done(); ++frames) {
|
||||
for (JitFrameIterator frames(activations); !frames.done(); ++frames) {
|
||||
if (frames.type() == JitFrame_IonJS)
|
||||
UpdateIonJSFrameForMinorGC(trc, frames);
|
||||
}
|
||||
@ -1220,7 +1220,7 @@ GetPcScript(JSContext *cx, JSScript **scriptRes, jsbytecode **pcRes)
|
||||
JSRuntime *rt = cx->runtime();
|
||||
|
||||
// Recover the return address.
|
||||
IonFrameIterator it(rt->mainThread.ionTop, SequentialExecution);
|
||||
JitFrameIterator it(rt->mainThread.ionTop, SequentialExecution);
|
||||
|
||||
// If the previous frame is a rectifier frame (maybe unwound),
|
||||
// skip past it.
|
||||
@ -1306,7 +1306,7 @@ SnapshotIterator::SnapshotIterator(IonScript *ionScript, SnapshotOffset snapshot
|
||||
JS_ASSERT(snapshotOffset < ionScript->snapshotsListSize());
|
||||
}
|
||||
|
||||
SnapshotIterator::SnapshotIterator(const IonFrameIterator &iter)
|
||||
SnapshotIterator::SnapshotIterator(const JitFrameIterator &iter)
|
||||
: snapshot_(iter.ionScript()->snapshots(),
|
||||
iter.osiIndex()->snapshotOffset(),
|
||||
iter.ionScript()->snapshotsRVATableSize(),
|
||||
@ -1536,7 +1536,7 @@ SnapshotIterator::nextFrame()
|
||||
}
|
||||
|
||||
IonScript *
|
||||
IonFrameIterator::ionScript() const
|
||||
JitFrameIterator::ionScript() const
|
||||
{
|
||||
JS_ASSERT(type() == JitFrame_IonJS);
|
||||
|
||||
@ -1553,7 +1553,7 @@ IonFrameIterator::ionScript() const
|
||||
}
|
||||
|
||||
const SafepointIndex *
|
||||
IonFrameIterator::safepoint() const
|
||||
JitFrameIterator::safepoint() const
|
||||
{
|
||||
if (!cachedSafepointIndex_)
|
||||
cachedSafepointIndex_ = ionScript()->getSafepointIndex(returnAddressToFp());
|
||||
@ -1561,7 +1561,7 @@ IonFrameIterator::safepoint() const
|
||||
}
|
||||
|
||||
const OsiIndex *
|
||||
IonFrameIterator::osiIndex() const
|
||||
JitFrameIterator::osiIndex() const
|
||||
{
|
||||
SafepointReader reader(ionScript(), safepoint());
|
||||
return ionScript()->getOsiIndex(reader.osiReturnPointOffset());
|
||||
@ -1569,7 +1569,7 @@ IonFrameIterator::osiIndex() const
|
||||
|
||||
template <AllowGC allowGC>
|
||||
void
|
||||
InlineFrameIteratorMaybeGC<allowGC>::resetOn(const IonFrameIterator *iter)
|
||||
InlineFrameIteratorMaybeGC<allowGC>::resetOn(const JitFrameIterator *iter)
|
||||
{
|
||||
frame_ = iter;
|
||||
framesRead_ = 0;
|
||||
@ -1580,8 +1580,8 @@ InlineFrameIteratorMaybeGC<allowGC>::resetOn(const IonFrameIterator *iter)
|
||||
findNextFrame();
|
||||
}
|
||||
}
|
||||
template void InlineFrameIteratorMaybeGC<NoGC>::resetOn(const IonFrameIterator *iter);
|
||||
template void InlineFrameIteratorMaybeGC<CanGC>::resetOn(const IonFrameIterator *iter);
|
||||
template void InlineFrameIteratorMaybeGC<NoGC>::resetOn(const JitFrameIterator *iter);
|
||||
template void InlineFrameIteratorMaybeGC<CanGC>::resetOn(const JitFrameIterator *iter);
|
||||
|
||||
template <AllowGC allowGC>
|
||||
void
|
||||
@ -1719,9 +1719,9 @@ template bool InlineFrameIteratorMaybeGC<NoGC>::isConstructing() const;
|
||||
template bool InlineFrameIteratorMaybeGC<CanGC>::isConstructing() const;
|
||||
|
||||
bool
|
||||
IonFrameIterator::isConstructing() const
|
||||
JitFrameIterator::isConstructing() const
|
||||
{
|
||||
IonFrameIterator parent(*this);
|
||||
JitFrameIterator parent(*this);
|
||||
|
||||
// Skip the current frame and look at the caller's.
|
||||
do {
|
||||
@ -1760,7 +1760,7 @@ IonFrameIterator::isConstructing() const
|
||||
}
|
||||
|
||||
unsigned
|
||||
IonFrameIterator::numActualArgs() const
|
||||
JitFrameIterator::numActualArgs() const
|
||||
{
|
||||
if (isScripted())
|
||||
return jsFrame()->numActualArgs();
|
||||
@ -1791,7 +1791,7 @@ struct DumpOp {
|
||||
};
|
||||
|
||||
void
|
||||
IonFrameIterator::dumpBaseline() const
|
||||
JitFrameIterator::dumpBaseline() const
|
||||
{
|
||||
JS_ASSERT(isBaselineJS());
|
||||
|
||||
@ -1898,7 +1898,7 @@ template void InlineFrameIteratorMaybeGC<NoGC>::dump() const;
|
||||
template void InlineFrameIteratorMaybeGC<CanGC>::dump() const;
|
||||
|
||||
void
|
||||
IonFrameIterator::dump() const
|
||||
JitFrameIterator::dump() const
|
||||
{
|
||||
switch (type_) {
|
||||
case JitFrame_Entry:
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "jscntxt.h"
|
||||
#include "jsfun.h"
|
||||
|
||||
#include "jit/IonFrameIterator.h"
|
||||
#include "jit/JitFrameIterator.h"
|
||||
|
||||
namespace js {
|
||||
namespace jit {
|
||||
@ -282,7 +282,7 @@ MakeFrameDescriptor(uint32_t frameSize, FrameType type)
|
||||
inline JSScript *
|
||||
GetTopIonJSScript(uint8_t *ionTop, void **returnAddrOut, ExecutionMode mode)
|
||||
{
|
||||
IonFrameIterator iter(ionTop, mode);
|
||||
JitFrameIterator iter(ionTop, mode);
|
||||
JS_ASSERT(iter.type() == JitFrame_Exit);
|
||||
++iter;
|
||||
|
||||
|
@ -4,12 +4,12 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef jit_IonFrameIterator_inl_h
|
||||
#define jit_IonFrameIterator_inl_h
|
||||
#ifndef jit_JitFrameIterator_inl_h
|
||||
#define jit_JitFrameIterator_inl_h
|
||||
|
||||
#ifdef JS_ION
|
||||
|
||||
#include "jit/IonFrameIterator.h"
|
||||
#include "jit/JitFrameIterator.h"
|
||||
|
||||
#include "jit/Bailouts.h"
|
||||
#include "jit/BaselineFrame.h"
|
||||
@ -34,7 +34,7 @@ InlineFrameIteratorMaybeGC<allowGC>::InlineFrameIteratorMaybeGC(
|
||||
}
|
||||
|
||||
inline BaselineFrame *
|
||||
IonFrameIterator::baselineFrame() const
|
||||
JitFrameIterator::baselineFrame() const
|
||||
{
|
||||
JS_ASSERT(isBaselineJS());
|
||||
return (BaselineFrame *)(fp() - BaselineFrame::FramePointerOffset - BaselineFrame::Size());
|
||||
@ -45,4 +45,4 @@ IonFrameIterator::baselineFrame() const
|
||||
|
||||
#endif // JS_ION
|
||||
|
||||
#endif /* jit_IonFrameIterator_inl_h */
|
||||
#endif /* jit_JitFrameIterator_inl_h */
|
@ -4,8 +4,8 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef jit_IonFrameIterator_h
|
||||
#define jit_IonFrameIterator_h
|
||||
#ifndef jit_JitFrameIterator_h
|
||||
#define jit_JitFrameIterator_h
|
||||
|
||||
#ifdef JS_ION
|
||||
|
||||
@ -81,7 +81,7 @@ class BaselineFrame;
|
||||
|
||||
class JitActivation;
|
||||
|
||||
class IonFrameIterator
|
||||
class JitFrameIterator
|
||||
{
|
||||
protected:
|
||||
uint8_t *current_;
|
||||
@ -97,7 +97,7 @@ class IonFrameIterator
|
||||
void dumpBaseline() const;
|
||||
|
||||
public:
|
||||
explicit IonFrameIterator(uint8_t *top, ExecutionMode mode)
|
||||
explicit JitFrameIterator(uint8_t *top, ExecutionMode mode)
|
||||
: current_(top),
|
||||
type_(JitFrame_Exit),
|
||||
returnAddressToFp_(nullptr),
|
||||
@ -107,9 +107,9 @@ class IonFrameIterator
|
||||
mode_(mode)
|
||||
{ }
|
||||
|
||||
explicit IonFrameIterator(JSContext *cx);
|
||||
explicit IonFrameIterator(const ActivationIterator &activations);
|
||||
explicit IonFrameIterator(IonJSFrameLayout *fp, ExecutionMode mode);
|
||||
explicit JitFrameIterator(JSContext *cx);
|
||||
explicit JitFrameIterator(const ActivationIterator &activations);
|
||||
explicit JitFrameIterator(IonJSFrameLayout *fp, ExecutionMode mode);
|
||||
|
||||
// Current frame information.
|
||||
FrameType type() const {
|
||||
@ -195,7 +195,7 @@ class IonFrameIterator
|
||||
inline bool done() const {
|
||||
return type_ == JitFrame_Entry;
|
||||
}
|
||||
IonFrameIterator &operator++();
|
||||
JitFrameIterator &operator++();
|
||||
|
||||
// Returns the IonScript associated with this JS frame.
|
||||
IonScript *ionScript() const;
|
||||
@ -351,7 +351,7 @@ class SnapshotIterator
|
||||
|
||||
SnapshotIterator(IonScript *ionScript, SnapshotOffset snapshotOffset,
|
||||
IonJSFrameLayout *fp, const MachineState &machine);
|
||||
SnapshotIterator(const IonFrameIterator &iter);
|
||||
SnapshotIterator(const JitFrameIterator &iter);
|
||||
SnapshotIterator(const IonBailoutIterator &iter);
|
||||
SnapshotIterator();
|
||||
|
||||
@ -423,7 +423,7 @@ class SnapshotIterator
|
||||
template <AllowGC allowGC=CanGC>
|
||||
class InlineFrameIteratorMaybeGC
|
||||
{
|
||||
const IonFrameIterator *frame_;
|
||||
const JitFrameIterator *frame_;
|
||||
SnapshotIterator start_;
|
||||
SnapshotIterator si_;
|
||||
uint32_t framesRead_;
|
||||
@ -447,14 +447,14 @@ class InlineFrameIteratorMaybeGC
|
||||
void findNextFrame();
|
||||
|
||||
public:
|
||||
InlineFrameIteratorMaybeGC(JSContext *cx, const IonFrameIterator *iter)
|
||||
InlineFrameIteratorMaybeGC(JSContext *cx, const JitFrameIterator *iter)
|
||||
: callee_(cx),
|
||||
script_(cx)
|
||||
{
|
||||
resetOn(iter);
|
||||
}
|
||||
|
||||
InlineFrameIteratorMaybeGC(JSRuntime *rt, const IonFrameIterator *iter)
|
||||
InlineFrameIteratorMaybeGC(JSRuntime *rt, const JitFrameIterator *iter)
|
||||
: callee_(rt),
|
||||
script_(rt)
|
||||
{
|
||||
@ -614,9 +614,9 @@ class InlineFrameIteratorMaybeGC
|
||||
|
||||
void dump() const;
|
||||
|
||||
void resetOn(const IonFrameIterator *iter);
|
||||
void resetOn(const JitFrameIterator *iter);
|
||||
|
||||
const IonFrameIterator &frame() const {
|
||||
const JitFrameIterator &frame() const {
|
||||
return *frame_;
|
||||
}
|
||||
|
||||
@ -638,4 +638,4 @@ typedef InlineFrameIteratorMaybeGC<NoGC> InlineFrameIteratorNoGC;
|
||||
|
||||
#endif // JS_ION
|
||||
|
||||
#endif /* jit_IonFrameIterator_h */
|
||||
#endif /* jit_JitFrameIterator_h */
|
@ -1018,7 +1018,7 @@ Recompile(JSContext *cx)
|
||||
{
|
||||
JS_ASSERT(cx->currentlyRunningInJit());
|
||||
JitActivationIterator activations(cx->runtime());
|
||||
IonFrameIterator iter(activations);
|
||||
JitFrameIterator iter(activations);
|
||||
|
||||
JS_ASSERT(iter.type() == JitFrame_Exit);
|
||||
++iter;
|
||||
|
@ -70,7 +70,7 @@ static_assert((sizeof(BailoutStack) % 8) == 0, "BailoutStack should be 8-byte al
|
||||
|
||||
IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
|
||||
BailoutStack *bailout)
|
||||
: IonFrameIterator(activations),
|
||||
: JitFrameIterator(activations),
|
||||
machine_(bailout->machine())
|
||||
{
|
||||
uint8_t *sp = bailout->parentStackPointer();
|
||||
@ -105,7 +105,7 @@ IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
|
||||
|
||||
IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
|
||||
InvalidationBailoutStack *bailout)
|
||||
: IonFrameIterator(activations),
|
||||
: JitFrameIterator(activations),
|
||||
machine_(bailout->machine())
|
||||
{
|
||||
returnAddressToFp_ = bailout->osiPointReturnAddress();
|
||||
|
@ -47,7 +47,7 @@ class BailoutStack
|
||||
|
||||
IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
|
||||
BailoutStack *bailout)
|
||||
: IonFrameIterator(activations),
|
||||
: JitFrameIterator(activations),
|
||||
machine_(bailout->machineState())
|
||||
{
|
||||
uint8_t *sp = bailout->parentStackPointer();
|
||||
@ -62,7 +62,7 @@ IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
|
||||
|
||||
IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
|
||||
InvalidationBailoutStack *bailout)
|
||||
: IonFrameIterator(activations),
|
||||
: JitFrameIterator(activations),
|
||||
machine_(bailout->machine())
|
||||
{
|
||||
returnAddressToFp_ = bailout->osiPointReturnAddress();
|
||||
|
@ -67,7 +67,7 @@ class BailoutStack
|
||||
|
||||
IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
|
||||
BailoutStack *bailout)
|
||||
: IonFrameIterator(activations),
|
||||
: JitFrameIterator(activations),
|
||||
machine_(bailout->machine())
|
||||
{
|
||||
uint8_t *sp = bailout->parentStackPointer();
|
||||
@ -102,7 +102,7 @@ IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
|
||||
|
||||
IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
|
||||
InvalidationBailoutStack *bailout)
|
||||
: IonFrameIterator(activations),
|
||||
: JitFrameIterator(activations),
|
||||
machine_(bailout->machine())
|
||||
{
|
||||
returnAddressToFp_ = bailout->osiPointReturnAddress();
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "gc/Marking.h"
|
||||
#ifdef JS_ION
|
||||
#include "jit/Ion.h"
|
||||
#include "jit/IonFrameIterator.h"
|
||||
#include "jit/JitFrameIterator.h"
|
||||
#endif
|
||||
#include "vm/Interpreter.h"
|
||||
#include "vm/Shape.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
#endif
|
||||
#include "vm/Opcodes.h"
|
||||
|
||||
#include "jit/IonFrameIterator-inl.h"
|
||||
#include "jit/JitFrameIterator-inl.h"
|
||||
#include "vm/Interpreter-inl.h"
|
||||
#include "vm/Probes-inl.h"
|
||||
#include "vm/ScopeObject-inl.h"
|
||||
@ -568,7 +568,7 @@ FrameIter::settleOnActivation()
|
||||
|
||||
#ifdef JS_ION
|
||||
if (activation->isJit()) {
|
||||
data_.ionFrames_ = jit::IonFrameIterator(data_.activations_);
|
||||
data_.ionFrames_ = jit::JitFrameIterator(data_.activations_);
|
||||
|
||||
// Stop at the first scripted frame.
|
||||
while (!data_.ionFrames_.isScripted() && !data_.ionFrames_.done())
|
||||
@ -655,7 +655,7 @@ FrameIter::Data::Data(const FrameIter::Data &other)
|
||||
FrameIter::FrameIter(JSContext *cx, SavedOption savedOption)
|
||||
: data_(cx, savedOption, CURRENT_CONTEXT, nullptr)
|
||||
#ifdef JS_ION
|
||||
, ionInlineFrames_(cx, (js::jit::IonFrameIterator*) nullptr)
|
||||
, ionInlineFrames_(cx, (js::jit::JitFrameIterator*) nullptr)
|
||||
#endif
|
||||
{
|
||||
settleOnActivation();
|
||||
@ -665,7 +665,7 @@ FrameIter::FrameIter(JSContext *cx, ContextOption contextOption,
|
||||
SavedOption savedOption, JSPrincipals *principals)
|
||||
: data_(cx, savedOption, contextOption, principals)
|
||||
#ifdef JS_ION
|
||||
, ionInlineFrames_(cx, (js::jit::IonFrameIterator*) nullptr)
|
||||
, ionInlineFrames_(cx, (js::jit::JitFrameIterator*) nullptr)
|
||||
#endif
|
||||
{
|
||||
settleOnActivation();
|
||||
@ -1107,7 +1107,7 @@ FrameIter::updatePcQuadratic()
|
||||
++data_.activations_;
|
||||
|
||||
// Look for the current frame.
|
||||
data_.ionFrames_ = jit::IonFrameIterator(data_.activations_);
|
||||
data_.ionFrames_ = jit::JitFrameIterator(data_.activations_);
|
||||
while (!data_.ionFrames_.isBaselineJS() || data_.ionFrames_.baselineFrame() != frame)
|
||||
++data_.ionFrames_;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "jsfun.h"
|
||||
#include "jsscript.h"
|
||||
|
||||
#include "jit/IonFrameIterator.h"
|
||||
#include "jit/JitFrameIterator.h"
|
||||
#ifdef CHECK_OSIPOINT_REGISTERS
|
||||
#include "jit/Registers.h" // for RegisterDump
|
||||
#endif
|
||||
@ -1515,7 +1515,7 @@ class FrameIter
|
||||
ActivationIterator activations_;
|
||||
|
||||
#ifdef JS_ION
|
||||
jit::IonFrameIterator ionFrames_;
|
||||
jit::JitFrameIterator ionFrames_;
|
||||
#endif
|
||||
|
||||
Data(JSContext *cx, SavedOption savedOption, ContextOption contextOption,
|
||||
|
Loading…
Reference in New Issue
Block a user