コード例 #1
0
ファイル: def_use_manager.cpp プロジェクト: Dagarman/mame
void DefUseManager::ForEachUser(
    uint32_t id, const std::function<void(Instruction*)>& f) const {
  ForEachUser(GetDef(id), f);
}
コード例 #2
0
ファイル: def_use_manager.cpp プロジェクト: Dagarman/mame
bool DefUseManager::WhileEachUse(
    uint32_t id, const std::function<bool(Instruction*, uint32_t)>& f) const {
  return WhileEachUse(GetDef(id), f);
}
コード例 #3
0
ファイル: Hex.cpp プロジェクト: molip/Eclipsoid
bool Hex::HasArtifact() const {
    return GetDef().HasArtifact();
}
コード例 #4
0
ファイル: Hex.cpp プロジェクト: molip/Eclipsoid
bool Hex::HasDiscovery() const {
    return GetDef().HasDiscovery();
}
コード例 #5
0
ファイル: Hex.cpp プロジェクト: molip/Eclipsoid
EdgeSet Hex::GetWormholes() const {
    return GetDef().GetWormholes();
}
コード例 #6
0
ファイル: Hex.cpp プロジェクト: molip/Eclipsoid
int Hex::GetVictoryPoints() const {
    return GetDef().GetVictoryPoints();
}
コード例 #7
0
ファイル: Hex.cpp プロジェクト: molip/Eclipsoid
SquareType Square::GetType() const {
    return GetDef().GetType();
}
コード例 #8
0
ファイル: Hex.cpp プロジェクト: molip/Eclipsoid
int Square::GetY() const {
    return GetDef().GetY();
}
コード例 #9
0
ファイル: Hex.cpp プロジェクト: molip/Eclipsoid
void Hex::InitSquares()
{
    VERIFY_MODEL(m_squares.empty());
    for (int i = 0; i < GetDef().GetSquareCount(); ++i)
        m_squares.push_back(Square(*this, i));
}
コード例 #10
0
ファイル: Hex.cpp プロジェクト: molip/Eclipsoid
bool Hex::HasWormhole(Edge e) const
{
    return GetDef().GetWormholes()[RotateEdge(e, -m_nRotation)];
}
コード例 #11
0
ファイル: Hex.cpp プロジェクト: molip/Eclipsoid
TechType Square::GetRequiredTech() const {
    return GetDef().GetRequiredTech();
}
コード例 #12
0
ファイル: rangecheck.cpp プロジェクト: AndreGleichner/coreclr
bool RangeCheck::IsMonotonicallyIncreasing(GenTreePtr expr, SearchPath* path)
{
    JITDUMP("[RangeCheck::IsMonotonicallyIncreasing] %p\n", dspPtr(expr));
    if (path->Lookup(expr))
    {
        return true;
    }

    // Add hashtable entry for expr.
    path->Set(expr, NULL);

    // Remove hashtable entry for expr when we exit the present scope.
    auto code = [&] { path->Remove(expr); };
    jitstd::utility::scoped_code<decltype(code)> finally(code);

    // If the rhs expr is constant, then it is not part of the dependency
    // loop which has to increase monotonically.
    ValueNum vn = expr->gtVNPair.GetConservative();
    if (path->GetCount() > MAX_SEARCH_DEPTH)
    {
        return false;
    }
    else if (m_pCompiler->vnStore->IsVNConstant(vn))
    {
        return true;
    }
    // If the rhs expr is local, then try to find the def of the local.
    else if (expr->IsLocal())
    {
        Location* loc = GetDef(expr);
        if (loc == nullptr)
        {
            return false;
        }
        GenTreePtr asg = loc->parent;
        assert(asg->OperKind() & GTK_ASGOP);
        switch (asg->OperGet())
        {
        case GT_ASG:
            return IsMonotonicallyIncreasing(asg->gtGetOp2(), path);

        case GT_ASG_ADD:
            return IsBinOpMonotonicallyIncreasing(asg->gtGetOp1(), asg->gtGetOp2(), GT_ADD, path);

        default:
            // All other 'asg->OperGet()' kinds, return false
            break;
        }
        JITDUMP("Unknown local definition type\n");
        return false;
    }
    else if (expr->OperGet() == GT_ADD)
    {
        return IsBinOpMonotonicallyIncreasing(expr->gtGetOp1(), expr->gtGetOp2(), GT_ADD, path);
    }
    else if (expr->OperGet() == GT_PHI)
    {
        for (GenTreeArgList* args = expr->gtOp.gtOp1->AsArgList();
                args != nullptr; args = args->Rest())
        {
            // If the arg is already in the path, skip.
            if (path->Lookup(args->Current()))
            {
                continue;
            }
            if (!IsMonotonicallyIncreasing(args->Current(), path))
            {
                JITDUMP("Phi argument not monotonic\n");
                return false;
            }
        }
        return true;
    }
    JITDUMP("Unknown tree type\n");
    return false;
}
コード例 #13
0
ファイル: SymWrap.cpp プロジェクト: 0cch/SymWrap
HRESULT SymTypedef::GetDecl( CString &Info )
{
	return GetDef(Info);
}
コード例 #14
0
ファイル: SymWrap.cpp プロジェクト: 0cch/SymWrap
HRESULT SymDataType::GetDecl( CString &Info )
{
	return GetDef(Info);
}
コード例 #15
0
ファイル: parseline.cpp プロジェクト: jakexie/micmac-archeos
Pt3dr   cReadObject::GetDef(const Pt3dr  & aVal,const double  & aDef)
{
    return Pt3dr ( GetDef(aVal.x,aDef), GetDef(aVal.y,aDef), GetDef(aVal.z,aDef));
}