зеркало из https://github.com/mozilla/gecko-dev.git
Bug 927782 - Part 12: Remove blockChain from StackFrame. r=luke
This commit is contained in:
Родитель
d11d3ec85e
Коммит
93f18a615e
|
@ -611,10 +611,6 @@ InitFromBailout(JSContext *cx, HandleScript caller, jsbytecode *callerPC,
|
|||
if (argsObj)
|
||||
blFrame->initArgsObjUnchecked(*argsObj);
|
||||
|
||||
// Ion doesn't compile code with try/catch, so the block object will always be
|
||||
// null.
|
||||
blFrame->setBlockChainNull();
|
||||
|
||||
if (fun) {
|
||||
// The unpacked thisv and arguments should overwrite the pushed args present
|
||||
// in the calling frame.
|
||||
|
|
|
@ -289,8 +289,6 @@ BaselineCompiler::emitPrologue()
|
|||
else
|
||||
masm.storePtr(R1.scratchReg(), frame.addressOfScopeChain());
|
||||
|
||||
masm.storePtr(ImmPtr(nullptr), frame.addressOfBlockChain());
|
||||
|
||||
// Functions with a large number of locals require two stack checks.
|
||||
// The VMCall for a fallible stack check can only occur after the
|
||||
// scope chain has been initialized, as that is required for proper
|
||||
|
|
|
@ -113,8 +113,6 @@ BaselineFrame::initForOsr(StackFrame *fp, uint32_t numStackValues)
|
|||
if (fp->hasCallObjUnchecked())
|
||||
flags_ |= BaselineFrame::HAS_CALL_OBJ;
|
||||
|
||||
blockChain_ = fp->maybeBlockChain();
|
||||
|
||||
if (fp->isEvalFrame()) {
|
||||
flags_ |= BaselineFrame::EVAL;
|
||||
evalScript_ = fp->script();
|
||||
|
|
|
@ -69,11 +69,13 @@ class BaselineFrame
|
|||
uint32_t hiReturnValue_;
|
||||
uint32_t frameSize_;
|
||||
JSObject *scopeChain_; // Scope chain (always initialized).
|
||||
StaticBlockObject *blockChain_; // The static block chain.
|
||||
JSScript *evalScript_; // If isEvalFrame(), the current eval script.
|
||||
ArgumentsObject *argsObj_; // If HAS_ARGS_OBJ, the arguments object.
|
||||
void *hookData_; // If HAS_HOOK_DATA, debugger call hook data.
|
||||
uint32_t flags_;
|
||||
#if JS_BITS_PER_WORD == 32
|
||||
uint32_t padding_; // Pad to 8-byte alignment.
|
||||
#endif
|
||||
|
||||
public:
|
||||
// Distance between the frame pointer and the frame header (return address).
|
||||
|
@ -209,26 +211,6 @@ class BaselineFrame
|
|||
return reinterpret_cast<Value *>(&loReturnValue_);
|
||||
}
|
||||
|
||||
bool hasBlockChain() const {
|
||||
return blockChain_;
|
||||
}
|
||||
StaticBlockObject &blockChain() const {
|
||||
JS_ASSERT(hasBlockChain());
|
||||
return *blockChain_;
|
||||
}
|
||||
StaticBlockObject *maybeBlockChain() const {
|
||||
return hasBlockChain() ? blockChain_ : nullptr;
|
||||
}
|
||||
void setBlockChain(StaticBlockObject &block) {
|
||||
blockChain_ = █
|
||||
}
|
||||
void setBlockChainNull() {
|
||||
blockChain_ = nullptr;
|
||||
}
|
||||
StaticBlockObject **addressOfBlockChain() {
|
||||
return &blockChain_;
|
||||
}
|
||||
|
||||
bool hasCallObj() const {
|
||||
return flags_ & HAS_CALL_OBJ;
|
||||
}
|
||||
|
@ -378,9 +360,6 @@ class BaselineFrame
|
|||
static int reverseOffsetOfScopeChain() {
|
||||
return -int(Size()) + offsetof(BaselineFrame, scopeChain_);
|
||||
}
|
||||
static int reverseOffsetOfBlockChain() {
|
||||
return -int(Size()) + offsetof(BaselineFrame, blockChain_);
|
||||
}
|
||||
static int reverseOffsetOfArgsObj() {
|
||||
return -int(Size()) + offsetof(BaselineFrame, argsObj_);
|
||||
}
|
||||
|
|
|
@ -284,9 +284,6 @@ class FrameInfo
|
|||
Address addressOfScopeChain() const {
|
||||
return Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfScopeChain());
|
||||
}
|
||||
Address addressOfBlockChain() const {
|
||||
return Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfBlockChain());
|
||||
}
|
||||
Address addressOfFlags() const {
|
||||
return Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFlags());
|
||||
}
|
||||
|
|
|
@ -85,8 +85,6 @@ StackFrame::initCallFrame(JSContext *cx, StackFrame *prev, jsbytecode *prevpc, V
|
|||
prev_ = prev;
|
||||
prevpc_ = prevpc;
|
||||
prevsp_ = prevsp;
|
||||
blockChain_= nullptr;
|
||||
JS_ASSERT(!hasBlockChain());
|
||||
JS_ASSERT(!hasHookData());
|
||||
|
||||
initVarsToUndefined();
|
||||
|
@ -516,17 +514,6 @@ AbstractFramePtr::unaliasedActual(unsigned i, MaybeCheckAliasing checkAliasing)
|
|||
#endif
|
||||
}
|
||||
|
||||
inline StaticBlockObject *
|
||||
AbstractFramePtr::maybeBlockChain() const
|
||||
{
|
||||
if (isStackFrame())
|
||||
return asStackFrame()->maybeBlockChain();
|
||||
#ifdef JS_ION
|
||||
return asBaselineFrame()->maybeBlockChain();
|
||||
#else
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid frame");
|
||||
#endif
|
||||
}
|
||||
inline bool
|
||||
AbstractFramePtr::hasCallObj() const
|
||||
{
|
||||
|
|
|
@ -81,7 +81,6 @@ StackFrame::initExecuteFrame(JSContext *cx, JSScript *script, AbstractFramePtr e
|
|||
prev_ = nullptr;
|
||||
prevpc_ = nullptr;
|
||||
prevsp_ = nullptr;
|
||||
blockChain_ = nullptr;
|
||||
|
||||
JS_ASSERT_IF(evalInFramePrev, isDebuggerFrame());
|
||||
evalInFramePrev_ = evalInFramePrev;
|
||||
|
@ -273,7 +272,6 @@ void
|
|||
StackFrame::epilogue(JSContext *cx)
|
||||
{
|
||||
JS_ASSERT(!isYielding());
|
||||
JS_ASSERT(!hasBlockChain());
|
||||
|
||||
RootedScript script(cx, this->script());
|
||||
probes::ExitScript(cx, script, script->function(), hasPushedSPSFrame());
|
||||
|
|
|
@ -178,7 +178,6 @@ class AbstractFramePtr
|
|||
|
||||
inline JSCompartment *compartment() const;
|
||||
|
||||
inline StaticBlockObject *maybeBlockChain() const;
|
||||
inline bool hasCallObj() const;
|
||||
inline bool isGeneratorFrame() const;
|
||||
inline bool isYielding() const;
|
||||
|
@ -337,7 +336,6 @@ class StackFrame
|
|||
} u;
|
||||
mutable JSObject *scopeChain_; /* if HAS_SCOPECHAIN, current scope chain */
|
||||
Value rval_; /* if HAS_RVAL, return value of the frame */
|
||||
StaticBlockObject *blockChain_; /* innermost let block */
|
||||
ArgumentsObject *argsObj_; /* if HAS_ARGS_OBJ, the call's arguments object */
|
||||
|
||||
/*
|
||||
|
@ -594,19 +592,6 @@ class StackFrame
|
|||
* the scope chain.
|
||||
*/
|
||||
|
||||
bool hasBlockChain() const {
|
||||
return blockChain_;
|
||||
}
|
||||
|
||||
StaticBlockObject *maybeBlockChain() {
|
||||
return blockChain_;
|
||||
}
|
||||
|
||||
StaticBlockObject &blockChain() const {
|
||||
JS_ASSERT(hasBlockChain());
|
||||
return *blockChain_;
|
||||
}
|
||||
|
||||
bool pushBlock(JSContext *cx, StaticBlockObject &block);
|
||||
void popBlock(JSContext *cx);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче