mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[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:
parent
58db813767
commit
263a4c38d2
12
js/src/jit-test/tests/basic/bug673705-2.js
Normal file
12
js/src/jit-test/tests/basic/bug673705-2.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
function bug673705() {
|
||||||
|
var x;
|
||||||
|
try {
|
||||||
|
try {
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
}
|
||||||
|
print(x);
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
assertEq(bug673705(), undefined);
|
@ -1247,7 +1247,17 @@ inline void
|
|||||||
ScriptAnalysis::ensureVariable(LifetimeVariable &var, unsigned until)
|
ScriptAnalysis::ensureVariable(LifetimeVariable &var, unsigned until)
|
||||||
{
|
{
|
||||||
JS_ASSERT(var.lifetime);
|
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.lifetime->start = until;
|
||||||
var.ensured = true;
|
var.ensured = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user