Bug 794286 - ReconstructPcStack, Keep hidden stack depth only when following gotos. r=luke

This commit is contained in:
Nicolas B. Pierron 2012-09-29 00:43:25 -07:00
parent 25b4f99fe7
commit 9abbb63e38
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,6 @@
// |jit-test| error: TypeError
for (var i = 0; i < 1; i++) {
let y
if (undefined) continue
undefined.e
}

View File

@ -6431,6 +6431,7 @@ ReconstructPCStack(JSContext *cx, JSScript *script, jsbytecode *target,
if (0 < jmpoff && pc + jmpoff <= target) {
pc += jmpoff;
oplen = 0;
/* Use the Hidden pc count if we follow the goto */
if (hpcdepth != unsigned(-1)) {
pcdepth = hpcdepth;
hpcdepth = unsigned(-1);
@ -6438,8 +6439,11 @@ ReconstructPCStack(JSContext *cx, JSScript *script, jsbytecode *target,
continue;
}
if (!script->hasTrynotes())
if (!script->hasTrynotes()) {
/* Use the normal pc count if continue after the goto */
hpcdepth = unsigned(-1);
continue;
}
/*
* If we do not follow a goto we look for another mean to continue