Bug 902744 - Don't inline NewDenseArray intrinsic if length argument isn't known to be int32. (r=nmatsakis)

This commit is contained in:
Shu-yu Guo 2013-08-09 17:11:44 -07:00
parent ffc54d673f
commit ccfa57bebd

View File

@ -1309,6 +1309,8 @@ IonBuilder::inlineNewDenseArrayForParallelExecution(CallInfo &callInfo)
return InliningStatus_NotInlined;
if (returnTypes->unknownObject() || returnTypes->getObjectCount() != 1)
return InliningStatus_NotInlined;
if (callInfo.getArg(0)->type() != MIRType_Int32)
return InliningStatus_NotInlined;
types::TypeObject *typeObject = returnTypes->getTypeObject(0);
RootedObject templateObject(cx, NewDenseAllocatedArray(cx, 0, NULL, TenuredObject));