Package icyllis.arc3d.compiler.analysis
Class Analysis
java.lang.Object
icyllis.arc3d.compiler.analysis.Analysis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
hasSideEffects
(Expression expr) Determines if `expr` has any side effects.static boolean
Determines if `expr` is a compile-time constant (composed of just constructors and literals).static boolean
isSameExpressionTree
(Expression left, Expression right) Returns true if both expression trees are the same.static boolean
isTrivialExpression
(@NonNull Expression expr) static boolean
updateVariableRefKind
(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?)
-