зеркало из https://github.com/mozilla/pjs.git
Only inline scripts which have already been analyzed, bug 687125. r=dvander
This commit is contained in:
Родитель
e93045088c
Коммит
d0734ccf89
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче