Package org.eclipse.jdt.internal.compiler.impl

Examples of org.eclipse.jdt.internal.compiler.impl.Constant.booleanValue()


    boolean isConditionTrue = cst == null || (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);

    cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
    boolean isConditionOptimizedTrue = cst == null ||  (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionOptimizedFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);
   
    // process the condition
    LoopingFlowContext condLoopContext = null;
    FlowInfo condInfo = flowInfo.nullInfoLessUnconditionalCopy();
    if (this.condition != null) {
View Full Code Here


      for (int i = 0, max = this.initializations.length; i < max; i++) {
        this.initializations[i].generateCode(this.scope, codeStream);
      }
    }
    Constant cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
    boolean isConditionOptimizedFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);
    if (isConditionOptimizedFalse) {
      this.condition.generateCode(this.scope, codeStream, false);
      // May loose some local variable initializations : affecting the local variable attributes
      if ((this.bits & ASTNode.NeededScope) != 0) {
        codeStream.exitUserScope(this.scope);
View Full Code Here

  Constant cst = optimizedBooleanConstant();
  generateCode(currentScope, codeStream, valueRequired && cst == Constant.NotAConstant);
  if ((cst != Constant.NotAConstant) && (cst.typeID() == TypeIds.T_boolean)) {
    int pc = codeStream.position;
    if (cst.booleanValue() == true) {
      // constant == true
      if (valueRequired) {
        if (falseLabel == null) {
          // implicit falling through the FALSE case
          if (trueLabel != null) {
View Full Code Here

public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
  this.preAssertInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);

  Constant cst = this.assertExpression.optimizedBooleanConstant();
  this.assertExpression.checkNPEbyUnboxing(currentScope, flowContext, flowInfo);
  boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true;
  boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == false;
 
  flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
  FlowInfo conditionFlowInfo = this.assertExpression.analyseCode(currentScope, flowContext, flowInfo.copy());
  flowContext.extendTimeToLiveForNullCheckedField(1); // survive this assert as a Statement
View Full Code Here

  this.preAssertInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);

  Constant cst = this.assertExpression.optimizedBooleanConstant();
  this.assertExpression.checkNPEbyUnboxing(currentScope, flowContext, flowInfo);
  boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true;
  boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == false;
 
  flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
  FlowInfo conditionFlowInfo = this.assertExpression.analyseCode(currentScope, flowContext, flowInfo.copy());
  flowContext.extendTimeToLiveForNullCheckedField(1); // survive this assert as a Statement
  flowContext.tagBits &= ~FlowContext.HIDE_NULL_COMPARISON_WARNING;
View Full Code Here

}
private FlowInfo analyseBooleanAssertion(BlockScope currentScope, Expression argument,
    FlowContext flowContext, FlowInfo flowInfo, boolean wasInsideAssert, boolean passOnTrue)
{
  Constant cst = argument.optimizedBooleanConstant();
  boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true;
  boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == false;
  int tagBitsSave = flowContext.tagBits;
  flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
  if (!passOnTrue)
    flowContext.tagBits |= FlowContext.INSIDE_NEGATION; // this affects syntactic analysis for fields in EqualExpression
View Full Code Here

private FlowInfo analyseBooleanAssertion(BlockScope currentScope, Expression argument,
    FlowContext flowContext, FlowInfo flowInfo, boolean wasInsideAssert, boolean passOnTrue)
{
  Constant cst = argument.optimizedBooleanConstant();
  boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true;
  boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == false;
  int tagBitsSave = flowContext.tagBits;
  flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
  if (!passOnTrue)
    flowContext.tagBits |= FlowContext.INSIDE_NEGATION; // this affects syntactic analysis for fields in EqualExpression
  FlowInfo conditionFlowInfo = argument.analyseCode(currentScope, flowContext, flowInfo.copy());
View Full Code Here

    }
    this.preCondInitStateIndex =
      currentScope.methodScope().recordInitializationStates(flowInfo);

    Constant cst = this.condition == null ? null : this.condition.constant;
    boolean isConditionTrue = cst == null || (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);

    cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
    boolean isConditionOptimizedTrue = cst == null ||  (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionOptimizedFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);
View Full Code Here

    this.preCondInitStateIndex =
      currentScope.methodScope().recordInitializationStates(flowInfo);

    Constant cst = this.condition == null ? null : this.condition.constant;
    boolean isConditionTrue = cst == null || (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);

    cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
    boolean isConditionOptimizedTrue = cst == null ||  (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionOptimizedFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);
   
View Full Code Here

    Constant cst = this.condition == null ? null : this.condition.constant;
    boolean isConditionTrue = cst == null || (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);

    cst = this.condition == null ? null : this.condition.optimizedBooleanConstant();
    boolean isConditionOptimizedTrue = cst == null ||  (cst != Constant.NotAConstant && cst.booleanValue() == true);
    boolean isConditionOptimizedFalse = cst != null && (cst != Constant.NotAConstant && cst.booleanValue() == false);
   
    // process the condition
    LoopingFlowContext condLoopContext = null;
    FlowInfo condInfo = flowInfo.nullInfoLessUnconditionalCopy();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.