Examples of FlowInfo


Examples of com.odiago.flumebase.exec.FlowInfo

    try {
      long idNum = Long.valueOf(flowIdStr);
      FlowId flowId = new FlowId(idNum);

      Map<FlowId, FlowInfo> infoMap = mExecEnv.listFlows();
      FlowInfo info = infoMap.get(flowId);
      if (null == info) {
        System.out.println("No such flow: " + flowIdStr);
      } else if (null != info.streamName) {
        System.out.println(info.streamName);
      } else {
View Full Code Here

Examples of com.odiago.flumebase.exec.FlowInfo

      assert outMap != null;
      synchronized (outMap) {
        for (Map.Entry<FlowId, ActiveFlowData> entry : mActiveFlows.entrySet()) {
          FlowId id = entry.getKey();
          ActiveFlowData activeData = entry.getValue();
          outMap.put(id, new FlowInfo(id, activeData.getFlow().getQuery(),
              activeData.getStreamName()));
        }

        // Notify the calling thread when we're done.
        outMap.notify();
View Full Code Here

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

    continueLabel = new BranchLabel();

    // process the element variable and collection
    this.collection.checkNPE(currentScope, flowContext, flowInfo);
    flowInfo = this.elementVariable.analyseCode(scope, flowContext, flowInfo);
    FlowInfo condInfo = this.collection.analyseCode(scope, flowContext, flowInfo.copy());

    // element variable will be assigned when iterating
    condInfo.markAsDefinitelyAssigned(this.elementVariable.binding);

    this.postCollectionInitStateIndex = currentScope.methodScope().recordInitializationStates(condInfo);
   
    // 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();
    }

    // we need the variable to iterate the collection even if the
    // element variable is not used
    final boolean hasEmptyAction = this.action == null
        || this.action.isEmptyBlock()
        || ((this.action.bits & IsUsefulEmptyStatement) != 0);

    switch(this.kind) {
      case ARRAY :
        if (!hasEmptyAction
            || this.elementVariable.binding.resolvedPosition != -1) {       
          this.collectionVariable.useFlag = LocalVariableBinding.USED;
          if (this.continueLabel != null) {
            this.indexVariable.useFlag = LocalVariableBinding.USED;
            this.maxVariable.useFlag = LocalVariableBinding.USED;
          }
        }
        break;
      case RAW_ITERABLE :
      case GENERIC_ITERABLE :
        this.indexVariable.useFlag = LocalVariableBinding.USED;
        break;
    }
    //end of loop
    loopingContext.complainOnDeferredNullChecks(currentScope, actionInfo);

    FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranches(
        (loopingContext.initsOnBreak.tagBits &
          FlowInfo.UNREACHABLE) != 0 ?
          loopingContext.initsOnBreak :
          flowInfo.addInitializationsFrom(loopingContext.initsOnBreak), // recover upstream null info
        false,
View Full Code Here

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

public CodeSnippetReturnStatement(Expression expr, int s, int e) {
  super(expr, s, e);
}

public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
  FlowInfo info = super.analyseCode(currentScope, flowContext, flowInfo);
  // we need to remove this optimization in order to prevent the inlining of the return bytecode
  // 1GH0AU7: ITPJCORE:ALL - Eval - VerifyError in scrapbook page
  this.expression.bits &= ~IsReturnedValue;
  return info;
}
View Full Code Here

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

    int initialComplaintLevel = (flowInfo.reachMode() & FlowInfo.UNREACHABLE) != 0 ? Statement.COMPLAINED_FAKE_REACHABLE : Statement.NOT_COMPLAINED;

    // process the element variable and collection
    this.collection.checkNPE(currentScope, flowContext, flowInfo);
    flowInfo = this.elementVariable.analyseCode(this.scope, flowContext, flowInfo);   
    FlowInfo condInfo = this.collection.analyseCode(this.scope, flowContext, flowInfo.copy());

    // element variable will be assigned when iterating
    condInfo.markAsDefinitelyAssigned(this.elementVariable.binding);

    this.postCollectionInitStateIndex = currentScope.methodScope().recordInitializationStates(condInfo);

    // 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();
    }

    // we need the variable to iterate the collection even if the
    // element variable is not used
    final boolean hasEmptyAction = this.action == null
    || this.action.isEmptyBlock()
    || ((this.action.bits & IsUsefulEmptyStatement) != 0);

    switch(this.kind) {
      case ARRAY :
        if (!hasEmptyAction
            || this.elementVariable.binding.resolvedPosition != -1) {
          this.collectionVariable.useFlag = LocalVariableBinding.USED;
          if (this.continueLabel != null) {
            this.indexVariable.useFlag = LocalVariableBinding.USED;
            this.maxVariable.useFlag = LocalVariableBinding.USED;
          }
        }
        break;
      case RAW_ITERABLE :
      case GENERIC_ITERABLE :
        this.indexVariable.useFlag = LocalVariableBinding.USED;
        break;
    }
    //end of loop
    loopingContext.complainOnDeferredNullChecks(currentScope, actionInfo);

    FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranches(
        (loopingContext.initsOnBreak.tagBits &
            FlowInfo.UNREACHABLE) != 0 ?
                loopingContext.initsOnBreak :
                  flowInfo.addInitializationsFrom(loopingContext.initsOnBreak), // recover upstream null info
                  false,
View Full Code Here

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

      FieldBinding fieldBinding = (FieldBinding) this.binding;
      if (this.indexOfFirstFieldBinding == 1) { // was an implicit reference to the first field binding
        // check if reading a final blank field
        if (fieldBinding.isBlankFinal()
            && currentScope.needBlankFinalFieldInitializationCheck(fieldBinding)) {
          FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(fieldBinding.declaringClass.original(), flowInfo);
          if (!fieldInits.isDefinitelyAssigned(fieldBinding)) {
            currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
          }
        }
      }
      if (!fieldBinding.isStatic()) {
View Full Code Here

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

    switch (this.bits & ASTNode.RestrictiveFlagMASK) {
      case Binding.FIELD : // reading a field
        FieldBinding fieldBinding = (FieldBinding) this.binding;
        if (fieldBinding.isBlankFinal()
            && currentScope.needBlankFinalFieldInitializationCheck(fieldBinding)) {
          FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(fieldBinding.declaringClass.original(), flowInfo);
          if (!fieldInits.isDefinitelyAssigned(fieldBinding)) {
            currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
          }
        }
        if (!fieldBinding.isStatic()) {
          // https://bugs.eclipse.org/bugs/show_bug.cgi?id=318682
View Full Code Here

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

        manageSyntheticAccessIfNecessary(currentScope, flowInfo, true /*read-access*/);
      }
      // check if reading a final blank field
      FieldBinding fieldBinding = (FieldBinding) this.binding;
      if (fieldBinding.isBlankFinal() && currentScope.needBlankFinalFieldInitializationCheck(fieldBinding)) {
        FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(fieldBinding.declaringClass.original(), flowInfo);
        if (!fieldInits.isDefinitelyAssigned(fieldBinding)) {
          currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
        }
      }
      if (!fieldBinding.isStatic()) {
        // https://bugs.eclipse.org/bugs/show_bug.cgi?id=318682
View Full Code Here

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

      }
      // check if final blank field
      if (lastFieldBinding.isBlankFinal()
            && this.otherBindings != null // the last field binding is only assigned
           && currentScope.needBlankFinalFieldInitializationCheck(lastFieldBinding)) {
        FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(lastFieldBinding.declaringClass.original(), flowInfo);
        if (!fieldInits.isDefinitelyAssigned(lastFieldBinding)) {
          currentScope.problemReporter().uninitializedBlankFinalField(lastFieldBinding, this);
        }
      }
      if (!lastFieldBinding.isStatic()) {
        currentScope.resetEnclosingMethodStaticFlag();
      }
      break;
    case Binding.LOCAL :
      // first binding is a local variable
      LocalVariableBinding localBinding;
      if (!flowInfo
        .isDefinitelyAssigned(localBinding = (LocalVariableBinding) this.binding)) {
        currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
      }
      if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0)  {
        localBinding.useFlag = LocalVariableBinding.USED;
      } else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
        localBinding.useFlag = LocalVariableBinding.FAKE_USED;
      }
      if (needValue) {
        checkNPE(currentScope, flowContext, flowInfo, true);
      }
  }

  if (needValue) {
    manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
    // only for first binding
  }
  // all intermediate field accesses are read accesses
  if (this.otherBindings != null) {
    for (int i = 0; i < otherBindingsCount-1; i++) {
      lastFieldBinding = this.otherBindings[i];
      needValue = !this.otherBindings[i+1].isStatic();
      if (needValue || complyTo14) {
        manageSyntheticAccessIfNecessary(currentScope, lastFieldBinding, i + 1, flowInfo);
      }
    }
    lastFieldBinding = this.otherBindings[otherBindingsCount-1];
  }

  if (isCompound) {
    if (otherBindingsCount == 0
        && lastFieldBinding.isBlankFinal()
        && currentScope.needBlankFinalFieldInitializationCheck(lastFieldBinding)) {
      FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(lastFieldBinding.declaringClass, flowInfo);
      if (!fieldInits.isDefinitelyAssigned(lastFieldBinding)) {
        currentScope.problemReporter().uninitializedBlankFinalField(lastFieldBinding, this);
      }
    }
    manageSyntheticAccessIfNecessary(currentScope, lastFieldBinding, otherBindingsCount, flowInfo);
  }
View Full Code Here

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

  this.type = type;
  type.bits |= ASTNode.IgnoreRawTypeCheck; // no need to worry about raw type usage
}

public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
  FlowInfo result = this.expression
    .analyseCode(currentScope, flowContext, flowInfo)
    .unconditionalInits();
  if ((this.expression.implicitConversion & TypeIds.UNBOXING) != 0) {
    this.expression.checkNPE(currentScope, flowContext, flowInfo);
  }
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.