зеркало из https://github.com/mozilla/gecko-dev.git
Bug 919140 - Watch for lazy scripts in AddPossibleCallees, r=jandem.
This commit is contained in:
Родитель
f52d0268b7
Коммит
a2c515239b
|
@ -5680,7 +5680,7 @@ CodeGenerator::link()
|
|||
// only tracked when compiling for parallel execution.
|
||||
CallTargetVector callTargets;
|
||||
if (executionMode == ParallelExecution)
|
||||
AddPossibleCallees(graph.mir(), callTargets);
|
||||
AddPossibleCallees(cx, graph.mir(), callTargets);
|
||||
|
||||
IonScript *ionScript =
|
||||
IonScript::New(cx, graph.totalSlotCount(), scriptFrameSize, snapshots_.size(),
|
||||
|
|
|
@ -780,10 +780,8 @@ static bool
|
|||
AddCallTarget(HandleScript script, CallTargetVector &targets);
|
||||
|
||||
bool
|
||||
jit::AddPossibleCallees(MIRGraph &graph, CallTargetVector &targets)
|
||||
jit::AddPossibleCallees(JSContext *cx, MIRGraph &graph, CallTargetVector &targets)
|
||||
{
|
||||
JSContext *cx = GetIonContext()->cx;
|
||||
|
||||
for (ReversePostorderIterator block(graph.rpoBegin()); block != graph.rpoEnd(); block++) {
|
||||
for (MInstructionIterator ins(block->begin()); ins != block->end(); ins++)
|
||||
{
|
||||
|
@ -797,8 +795,8 @@ jit::AddPossibleCallees(MIRGraph &graph, CallTargetVector &targets)
|
|||
JS_ASSERT_IF(!target->isInterpreted(), target->hasParallelNative());
|
||||
|
||||
if (target->isInterpreted()) {
|
||||
RootedScript script(cx, target->nonLazyScript());
|
||||
if (!AddCallTarget(script, targets))
|
||||
RootedScript script(cx, target->getOrCreateScript(cx));
|
||||
if (!script || !AddCallTarget(script, targets))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class ParallelSafetyAnalysis
|
|||
// This code may clone scripts and thus may invoke the GC. Hence only
|
||||
// run from the link phase, which executes on the main thread.
|
||||
typedef Vector<JSScript *, 4, IonAllocPolicy> CallTargetVector;
|
||||
bool AddPossibleCallees(MIRGraph &graph, CallTargetVector &targets);
|
||||
bool AddPossibleCallees(JSContext *cx, MIRGraph &graph, CallTargetVector &targets);
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
|
Загрузка…
Ссылка в новой задаче