mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[JAEGER] Removed more expensive bytecodeanalyzer assertions.
This commit is contained in:
parent
7b0af24a39
commit
d5449384ae
@ -71,10 +71,6 @@ BytecodeAnalyzer::analyze(uint32 index)
|
||||
jsbytecode *pc = doList[index];
|
||||
uint32 stackDepth = ops[pc - script->code].stackDepth;
|
||||
|
||||
#ifdef DEBUG
|
||||
bool canAssert = true;
|
||||
#endif
|
||||
|
||||
for (;;) {
|
||||
JSOp op = JSOp(pc[0]);
|
||||
OpcodeStatus &status = ops[pc - script->code];
|
||||
@ -82,17 +78,6 @@ BytecodeAnalyzer::analyze(uint32 index)
|
||||
if (status.visited)
|
||||
return true;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (assertDepths) {
|
||||
jssrcnote *sn = js_GetSrcNote(script, pc);
|
||||
if (sn && SN_TYPE(sn) == SRC_HIDDEN)
|
||||
canAssert = false;
|
||||
|
||||
JS_ASSERT_IF(canAssert && pc > script->main,
|
||||
js_ReconstructStackDepth(cx, script, pc) == stackDepth);
|
||||
}
|
||||
#endif
|
||||
|
||||
status.visited = true;
|
||||
status.stackDepth = stackDepth;
|
||||
|
||||
|
@ -62,27 +62,12 @@ namespace js
|
||||
JSScript *script;
|
||||
OpcodeStatus *ops;
|
||||
Vector<jsbytecode *, 16, ContextAllocPolicy> doList;
|
||||
#ifdef DEBUG
|
||||
bool assertDepths;
|
||||
#endif
|
||||
|
||||
public:
|
||||
BytecodeAnalyzer(JSContext *cx, JSScript *script)
|
||||
: cx(cx), script(script), ops(NULL),
|
||||
doList(ContextAllocPolicy(cx))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
// This takes a very long time with SunSpider's string-tagcloud.
|
||||
if (script->filename) {
|
||||
const char *filename = script->filename;
|
||||
size_t flen = strlen(filename);
|
||||
const char *pat = "string-tagcloud.js";
|
||||
size_t plen = strlen(pat);
|
||||
bool endswith = (plen < flen &&
|
||||
memcmp(filename + flen - plen, pat, plen) == 0);
|
||||
assertDepths = !endswith;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
~BytecodeAnalyzer();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user