本文整理汇总了C++中LPhi::setDef方法的典型用法代码示例。如果您正苦于以下问题:C++ LPhi::setDef方法的具体用法?C++ LPhi::setDef怎么用?C++ LPhi::setDef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPhi
的用法示例。
在下文中一共展示了LPhi::setDef方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getVirtualRegister
void
LIRGeneratorARM::defineUntypedPhi(MPhi* phi, size_t lirIndex)
{
LPhi* type = current->getPhi(lirIndex + VREG_TYPE_OFFSET);
LPhi* payload = current->getPhi(lirIndex + VREG_DATA_OFFSET);
uint32_t typeVreg = getVirtualRegister();
phi->setVirtualRegister(typeVreg);
uint32_t payloadVreg = getVirtualRegister();
MOZ_ASSERT(typeVreg + 1 == payloadVreg);
type->setDef(0, LDefinition(typeVreg, LDefinition::TYPE));
payload->setDef(0, LDefinition(payloadVreg, LDefinition::PAYLOAD));
annotate(type);
annotate(payload);
}
示例2: getVirtualRegister
void
LIRGeneratorARM::defineInt64Phi(MPhi* phi, size_t lirIndex)
{
LPhi* low = current->getPhi(lirIndex + INT64LOW_INDEX);
LPhi* high = current->getPhi(lirIndex + INT64HIGH_INDEX);
uint32_t lowVreg = getVirtualRegister();
phi->setVirtualRegister(lowVreg);
uint32_t highVreg = getVirtualRegister();
MOZ_ASSERT(lowVreg + INT64HIGH_INDEX == highVreg + INT64LOW_INDEX);
low->setDef(0, LDefinition(lowVreg, LDefinition::INT32));
high->setDef(0, LDefinition(highVreg, LDefinition::INT32));
annotate(high);
annotate(low);
}
示例3: getVirtualRegister
void
LIRGeneratorShared::defineTypedPhi(MPhi* phi, size_t lirIndex)
{
LPhi* lir = current->getPhi(lirIndex);
uint32_t vreg = getVirtualRegister();
phi->setVirtualRegister(vreg);
lir->setDef(0, LDefinition(vreg, LDefinition::TypeFrom(phi->type())));
annotate(lir);
}
示例4: getVirtualRegister
bool
LIRGeneratorARM::defineUntypedPhi(MPhi *phi, size_t lirIndex)
{
LPhi *type = current->getPhi(lirIndex + VREG_TYPE_OFFSET);
LPhi *payload = current->getPhi(lirIndex + VREG_DATA_OFFSET);
uint32_t typeVreg = getVirtualRegister();
if (typeVreg >= MAX_VIRTUAL_REGISTERS)
return false;
phi->setVirtualRegister(typeVreg);
uint32_t payloadVreg = getVirtualRegister();
if (payloadVreg >= MAX_VIRTUAL_REGISTERS)
return false;
JS_ASSERT(typeVreg + 1 == payloadVreg);
type->setDef(0, LDefinition(typeVreg, LDefinition::TYPE));
payload->setDef(0, LDefinition(payloadVreg, LDefinition::PAYLOAD));
annotate(type);
annotate(payload);
return true;
}
示例5: getVirtualRegister
bool
LIRGeneratorShared::defineTypedPhi(MPhi *phi, size_t lirIndex)
{
LPhi *lir = current->getPhi(lirIndex);
uint32_t vreg = getVirtualRegister();
if (vreg >= MAX_VIRTUAL_REGISTERS)
return false;
phi->setVirtualRegister(vreg);
lir->setDef(0, LDefinition(vreg, LDefinition::TypeFrom(phi->type())));
annotate(lir);
return true;
}