Class EqualExpression

All Implemented Interfaces:
OperatorIds, TypeConstants, TypeIds

public class EqualExpression extends BinaryExpression
  • Constructor Details

  • Method Details

    • syntacticFieldAnalysisForFalseBranch

      public void syntacticFieldAnalysisForFalseBranch(FlowInfo flowInfo, FlowContext flowContext)
    • analyseCode

      public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo)
      Overrides:
      analyseCode in class BinaryExpression
    • computeConstant

      public final void computeConstant(TypeBinding leftType, TypeBinding rightType)
    • generateCode

      public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired)
      Normal == or != code generation.
      Overrides:
      generateCode in class BinaryExpression
      Parameters:
      currentScope - org.eclipse.jdt.internal.compiler.lookup.BlockScope
      codeStream - org.eclipse.jdt.internal.compiler.codegen.CodeStream
      valueRequired - boolean
    • generateOptimizedBoolean

      public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, BranchLabel trueLabel, BranchLabel falseLabel, boolean valueRequired)
      Boolean operator code generation Optimized operations are: == and !=
      Overrides:
      generateOptimizedBoolean in class BinaryExpression
    • generateBooleanEqual

      public void generateBooleanEqual(BlockScope currentScope, CodeStream codeStream, boolean valueRequired)
      Boolean generation for == with boolean operands Note this code does not optimize conditional constants !!!!
    • generateOptimizedBooleanEqual

      public void generateOptimizedBooleanEqual(BlockScope currentScope, CodeStream codeStream, BranchLabel trueLabel, BranchLabel falseLabel, boolean valueRequired)
      Boolean generation for == with boolean operands Note this code does not optimize conditional constants !!!!
    • generateNonBooleanEqual

      public void generateNonBooleanEqual(BlockScope currentScope, CodeStream codeStream, boolean valueRequired)
      Boolean generation for == with non-boolean operands
    • generateOptimizedNonBooleanEqual

      public void generateOptimizedNonBooleanEqual(BlockScope currentScope, CodeStream codeStream, BranchLabel trueLabel, BranchLabel falseLabel, boolean valueRequired)
      Boolean generation for == with non-boolean operands
    • isCompactableOperation

      public boolean isCompactableOperation()
      Overrides:
      isCompactableOperation in class BinaryExpression
    • optimizedNullComparisonConstant

      protected Constant optimizedNullComparisonConstant()
      Overrides:
      optimizedNullComparisonConstant in class Expression
    • resolveType

      public TypeBinding resolveType(BlockScope scope)
      Description copied from class: Expression
      Resolve the type of this expression in the context of a blockScope
      Overrides:
      resolveType in class BinaryExpression
      Returns:
      Return the actual type of this expression after resolution
    • traverse

      public void traverse(ASTVisitor visitor, BlockScope scope)
      Description copied from class: Expression
      Traverse an expression in the context of a blockScope
      Overrides:
      traverse in class BinaryExpression