Only inline scripts which have already been analyzed, bug 687125. r=dvander

This commit is contained in:
Brian Hackett 2011-09-23 07:02:28 -07:00
Родитель e93045088c
Коммит d0734ccf89
1 изменённых файлов: 11 добавлений и 0 удалений

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

@ -312,6 +312,17 @@ mjit::Compiler::scanInlineCalls(uint32 index, uint32 depth)
}
JSScript *script = fun->script();
/*
* Don't inline calls to scripts which haven't been analyzed.
* We need to analyze the inlined scripts to compile them, and
* doing so can change type information we have queried already
* in making inlining decisions.
*/
if (!script->hasAnalysis() || !script->analysis()->ranInference()) {
okay = false;
break;
}
/*
* The outer and inner scripts must have the same scope. This only
* allows us to inline calls between non-inner functions. Also