本文整理汇总了C++中MCall::block方法的典型用法代码示例。如果您正苦于以下问题:C++ MCall::block方法的具体用法?C++ MCall::block怎么用?C++ MCall::block使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCall
的用法示例。
在下文中一共展示了MCall::block方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: boxAt
bool
CallPolicy::adjustInputs(MInstruction *ins)
{
MCall *call = ins->toCall();
MDefinition *func = call->getFunction();
if (func->type() == MIRType_Object)
return true;
// If the function is impossible to call,
// bail out by causing a subsequent unbox to fail.
if (func->type() != MIRType_Value)
func = boxAt(call, func);
MInstruction *unbox = MUnbox::New(func, MIRType_Object, MUnbox::Fallible);
call->block()->insertBefore(call, unbox);
call->replaceFunction(unbox);
return true;
}
示例2:
bool
CallPolicy::adjustInputs(TempAllocator &alloc, MInstruction *ins)
{
MCall *call = ins->toCall();
MDefinition *func = call->getFunction();
if (func->type() != MIRType_Object) {
MInstruction *unbox = MUnbox::New(alloc, func, MIRType_Object, MUnbox::Fallible);
call->block()->insertBefore(call, unbox);
call->replaceFunction(unbox);
if (!unbox->typePolicy()->adjustInputs(alloc, unbox))
return false;
}
for (uint32_t i = 0; i < call->numStackArgs(); i++)
EnsureOperandNotFloat32(alloc, call, MCall::IndexOfStackArg(i));
return true;
}
示例3: boxAt
bool
CallPolicy::adjustInputs(TempAllocator &alloc, MInstruction *ins)
{
MCall *call = ins->toCall();
MDefinition *func = call->getFunction();
if (func->type() != MIRType_Object) {
// If the function is impossible to call,
// bail out by causing a subsequent unbox to fail.
if (func->type() != MIRType_Value)
func = boxAt(alloc, call, func);
MInstruction *unbox = MUnbox::New(alloc, func, MIRType_Object, MUnbox::Fallible);
call->block()->insertBefore(call, unbox);
call->replaceFunction(unbox);
}
for (uint32_t i = 0; i < call->numStackArgs(); i++)
EnsureOperandNotFloat32(alloc, call, MCall::IndexOfStackArg(i));
return true;
}