зеркало из https://github.com/mozilla/gecko-dev.git
Bug 839982 part 6 - Create |this| before creating the resume point when inlining NEW. r=djvj
This commit is contained in:
Родитель
09fed6b339
Коммит
e8a4e9dbf1
|
@ -2867,6 +2867,14 @@ IonBuilder::inlineScriptedCall(HandleFunction target, CallInfo &callInfo)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Create new |this| on the caller-side for inlined constructors.
|
||||
if (callInfo.constructing()) {
|
||||
MDefinition *thisDefn = createThis(target, callInfo.fun());
|
||||
if (!thisDefn)
|
||||
return false;
|
||||
callInfo.setThis(thisDefn);
|
||||
}
|
||||
|
||||
// Push formals to capture in the resumepoint
|
||||
callInfo.pushFormals(current);
|
||||
|
||||
|
@ -2898,14 +2906,6 @@ IonBuilder::inlineScriptedCall(HandleFunction target, CallInfo &callInfo)
|
|||
IonBuilder inlineBuilder(cx, &temp(), &graph(), &oracle,
|
||||
info, inliningDepth + 1, loopDepth_);
|
||||
|
||||
// Create new |this| on the caller-side for inlined constructors.
|
||||
if (callInfo.constructing()) {
|
||||
MDefinition *thisDefn = createThis(target, callInfo.fun());
|
||||
if (!thisDefn)
|
||||
return false;
|
||||
callInfo.setThis(thisDefn);
|
||||
}
|
||||
|
||||
// Build the graph.
|
||||
if (!inlineBuilder.buildInline(this, resumePoint, callInfo)) {
|
||||
JS_ASSERT(calleeScript->hasAnalysis());
|
||||
|
|
Загрузка…
Ссылка в новой задаче