Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


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
C=98 H=90 G=94

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge