Class Analysis

java.lang.Object
icyllis.arc3d.compiler.analysis.Analysis

public final class Analysis extends Object
  • Constructor Details

    • Analysis

      public Analysis()
  • Method Details

    • isCompileTimeConstant

      public static boolean isCompileTimeConstant(Expression expr)
      Determines if `expr` is a compile-time constant (composed of just constructors and literals).
    • updateVariableRefKind

      public static boolean updateVariableRefKind(Expression expr, int refKind)
    • isTrivialExpression

      public static boolean isTrivialExpression(@Nonnull Expression expr)
    • isSameExpressionTree

      public static boolean isSameExpressionTree(Expression left, Expression right)
      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

      public static boolean hasSideEffects(Expression expr)
      Determines if `expr` has any side effects. (Is the expression state-altering or pure?)