Revert "Bug 797496 - Ignore hidden PC even with try notes. r=luke"

This reverts changeset 3b7a134bc3aa.
This commit is contained in:
Nicolas B. Pierron 2012-10-04 12:35:03 -07:00
Родитель a27b377cc9
Коммит 86eb03b357
2 изменённых файлов: 20 добавлений и 28 удалений

Просмотреть файл

@ -1,8 +0,0 @@
// |jit-test| error: TypeError
var set = Set(['a']);
var n = 5;
for (let v of set) {
if (n === 0)
break;
let g = set(Set(0xffffffff, n), 1);
}

Просмотреть файл

@ -6436,27 +6436,31 @@ ReconstructPCStack(JSContext *cx, JSScript *script, jsbytecode *target, jsbyteco
continue;
}
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
* at the next PC.
*/
if (script->hasTrynotes()) {
JSTryNote *tn = script->trynotes()->vector;
JSTryNote *tnEnd = tn + script->trynotes()->length;
for (; tn != tnEnd; tn++) {
jsbytecode *start = script->main() + tn->start;
jsbytecode *end = start + tn->length;
if (start < pc && pc <= end && end <= target)
break;
}
JSTryNote *tn = script->trynotes()->vector;
JSTryNote *tnEnd = tn + script->trynotes()->length;
for (; tn != tnEnd; tn++) {
jsbytecode *start = script->main() + tn->start;
jsbytecode *end = start + tn->length;
if (start < pc && pc <= end && end <= target)
break;
}
if (tn != tnEnd) {
pcdepth = tn->stackDepth;
hpcdepth = unsigned(-1);
oplen = 0;
pc = script->main() + tn->start + tn->length;
continue;
}
if (tn != tnEnd) {
pcdepth = tn->stackDepth;
hpcdepth = unsigned(-1);
oplen = 0;
pc = script->main() + tn->start + tn->length;
continue;
}
/*
@ -6465,10 +6469,6 @@ ReconstructPCStack(JSContext *cx, JSScript *script, jsbytecode *target, jsbyteco
*/
if (JSOp(*(pc + oplen)) == JSOP_THROWING)
hpcdepth = pcdepth + 2;
else
/* Use the normal pc count if continue after the goto */
hpcdepth = unsigned(-1);
continue;
}