本文整理汇总了C++中SSATmp::isA方法的典型用法代码示例。如果您正苦于以下问题:C++ SSATmp::isA方法的具体用法?C++ SSATmp::isA怎么用?C++ SSATmp::isA使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SSATmp
的用法示例。
在下文中一共展示了SSATmp::isA方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: modifiedStkPtr
SSATmp* IRInstruction::modifiedStkPtr() const {
assert(modifiesStack());
assert(MInstrEffects::supported(this));
SSATmp* sp = dst(hasMainDst() ? 1 : 0);
assert(sp->isA(Type::StkPtr));
return sp;
}
示例2: forceAlloc
PhysReg forceAlloc(const SSATmp& tmp) {
auto inst = tmp.inst();
auto opc = inst->op();
if (tmp.isA(Type::StkPtr)) {
assert(opc == DefSP ||
opc == ReDefSP ||
opc == Call ||
opc == CallArray ||
opc == ContEnter ||
opc == SpillStack ||
opc == SpillFrame ||
opc == CufIterSpillFrame ||
opc == ExceptionBarrier ||
opc == RetAdjustStack ||
opc == InterpOne ||
opc == InterpOneCF ||
opc == Mov ||
opc == CheckStk ||
opc == GuardStk ||
opc == AssertStk ||
opc == CastStk ||
opc == CastStkIntToDbl ||
opc == CoerceStk ||
opc == SideExitGuardStk ||
MInstrEffects::supported(opc));
return mcg->backEnd().rVmSp();
}
// LdContActRec and LdAFWHActRec, loading a generator's AR, is the only time
// we have a pointer to an AR that is not in rVmFp.
if (opc != LdContActRec && opc != LdAFWHActRec && tmp.isA(Type::FramePtr)) {
return mcg->backEnd().rVmFp();
}
if (opc == DefMIStateBase) {
assert(tmp.isA(Type::PtrToCell));
return mcg->backEnd().rSp();
}
return InvalidReg;
}
示例3: findClassName
const StringData* findClassName(SSATmp* cls) {
assert(cls->isA(Type::Cls));
if (cls->isConst()) {
return cls->getValClass()->preClass()->name();
}
// Try to get the class name from a LdCls
IRInstruction* clsInst = cls->inst();
if (clsInst->op() == LdCls || clsInst->op() == LdClsCached) {
SSATmp* clsName = clsInst->src(0);
assert(clsName->isA(Type::Str));
if (clsName->isConst()) {
return clsName->getValStr();
}
}
return nullptr;
}
示例4: genBoxLoc
SSATmp* TraceBuilder::genBoxLoc(uint32_t id) {
SSATmp* prevValue = genLdLoc(id);
Type prevType = prevValue->type();
// Don't box if local's value already boxed
if (prevType.isBoxed()) {
return prevValue;
}
assert(prevType.notBoxed());
// The Box helper requires us to incref the values its boxing, but in
// this case we don't need to incref prevValue because we are simply
// transfering its refcount from the local to the box.
if (prevValue->isA(Type::Uninit)) {
// No box can ever contain Uninit, so promote it to InitNull here.
prevValue = genDefInitNull();
}
SSATmp* newValue = gen(Box, prevValue);
gen(StLoc, LocalId(id), m_fpValue, newValue);
return newValue;
}