diff --git a/js/src/methodjit/BytecodeAnalyzer.cpp b/js/src/methodjit/BytecodeAnalyzer.cpp index 933dda6e178..89439a33dad 100644 --- a/js/src/methodjit/BytecodeAnalyzer.cpp +++ b/js/src/methodjit/BytecodeAnalyzer.cpp @@ -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; diff --git a/js/src/methodjit/BytecodeAnalyzer.h b/js/src/methodjit/BytecodeAnalyzer.h index 0ebe0140394..2ed7f30945c 100644 --- a/js/src/methodjit/BytecodeAnalyzer.h +++ b/js/src/methodjit/BytecodeAnalyzer.h @@ -62,27 +62,12 @@ namespace js JSScript *script; OpcodeStatus *ops; Vector 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();