[INFER] Fix more assertions, bug 673705. r=bhackett

--HG--
rename : js/src/jit-test/tests/basic/bug673705.js => js/src/jit-test/tests/basic/bug673705-1.js
This commit is contained in:
Shu-yu Guo 2011-07-26 14:16:59 -07:00
parent 58db813767
commit 263a4c38d2
3 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,12 @@
function bug673705() {
var x;
try {
try {
} catch (e) {
}
} finally {
}
print(x);
return x;
}
assertEq(bug673705(), undefined);

View File

@ -1247,7 +1247,17 @@ inline void
ScriptAnalysis::ensureVariable(LifetimeVariable &var, unsigned until)
{
JS_ASSERT(var.lifetime);
JS_ASSERT(until <= var.lifetime->start);
/*
* If we are already ensured, the current range we are trying to ensure
* should already be included.
*/
if (var.ensured) {
JS_ASSERT(var.lifetime->start <= until);
return;
}
JS_ASSERT(until < var.lifetime->start);
var.lifetime->start = until;
var.ensured = true;
}