mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 927782 - Part 2: Remove HAS_BLOCKCHAIN. r=luke
This commit is contained in:
parent
69541c02eb
commit
603d840378
@ -289,6 +289,8 @@ 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,10 +113,7 @@ BaselineFrame::initForOsr(StackFrame *fp, uint32_t numStackValues)
|
||||
if (fp->hasCallObjUnchecked())
|
||||
flags_ |= BaselineFrame::HAS_CALL_OBJ;
|
||||
|
||||
if (fp->hasBlockChain()) {
|
||||
flags_ |= BaselineFrame::HAS_BLOCKCHAIN;
|
||||
blockChain_ = &fp->blockChain();
|
||||
}
|
||||
blockChain_ = fp->maybeBlockChain();
|
||||
|
||||
if (fp->isEvalFrame()) {
|
||||
flags_ |= BaselineFrame::EVAL;
|
||||
|
@ -38,9 +38,6 @@ class BaselineFrame
|
||||
// The frame has a valid return value. See also StackFrame::HAS_RVAL.
|
||||
HAS_RVAL = 1 << 0,
|
||||
|
||||
// Frame has blockChain_ set.
|
||||
HAS_BLOCKCHAIN = 1 << 1,
|
||||
|
||||
// A call object has been pushed on the scope chain.
|
||||
HAS_CALL_OBJ = 1 << 2,
|
||||
|
||||
@ -72,7 +69,7 @@ class BaselineFrame
|
||||
uint32_t hiReturnValue_;
|
||||
uint32_t frameSize_;
|
||||
JSObject *scopeChain_; // Scope chain (always initialized).
|
||||
StaticBlockObject *blockChain_; // If HAS_BLOCKCHAIN, the static block chain.
|
||||
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.
|
||||
@ -213,7 +210,7 @@ class BaselineFrame
|
||||
}
|
||||
|
||||
bool hasBlockChain() const {
|
||||
return (flags_ & HAS_BLOCKCHAIN) && blockChain_;
|
||||
return blockChain_;
|
||||
}
|
||||
StaticBlockObject &blockChain() const {
|
||||
JS_ASSERT(hasBlockChain());
|
||||
@ -223,11 +220,9 @@ class BaselineFrame
|
||||
return hasBlockChain() ? blockChain_ : nullptr;
|
||||
}
|
||||
void setBlockChain(StaticBlockObject &block) {
|
||||
flags_ |= HAS_BLOCKCHAIN;
|
||||
blockChain_ = █
|
||||
}
|
||||
void setBlockChainNull() {
|
||||
JS_ASSERT(!hasBlockChain());
|
||||
blockChain_ = nullptr;
|
||||
}
|
||||
StaticBlockObject **addressOfBlockChain() {
|
||||
|
@ -77,7 +77,7 @@ StackFrame::initCallFrame(JSContext *cx, StackFrame *prev, jsbytecode *prevpc, V
|
||||
JS_ASSERT(callee.nonLazyScript() == script);
|
||||
|
||||
/* Initialize stack frame members. */
|
||||
flags_ = FUNCTION | HAS_SCOPECHAIN | HAS_BLOCKCHAIN | flagsArg;
|
||||
flags_ = FUNCTION | HAS_SCOPECHAIN | flagsArg;
|
||||
argv_ = argv;
|
||||
exec.fun = &callee;
|
||||
u.nactual = nactual;
|
||||
|
@ -37,7 +37,7 @@ StackFrame::initExecuteFrame(JSContext *cx, JSScript *script, AbstractFramePtr e
|
||||
* script in the context of another frame and the frame type is determined
|
||||
* by the context.
|
||||
*/
|
||||
flags_ = type | HAS_SCOPECHAIN | HAS_BLOCKCHAIN;
|
||||
flags_ = type | HAS_SCOPECHAIN;
|
||||
|
||||
JSObject *callee = nullptr;
|
||||
if (!(flags_ & (GLOBAL))) {
|
||||
@ -366,7 +366,6 @@ StackFrame::pushBlock(JSContext *cx, StaticBlockObject &block)
|
||||
blockChain_ = █
|
||||
}
|
||||
|
||||
flags_ |= HAS_BLOCKCHAIN;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,6 @@ class StackFrame
|
||||
HAS_HOOK_DATA = 0x400, /* frame has hookData_ set */
|
||||
HAS_RVAL = 0x800, /* frame has rval_ set */
|
||||
HAS_SCOPECHAIN = 0x1000, /* frame has scopeChain_ set */
|
||||
HAS_BLOCKCHAIN = 0x2000, /* frame has blockChain_ set */
|
||||
|
||||
/* Debugger state */
|
||||
PREV_UP_TO_DATE = 0x4000, /* see DebugScopes::updateLiveScopes */
|
||||
@ -341,7 +340,7 @@ class StackFrame
|
||||
} u;
|
||||
mutable JSObject *scopeChain_; /* if HAS_SCOPECHAIN, current scope chain */
|
||||
Value rval_; /* if HAS_RVAL, return value of the frame */
|
||||
StaticBlockObject *blockChain_; /* if HAS_BLOCKCHAIN, innermost let block */
|
||||
StaticBlockObject *blockChain_; /* innermost let block */
|
||||
ArgumentsObject *argsObj_; /* if HAS_ARGS_OBJ, the call's arguments object */
|
||||
|
||||
/*
|
||||
@ -605,11 +604,11 @@ class StackFrame
|
||||
*/
|
||||
|
||||
bool hasBlockChain() const {
|
||||
return (flags_ & HAS_BLOCKCHAIN) && blockChain_;
|
||||
return blockChain_;
|
||||
}
|
||||
|
||||
StaticBlockObject *maybeBlockChain() {
|
||||
return (flags_ & HAS_BLOCKCHAIN) ? blockChain_ : nullptr;
|
||||
return blockChain_;
|
||||
}
|
||||
|
||||
StaticBlockObject &blockChain() const {
|
||||
|
Loading…
Reference in New Issue
Block a user