コード例 #1
0
ファイル: TypePolicy.cpp プロジェクト: edunham/mozjs
static bool
MaybeSimdUnbox(TempAllocator &alloc, MInstruction *ins, MIRType type, unsigned op)
{
    MOZ_ASSERT(IsSimdType(type));
    MDefinition *in = ins->getOperand(op);
    if (in->type() == type)
        return true;

    MSimdUnbox *replace = MSimdUnbox::New(alloc, in, type);
    ins->block()->insertBefore(ins, replace);
    ins->replaceOperand(op, replace);

    return replace->typePolicy()->adjustInputs(alloc, replace);
}
コード例 #2
0
ファイル: TypePolicy.cpp プロジェクト: stormandsun/firefox
bool
SimdSameAsReturnedTypePolicy<Op>::staticAdjustInputs(TempAllocator &alloc, MInstruction *ins)
{
    MIRType type = ins->type();
    MOZ_ASSERT(IsSimdType(type));

    MDefinition *in = ins->getOperand(Op);
    if (in->type() == type)
        return true;

    MSimdUnbox *replace = MSimdUnbox::New(alloc, in, type);
    ins->block()->insertBefore(ins, replace);
    ins->replaceOperand(Op, replace);

    return replace->typePolicy()->adjustInputs(alloc, replace);
}