Bug 839982 part 6 - Create |this| before creating the resume point when inlining NEW. r=djvj

This commit is contained in:
Jan de Mooij 2013-02-12 13:11:28 +01:00
Родитель 09fed6b339
Коммит e8a4e9dbf1
1 изменённых файлов: 8 добавлений и 8 удалений

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

@ -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());