Bug 937058 - Paper over debug-mode checks of stack depth for unreachable bytecode. r=jandem

This commit is contained in:
Andy Wingo
2013-11-11 16:21:20 +01:00
parent 9467e78cf3
commit 143aca9fd2
5 changed files with 88 additions and 63 deletions

View File

@@ -351,14 +351,17 @@ StackUses(JSScript *script, jsbytecode *pc);
extern unsigned
StackDefs(JSScript *script, jsbytecode *pc);
} /* namespace js */
#ifdef DEBUG
/*
* Given bytecode address pc in script's main program code, return the operand
* stack depth just before (JSOp) *pc executes.
* Given bytecode address pc in script's main program code, compute the operand
* stack depth just before (JSOp) *pc executes. If *pc is not reachable, return
* false.
*/
extern unsigned
js_ReconstructStackDepth(JSContext *cx, JSScript *script, jsbytecode *pc);
extern bool
ReconstructStackDepth(JSContext *cx, JSScript *script, jsbytecode *pc, uint32_t *depth);
#endif
} /* namespace js */
#ifdef _MSC_VER
#pragma warning(pop)