mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 976047 - Simplify jsanalyze.cpp now that locals no longer alias the stack r=jandem
This commit is contained in:
parent
0cb6db1009
commit
dcf55cb68d
@ -664,8 +664,7 @@ ScriptAnalysis::trackUseChain(const SSAValue &v)
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the use chain for an SSA value. May be invalid for some opcodes in
|
||||
* scripts where localsAliasStack(). You have been warned!
|
||||
* Get the use chain for an SSA value.
|
||||
*/
|
||||
inline SSAUseChain *&
|
||||
ScriptAnalysis::useChain(const SSAValue &v)
|
||||
@ -934,10 +933,6 @@ ScriptAnalysis::analyzeBytecode(JSContext *cx)
|
||||
JS_ASSERT(GET_LOCALNO(pc) < script_->nfixed());
|
||||
break;
|
||||
|
||||
case JSOP_PUSHBLOCKSCOPE:
|
||||
localsAliasStack_ = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -2297,13 +2292,6 @@ ScriptAnalysis::needsArgsObj(JSContext *cx)
|
||||
if (script_->bindingsAccessedDynamically())
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Since let variables and are not tracked, we cannot soundly perform this
|
||||
* analysis in their presence.
|
||||
*/
|
||||
if (localsAliasStack())
|
||||
return true;
|
||||
|
||||
unsigned pcOff = script_->pcToOffset(script_->argumentsBytecode());
|
||||
|
||||
SeenVector seen(cx);
|
||||
|
@ -60,7 +60,6 @@ class ScriptAnalysis
|
||||
|
||||
/* --------- Bytecode analysis --------- */
|
||||
|
||||
bool localsAliasStack_:1;
|
||||
bool canTrackVars:1;
|
||||
bool argumentsContentsObserved_:1;
|
||||
|
||||
@ -80,12 +79,6 @@ class ScriptAnalysis
|
||||
MOZ_WARN_UNUSED_RESULT
|
||||
bool analyzeBytecode(JSContext *cx);
|
||||
|
||||
/*
|
||||
* True if there are any LOCAL opcodes aliasing values on the stack (above
|
||||
* script_->nfixed).
|
||||
*/
|
||||
bool localsAliasStack() { return localsAliasStack_; }
|
||||
|
||||
bool isReachable(const jsbytecode *pc) { return maybeCode(pc); }
|
||||
|
||||
private:
|
||||
@ -120,8 +113,7 @@ class ScriptAnalysis
|
||||
inline bool trackUseChain(const SSAValue &v);
|
||||
|
||||
/*
|
||||
* Get the use chain for an SSA value. May be invalid for some opcodes in
|
||||
* scripts where localsAliasStack(). You have been warned!
|
||||
* Get the use chain for an SSA value.
|
||||
*/
|
||||
inline SSAUseChain *& useChain(const SSAValue &v);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user