Package icyllis.arc3d.compiler.analysis
Class Analysis
java.lang.Object
icyllis.arc3d.compiler.analysis.Analysis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhasSideEffects(Expression expr) Determines if `expr` has any side effects.static booleanDetermines if `expr` is a compile-time constant (composed of just constructors and literals).static booleanisSameExpressionTree(Expression left, Expression right) Returns true if both expression trees are the same.static booleanisTrivialExpression(@NonNull Expression expr) static booleanupdateVariableRefKind(Expression expr, int refKind)
-
Constructor Details
-
Analysis
public Analysis()
-
-
Method Details
-
isCompileTimeConstant
Determines if `expr` is a compile-time constant (composed of just constructors and literals). -
updateVariableRefKind
-
isTrivialExpression
-
isSameExpressionTree
Returns true if both expression trees are the same. Used by the optimizer to look for self-assignment or self-comparison; won't necessarily catch complex cases. Rejects expressions that may cause side effects. -
hasSideEffects
Determines if `expr` has any side effects. (Is the expression state-altering or pure?)
-