Package icyllis.arc3d.compiler.analysis
Class SymbolUsage
java.lang.Object
icyllis.arc3d.compiler.tree.TreeVisitor
icyllis.arc3d.compiler.analysis.SymbolUsage
Counts the number of usages of a symbol.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
computeFunctionCount
(FunctionDecl functionSymbol) computeStructCount
(Type typeSymbol) computeVariableCounts
(Variable varSymbol) findFunctionCount
(FunctionDecl functionSymbol) findStructCount
(Type typeSymbol) findVariableCounts
(Variable varSymbol) int
getFunctionCount
(FunctionDecl functionSymbol) int
getStructCount
(Type typeSymbol) void
toString()
protected boolean
visitExpression
(Expression expr) Fallback method for any expression kind that has not been overridden.boolean
boolean
visitFunctionDefinition
(FunctionDefinition definition) boolean
visitInterfaceBlock
(InterfaceBlock interfaceBlock) boolean
visitVariableDecl
(VariableDecl variableDecl) boolean
Methods inherited from class icyllis.arc3d.compiler.tree.TreeVisitor
visitBinary, visitBlock, visitBreak, visitConditional, visitConstructorCall, visitContinue, visitDiscard, visitEmpty, visitExpression, visitFieldAccess, visitForLoop, visitFunctionPrototype, visitFunctionReference, visitGlobalVariableDecl, visitIf, visitIndex, visitLiteral, visitPostfix, visitPrefix, visitReturn, visitStatement, visitStructDefinition, visitSwitch, visitSwitchCase, visitSwizzle, visitTopLevelElement, visitTypeReference
-
Field Details
-
mStructCounts
-
mFunctionCounts
-
mVariableCounts
-
-
Constructor Details
-
SymbolUsage
public SymbolUsage()
-
-
Method Details
-
computeStructCount
-
findStructCount
-
getStructCount
-
computeFunctionCount
-
findFunctionCount
-
getFunctionCount
-
computeVariableCounts
-
findVariableCounts
-
add
-
remove
-
visitFunctionDefinition
- Overrides:
visitFunctionDefinition
in classTreeVisitor
-
visitInterfaceBlock
- Overrides:
visitInterfaceBlock
in classTreeVisitor
-
visitFunctionCall
- Overrides:
visitFunctionCall
in classTreeVisitor
-
visitVariableReference
- Overrides:
visitVariableReference
in classTreeVisitor
-
visitExpression
Description copied from class:TreeVisitor
Fallback method for any expression kind that has not been overridden.- Overrides:
visitExpression
in classTreeVisitor
-
visitVariableDecl
- Overrides:
visitVariableDecl
in classTreeVisitor
-
toString
-