Examples of AbortMethod


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortMethod

    switch (abortLevel) {
      case AbortType :
        throw new AbortType(this.compilationResult, problem);
      case AbortMethod :
        throw new AbortMethod(this.compilationResult, problem);
      default :
        throw new AbortCompilationUnit(this.compilationResult, problem);
    }
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortMethod

  }
}
protected void writePosition(BranchLabel label) {
  int offset = label.position - this.position + 1;
  if (Math.abs(offset) > 0x7FFF && !this.wideMode) {
    throw new AbortMethod(CodeStream.RESTART_IN_WIDE_MODE, null);
  }
  this.writeSignedShort(offset);
  int[] forwardRefs = label.forwardReferences();
  for (int i = 0, max = label.forwardReferenceCount(); i < max; i++) {
    this.writePosition(label, forwardRefs[i]);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortMethod

 
}
protected void writePosition(BranchLabel label, int forwardReference) {
  final int offset = label.position - forwardReference + 1;
  if (Math.abs(offset) > 0x7FFF && !this.wideMode) {
    throw new AbortMethod(CodeStream.RESTART_IN_WIDE_MODE, null);
  }
  if (this.wideMode) {
    if ((label.tagBits & BranchLabel.WIDE) != 0) {
      this.writeSignedWord(forwardReference, offset);
    } else {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortMethod

public void abort(int abortLevel, CategorizedProblem problem) {
  switch (abortLevel) {
    case AbortType :
      throw new AbortType(this.compilationResult, problem);
    case AbortMethod :
      throw new AbortMethod(this.compilationResult, problem);
    default :
      throw new AbortCompilationUnit(this.compilationResult, problem);
  }
}
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortMethod

}

protected void writePosition(BranchLabel label) {
  int offset = label.position - this.position + 1;
  if (Math.abs(offset) > 0x7FFF && !this.wideMode) {
    throw new AbortMethod(CodeStream.RESTART_IN_WIDE_MODE, null);
  }
  this.writeSignedShort(offset);
  int[] forwardRefs = label.forwardReferences();
  for (int i = 0, max = label.forwardReferenceCount(); i < max; i++) {
    this.writePosition(label, forwardRefs[i]);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortMethod

}

protected void writePosition(BranchLabel label, int forwardReference) {
  final int offset = label.position - forwardReference + 1;
  if (Math.abs(offset) > 0x7FFF && !this.wideMode) {
    throw new AbortMethod(CodeStream.RESTART_IN_WIDE_MODE, null);
  }
  if (this.wideMode) {
    if ((label.tagBits & BranchLabel.WIDE) != 0) {
      this.writeSignedWord(forwardReference, offset);
    } else {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortMethod

        LocalVariableBinding localBinding = (LocalVariableBinding) this.binding;
        if (localBinding.resolvedPosition == -1) {
          if (valueRequired) {
            // restart code gen
            localBinding.useFlag = LocalVariableBinding.USED;
            throw new AbortMethod(CodeStream.RESTART_CODE_GEN_FOR_UNUSED_LOCALS_MODE, null);
          }
          codeStream.recordPositionsFrom(pc, this.sourceStart);
          return;
        }
        if (!valueRequired && (this.implicitConversion & TypeIds.UNBOXING) == 0) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortMethod

               * restart code gen because we either:
               * - need the value
               * - the constant can have potential side-effect
               */
              localBinding.useFlag = LocalVariableBinding.USED;
              throw new AbortMethod(CodeStream.RESTART_CODE_GEN_FOR_UNUSED_LOCALS_MODE, null);
            } else if (assignConstant == Constant.NotAConstant) {
              // we only need to generate the value of the expression's constant if it is not a constant expression
              expression.generateCode(currentScope, codeStream, false);
            }
            return;
          }
          if ((assignConstant != Constant.NotAConstant)
              && (assignConstant.typeID() != TypeIds.T_float) // only for integral types
              && (assignConstant.typeID() != TypeIds.T_double)) { // TODO (philippe) is this test needed ?
            switch (operator) {
              case PLUS :
                int increment  = assignConstant.intValue();
                if (increment != (short) increment) break; // not representable as a 16-bits value
                codeStream.iinc(localBinding.resolvedPosition, increment);
                if (valueRequired) {
                  codeStream.load(localBinding);
                }
                return;
              case MINUS :
                increment  = -assignConstant.intValue();
                if (increment != (short) increment) break; // not representable as a 16-bits value
                codeStream.iinc(localBinding.resolvedPosition, increment);
                if (valueRequired) {
                  codeStream.load(localBinding);
                }
                return;
            }
          }
          //$FALL-THROUGH$
        default :
          if (localBinding.resolvedPosition == -1) {
            assignConstant = expression.constant;
            if (valueRequired) {
              /*
               * restart code gen because we either:
               * - need the value
               * - the constant can have potential side-effect
               */
              localBinding.useFlag = LocalVariableBinding.USED;
              throw new AbortMethod(CodeStream.RESTART_CODE_GEN_FOR_UNUSED_LOCALS_MODE, null);
            } else if (assignConstant == Constant.NotAConstant) {
              // we only need to generate the value of the expression's constant if it is not a constant expression
              expression.generateCode(currentScope, codeStream, false);
            }
            return;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortMethod

      Reference.reportOnlyUselesslyReadLocal(currentScope, localBinding, valueRequired);
      if (localBinding.resolvedPosition == -1) {
        if (valueRequired) {
          // restart code gen
          localBinding.useFlag = LocalVariableBinding.USED;
          throw new AbortMethod(CodeStream.RESTART_CODE_GEN_FOR_UNUSED_LOCALS_MODE, null);
        }
        return;
      }

      // using incr bytecode if possible
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.problem.AbortMethod

public void generateOuterAccess(Object[] mappingSequence, ASTNode invocationSite, Binding target, Scope scope) {
  int currentPosition = this.position;
  super.generateOuterAccess(mappingSequence, invocationSite, target, scope);
  if (currentPosition == this.position) {
    // no code has been generate during outer access => no enclosing instance is available
    throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null);
  }
}
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.