Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/skia/skia/src/sksl/analysis/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  SkSLProgramUsage.h

  Sprache: C
 

/*
 * Copyright 2022 Google LLC
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


#ifndef SKSL_PROGRAMUSAGE
#define SKSL_PROGRAMUSAGE

#include "include/core/SkTypes.h"
#include "src/core/SkTHash.h"

namespace SkSL {

class Expression;
class FunctionDeclaration;
class ProgramElement;
class Statement;
class Symbol;
class Variable;

/**
 * Side-car class holding mutable information about a Program's IR
 */

class ProgramUsage {
public:
    struct VariableCounts {
        int fVarExists = 0;  // if this is zero, the Variable might have already been deleted
        int fRead = 0;
        int fWrite = 0;
    };
    VariableCounts get(const Variable&) const;
    bool isDead(const Variable&) const;

    int get(const FunctionDeclaration&) const;

    void add(const Expression* expr);
    void add(const Statement* stmt);
    void add(const ProgramElement& element);
    void remove(const Expression* expr);
    void remove(const Statement* stmt);
    void remove(const ProgramElement& element);

    bool operator==(const ProgramUsage& that) const;
    bool operator!=(const ProgramUsage& that) const { return !(*this == that); }

    // All Symbol* objects in fStructCounts must be StructType*.
    skia_private::THashMap<const Symbol*, int> fStructCounts;
    // All Symbol* objects in fCallCounts must be FunctionDeclaration*.
    skia_private::THashMap<const Symbol*, int> fCallCounts;
    skia_private::THashMap<const Variable*, VariableCounts> fVariableCounts;
};

}  // namespace SkSL

#endif

Messung V0.5 in Prozent
C=93 H=93 G=92

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-08-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.