Examples of UnconditionalFlowInfo


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo

   
    // process the action
    LoopingFlowContext loopingContext =
      new LoopingFlowContext(flowContext, flowInfo, this, breakLabel,
        continueLabel, scope);
    UnconditionalFlowInfo actionInfo =
      condInfo.nullInfoLessUnconditionalCopy();
    actionInfo.markAsDefinitelyUnknown(this.elementVariable.binding);
    FlowInfo exitBranch;
    if (!(action == null || (action.isEmptyBlock()
              && currentScope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_3))) {

      if (!this.action.complainIfUnreachable(actionInfo, scope, false)) {
        actionInfo = action.
          analyseCode(scope, loopingContext, actionInfo).
          unconditionalCopy();
      }

      // code generation can be optimized when no need to continue in the loop
      exitBranch = flowInfo.unconditionalCopy().
        addInitializationsFrom(condInfo.initsWhenFalse());
      // TODO (maxime) no need to test when false: can optimize (same for action being unreachable above)
      if ((actionInfo.tagBits & loopingContext.initsOnContinue.tagBits &
          FlowInfo.UNREACHABLE) != 0) {
        continueLabel = null;
      } else {
        actionInfo = actionInfo.mergedWith(loopingContext.initsOnContinue);
        loopingContext.complainOnDeferredFinalChecks(scope, actionInfo);
        exitBranch.addPotentialInitializationsFrom(actionInfo);
      }
    } else {
      exitBranch = condInfo.initsWhenFalse();
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo

  public final int recordInitializationStates(FlowInfo flowInfo) {

    if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0) return -1;

    UnconditionalFlowInfo unconditionalFlowInfo = flowInfo.unconditionalInitsWithoutSideEffect();
    long[] extraInits = unconditionalFlowInfo.extra == null ?
        null : unconditionalFlowInfo.extra[0];
    long inits = unconditionalFlowInfo.definiteInits;
    checkNextEntry : for (int i = lastIndex; --i >= 0;) {
      if (definiteInits[i] == inits) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo

    // process the action
    LoopingFlowContext loopingContext =
      new LoopingFlowContext(flowContext, flowInfo, this, this.breakLabel,
        this.continueLabel, this.scope);
    UnconditionalFlowInfo actionInfo =
      condInfo.nullInfoLessUnconditionalCopy();
    actionInfo.markAsDefinitelyUnknown(this.elementVariable.binding);
    FlowInfo exitBranch;
    if (!(this.action == null || (this.action.isEmptyBlock()
        && currentScope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_3))) {

      if (this.action.complainIfUnreachable(actionInfo, this.scope, initialComplaintLevel) < Statement.COMPLAINED_UNREACHABLE) {
        actionInfo = this.action.analyseCode(this.scope, loopingContext, actionInfo).unconditionalCopy();
      }

      // code generation can be optimized when no need to continue in the loop
      exitBranch = flowInfo.unconditionalCopy().
      addInitializationsFrom(condInfo.initsWhenFalse());
      // TODO (maxime) no need to test when false: can optimize (same for action being unreachable above)
      if ((actionInfo.tagBits & loopingContext.initsOnContinue.tagBits &
          FlowInfo.UNREACHABLE_OR_DEAD) != 0) {
        this.continueLabel = null;
      } else {
        actionInfo = actionInfo.mergedWith(loopingContext.initsOnContinue);
        loopingContext.complainOnDeferredFinalChecks(this.scope, actionInfo);
        exitBranch.addPotentialInitializationsFrom(actionInfo);
      }
    } else {
      exitBranch = condInfo.initsWhenFalse();
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo

  return problemReporter;
}

public final int recordInitializationStates(FlowInfo flowInfo) {
  if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return -1;
  UnconditionalFlowInfo unconditionalFlowInfo = flowInfo.unconditionalInitsWithoutSideEffect();
  long[] extraInits = unconditionalFlowInfo.extra == null ?
      null : unconditionalFlowInfo.extra[0];
  long inits = unconditionalFlowInfo.definiteInits;
  checkNextEntry : for (int i = this.lastIndex; --i >= 0;) {
    if (this.definiteInits[i] == inits) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo

  return problemReporter;
}

public final int recordInitializationStates(FlowInfo flowInfo) {
  if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return -1;
  UnconditionalFlowInfo unconditionalFlowInfo = flowInfo.unconditionalInitsWithoutSideEffect();
  long[] extraInits = unconditionalFlowInfo.extra == null ?
      null : unconditionalFlowInfo.extra[0];
  long inits = unconditionalFlowInfo.definiteInits;
  checkNextEntry : for (int i = this.lastIndex; --i >= 0;) {
    if (this.definiteInits[i] == inits) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo

  return outerMethodScope.problemReporter();
}

public final int recordInitializationStates(FlowInfo flowInfo) {
  if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0) return -1;
  UnconditionalFlowInfo unconditionalFlowInfo = flowInfo.unconditionalInitsWithoutSideEffect();
  long[] extraInits = unconditionalFlowInfo.extra == null ?
      null : unconditionalFlowInfo.extra[0];
  long inits = unconditionalFlowInfo.definiteInits;
  checkNextEntry : for (int i = this.lastIndex; --i >= 0;) {
    if (this.definiteInits[i] == inits) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo

    // process the action
    LoopingFlowContext loopingContext =
      new LoopingFlowContext(flowContext, flowInfo, this, this.breakLabel,
        this.continueLabel, this.scope);
    UnconditionalFlowInfo actionInfo =
      condInfo.nullInfoLessUnconditionalCopy();
    actionInfo.markAsDefinitelyUnknown(this.elementVariable.binding);
    FlowInfo exitBranch;
    if (!(this.action == null || (this.action.isEmptyBlock()
        && currentScope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_3))) {

      if (this.action.complainIfUnreachable(actionInfo, this.scope, initialComplaintLevel) < Statement.COMPLAINED_UNREACHABLE) {
        actionInfo = this.action.analyseCode(this.scope, loopingContext, actionInfo).unconditionalCopy();
      }

      // code generation can be optimized when no need to continue in the loop
      exitBranch = flowInfo.unconditionalCopy().
      addInitializationsFrom(condInfo.initsWhenFalse());
      // TODO (maxime) no need to test when false: can optimize (same for action being unreachable above)
      if ((actionInfo.tagBits & loopingContext.initsOnContinue.tagBits &
          FlowInfo.UNREACHABLE) != 0) {
        this.continueLabel = null;
      } else {
        actionInfo = actionInfo.mergedWith(loopingContext.initsOnContinue);
        loopingContext.complainOnDeferredFinalChecks(this.scope, actionInfo);
        exitBranch.addPotentialInitializationsFrom(actionInfo);
      }
    } else {
      exitBranch = condInfo.initsWhenFalse();
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo

  return problemReporter;
}

public final int recordInitializationStates(FlowInfo flowInfo) {
  if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return -1;
  UnconditionalFlowInfo unconditionalFlowInfo = flowInfo.unconditionalInitsWithoutSideEffect();
  long[] extraInits = unconditionalFlowInfo.extra == null ?
      null : unconditionalFlowInfo.extra[0];
  long inits = unconditionalFlowInfo.definiteInits;
  checkNextEntry : for (int i = this.lastIndex; --i >= 0;) {
    if (this.definiteInits[i] == inits) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo

    // process the action
    LoopingFlowContext loopingContext =
      new LoopingFlowContext(flowContext, flowInfo, this, this.breakLabel,
        this.continueLabel, this.scope);
    UnconditionalFlowInfo actionInfo =
      condInfo.nullInfoLessUnconditionalCopy();
    actionInfo.markAsDefinitelyUnknown(elementVarBinding);
    if (currentScope.compilerOptions().isAnnotationBasedNullAnalysisEnabled) {
      // this currently produces an unavoidable warning against all @NonNull element vars:
      int nullStatus = this.elementVariable.checkAssignmentAgainstNullAnnotation(currentScope, flowContext,
                              elementVarBinding, FlowInfo.UNKNOWN, this.collection, this.collectionElementType);
      // TODO (stephan):   once we have JSR 308 fetch nullStatus from the collection element type
      //                and feed the result into the above check (instead of FlowInfo.UNKNOWN)
      if ((elementVarBinding.type.tagBits & TagBits.IsBaseType) == 0) {
        actionInfo.markNullStatus(elementVarBinding, nullStatus);
      }
    }
    FlowInfo exitBranch;
    if (!(this.action == null || (this.action.isEmptyBlock()
        && currentScope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_3))) {

      if (this.action.complainIfUnreachable(actionInfo, this.scope, initialComplaintLevel, true) < Statement.COMPLAINED_UNREACHABLE) {
        actionInfo = this.action.analyseCode(this.scope, loopingContext, actionInfo).unconditionalCopy();
      }

      // code generation can be optimized when no need to continue in the loop
      exitBranch = flowInfo.unconditionalCopy().
          addInitializationsFrom(condInfo.initsWhenFalse());
      // TODO (maxime) no need to test when false: can optimize (same for action being unreachable above)
      if ((actionInfo.tagBits & loopingContext.initsOnContinue.tagBits &
          FlowInfo.UNREACHABLE_OR_DEAD) != 0) {
        this.continueLabel = null;
      } else {
        actionInfo = actionInfo.mergedWith(loopingContext.initsOnContinue);
        loopingContext.complainOnDeferredFinalChecks(this.scope, actionInfo);
        exitBranch.addPotentialInitializationsFrom(actionInfo);
      }
    } else {
      exitBranch = condInfo.initsWhenFalse();
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo

        flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
        conditionFlowInfo = argument.analyseCode(currentScope, flowContext, flowInfo.copy());
        if (!wasInsideAssert) {
          flowContext.tagBits &= ~FlowContext.HIDE_NULL_COMPARISON_WARNING;
        }
        UnconditionalFlowInfo assertWhenTrueInfo = conditionFlowInfo.initsWhenTrue().unconditionalInits();
        FlowInfo assertInfo = conditionFlowInfo.initsWhenFalse();
        if (isOptimizedTrueAssertion) {
          assertInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
        }
        if (!isOptimizedFalseAssertion) {
          // if assertion is not false for sure, only then it makes sense to carry the flow info ahead.
          // if the code does reach ahead, it means the assert didn't cause an exit, and so
          // the expression inside it shouldn't change the prior flowinfo
          // viz. org.eclipse.core.runtime.Assert.isLegal(false && o != null)
         
          // keep the merge from the initial code for the definite assignment
          // analysis, tweak the null part to influence nulls downstream
          flowInfo = flowInfo.mergedWith(assertInfo.nullInfoLessUnconditionalCopy()).
            addInitializationsFrom(assertWhenTrueInfo.discardInitializationInfo());
        }
      } else {
        flowInfo = argument.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits();
      }
      if (analyseResources) {
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.