Bug 944398: Inline Math.fround even if its returned value hasn't ever been observed; r=bhackett

This commit is contained in:
Benjamin Bouvier 2013-12-19 16:09:42 +01:00
Родитель 576b035153
Коммит 32fb3bf612
1 изменённых файлов: 11 добавлений и 3 удалений

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

@ -894,9 +894,17 @@ IonBuilder::inlineMathFRound(CallInfo &callInfo)
// MIRType can't be Float32, as this point, as getInlineReturnType uses JSVal types
// to infer the returned MIR type.
MIRType returnType = getInlineReturnType();
if (!IsNumberType(returnType))
return InliningStatus_NotInlined;
types::TemporaryTypeSet *returned = getInlineReturnTypeSet();
if (returned->empty()) {
// As there's only one possible returned type, just add it to the observed
// returned typeset
if (!returned->addType(types::Type::DoubleType(), alloc_->lifoAlloc()))
return InliningStatus_Error;
} else {
MIRType returnType = getInlineReturnType();
if (!IsNumberType(returnType))
return InliningStatus_NotInlined;
}
MIRType arg = callInfo.getArg(0)->type();
if (!IsNumberType(arg))