Fixed assertion when using recursion in a let block (bug 547791, r=gal).

This commit is contained in:
David Anderson 2010-02-22 13:57:04 -08:00
Родитель 2c683400eb
Коммит 6cd88e0d98
2 изменённых файлов: 22 добавлений и 1 удалений

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

@ -226,7 +226,7 @@ TraceRecorder::upRecursion()
unsigned totalSlots = NativeStackSlots(cx, 1);
unsigned downPostSlots = totalSlots - NativeStackSlots(cx, 0);
FrameInfo* fi = (FrameInfo*)alloca(sizeof(FrameInfo) + totalSlots * sizeof(TraceType));
fi->block = cx->fp->blockChain;
fi->block = cx->fp->down->blockChain;
fi->pc = (jsbytecode*)return_pc;
fi->imacpc = NULL;

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

@ -0,0 +1,21 @@
function Bext(k) {
if (k > 0) {
let i = k + 1;
if (k == 10) {
function x () { i = 2; }
}
Bext(i - 2);
Bext(i - 2);
}
return 0;
}
function f() {
Bext(12);
}
f();
/* Don't assert. */