Package org.eclipse.jdt.internal.compiler.codegen

Examples of org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream


    this.contents[this.contentsOffset++] = (byte) interfaceIndex;
  }
  this.produceAttributes = this.referenceBinding.scope.compilerOptions().produceDebugAttributes;
  this.creatingProblemType = creatingProblemType;
  if (this.targetJDK >= ClassFileConstants.JDK1_6) {
    this.codeStream = new StackMapFrameCodeStream(this);
    this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP_TABLE;
  } else if (this.targetJDK == ClassFileConstants.CLDC_1_1) {
    this.targetJDK = ClassFileConstants.JDK1_1; // put back 45.3
    this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP;
    this.codeStream = new StackMapFrameCodeStream(this);
  } else {
    this.codeStream = new CodeStream(this);
  }
  // retrieve the enclosing one guaranteed to be the one matching the propagated flow info
  // 1FF9ZBU: LFCOM:ALL - Local variable attributes busted (Sanity check)
View Full Code Here


    this.produceAttributes = options.produceDebugAttributes;
    this.referenceBinding = typeBinding;
    this.isNestedType = typeBinding.isNestedType();
    if (this.targetJDK >= ClassFileConstants.JDK1_6) {
      this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP_TABLE;
      this.codeStream = new StackMapFrameCodeStream(this);
    } else if (this.targetJDK == ClassFileConstants.CLDC_1_1) {
      this.targetJDK = ClassFileConstants.JDK1_1; // put back 45.3
      this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP;
      this.codeStream = new StackMapFrameCodeStream(this);
    } else {
      this.codeStream = new CodeStream(this);
    }
    initByteArrays();
  }
View Full Code Here

          int end = exceptionLabel.ranges[iRange++]; // odd ranges are end positions
          this.contents[localContentsOffset++] = (byte) (end >> 8);
          this.contents[localContentsOffset++] = (byte) end;
          int handlerPC = exceptionLabel.position;
          if (addStackMaps) {
            StackMapFrameCodeStream stackMapFrameCodeStream = (StackMapFrameCodeStream) this.codeStream;
            stackMapFrameCodeStream.addFramePosition(handlerPC);
//            stackMapFrameCodeStream.addExceptionMarker(handlerPC, exceptionLabel.exceptionType);
          }
          this.contents[localContentsOffset++] = (byte) (handlerPC >> 8);
          this.contents[localContentsOffset++] = (byte) handlerPC;
          if (exceptionLabel.exceptionType == null) {
View Full Code Here

          this.contents[localContentsOffset++] = (byte) end;
          int handlerPC = exceptionLabel.position;
          this.contents[localContentsOffset++] = (byte) (handlerPC >> 8);
          this.contents[localContentsOffset++] = (byte) handlerPC;
          if (addStackMaps) {
            StackMapFrameCodeStream stackMapFrameCodeStream = (StackMapFrameCodeStream) this.codeStream;
            stackMapFrameCodeStream.addFramePosition(handlerPC);
//            stackMapFrameCodeStream.addExceptionMarker(handlerPC, exceptionLabel.exceptionType);
          }
          if (exceptionLabel.exceptionType == null) {
            // any exception handler
            this.contents[localContentsOffset++] = 0;
View Full Code Here

            int end = exceptionLabel.ranges[iRange++]; // odd ranges are end positions
            this.contents[localContentsOffset++] = (byte) (end >> 8);
            this.contents[localContentsOffset++] = (byte) end;
            int handlerPC = exceptionLabel.position;
            if (addStackMaps) {
              StackMapFrameCodeStream stackMapFrameCodeStream = (StackMapFrameCodeStream) this.codeStream;
              stackMapFrameCodeStream.addFramePosition(handlerPC);
            }
            this.contents[localContentsOffset++] = (byte) (handlerPC >> 8);
            this.contents[localContentsOffset++] = (byte) handlerPC;
            if (exceptionLabel.exceptionType == null) {
              // any exception handler
View Full Code Here

      int codeAttributeOffset,
      int max_locals,
      boolean isClinit) {
    int attributesNumber = 0;
    int localContentsOffset = this.contentsOffset;
    StackMapFrameCodeStream stackMapFrameCodeStream = (StackMapFrameCodeStream) this.codeStream;
    stackMapFrameCodeStream.removeFramePosition(code_length);
    if (stackMapFrameCodeStream.hasFramePositions()) {
      ArrayList frames = new ArrayList();
      traverse(isClinit ? null : methodBinding, max_locals, this.contents, codeAttributeOffset + 14, code_length, frames, isClinit);
      int numberOfFrames = frames.size();
      if (numberOfFrames > 1) {
        int stackMapTableAttributeOffset = localContentsOffset;
View Full Code Here

      int codeAttributeOffset,
      int max_locals,
      boolean isClinit) {
    int attributesNumber = 0;
    int localContentsOffset = this.contentsOffset;
    StackMapFrameCodeStream stackMapFrameCodeStream = (StackMapFrameCodeStream) this.codeStream;
    stackMapFrameCodeStream.removeFramePosition(code_length);
    if (stackMapFrameCodeStream.hasFramePositions()) {
      ArrayList frames = new ArrayList();
      traverse(isClinit ? null: methodBinding, max_locals, this.contents, codeAttributeOffset + 14, code_length, frames, isClinit);
      int numberOfFrames = frames.size();
      if (numberOfFrames > 1) {
        int stackMapTableAttributeOffset = localContentsOffset;
View Full Code Here

    this.methodCountOffset = this.contentsOffset;
    this.contentsOffset += 2;
  }

  public void traverse(MethodBinding methodBinding, int maxLocals, byte[] bytecodes, int codeOffset, int codeLength, ArrayList frames, boolean isClinit) {
    StackMapFrameCodeStream stackMapFrameCodeStream = (StackMapFrameCodeStream) this.codeStream;
    int[] framePositions = stackMapFrameCodeStream.getFramePositions();
    int pc = codeOffset;
    int index;
    int[] constantPoolOffsets = this.constantPool.offsets;
    byte[] poolContents = this.constantPool.poolContent;

    // set initial values for frame positions
    int indexInFramePositions = 0;
    int framePositionsLength = framePositions.length;
    int currentFramePosition = framePositions[0];

    // set initial values for stack depth markers
    int indexInStackDepthMarkers = 0;
    StackDepthMarker[] stackDepthMarkers = stackMapFrameCodeStream.getStackDepthMarkers();
    int stackDepthMarkersLength = stackDepthMarkers == null ? 0 : stackDepthMarkers.length;
    boolean hasStackDepthMarkers = stackDepthMarkersLength != 0;
    StackDepthMarker stackDepthMarker = null;
    if (hasStackDepthMarkers) {
      stackDepthMarker = stackDepthMarkers[0];
    }

    // set initial values for stack markers (used only in cldc mode)
    int indexInStackMarkers = 0;
    StackMarker[] stackMarkers = stackMapFrameCodeStream.getStackMarkers();
    int stackMarkersLength = stackMarkers == null ? 0 : stackMarkers.length;
    boolean hasStackMarkers = stackMarkersLength != 0;
    StackMarker stackMarker = null;
    if (hasStackMarkers) {
      stackMarker = stackMarkers[0];
    }

    // set initial values for exception markers
    int indexInExceptionMarkers = 0;
    ExceptionMarker[] exceptionMarkers= stackMapFrameCodeStream.getExceptionMarkers();
    int exceptionsMarkersLength = exceptionMarkers == null ? 0 : exceptionMarkers.length;
    boolean hasExceptionMarkers = exceptionsMarkersLength != 0;
    ExceptionMarker exceptionMarker = null;
    if (hasExceptionMarkers) {
      exceptionMarker = exceptionMarkers[0];
View Full Code Here

    this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP_TABLE;
    if (this.targetJDK >= ClassFileConstants.JDK1_8) {
      this.produceAttributes |= ClassFileConstants.ATTR_TYPE_ANNOTATION;
      this.codeStream = new TypeAnnotationCodeStream(this);
    } else {
      this.codeStream = new StackMapFrameCodeStream(this);
    }
  } else if (this.targetJDK == ClassFileConstants.CLDC_1_1) {
    this.targetJDK = ClassFileConstants.JDK1_1; // put back 45.3
    this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP;
    this.codeStream = new StackMapFrameCodeStream(this);
  } else {
    this.codeStream = new CodeStream(this);
  }
  // retrieve the enclosing one guaranteed to be the one matching the propagated flow info
  // 1FF9ZBU: LFCOM:ALL - Local variable attributes busted (Sanity check)
View Full Code Here

        this.codeStream = new TypeAnnotationCodeStream(this);
        if (options.produceMethodParameters) {
          this.produceAttributes |= ClassFileConstants.ATTR_METHOD_PARAMETERS;
        }
      } else {
        this.codeStream = new StackMapFrameCodeStream(this);
      }
    } else if (this.targetJDK == ClassFileConstants.CLDC_1_1) {
      this.targetJDK = ClassFileConstants.JDK1_1; // put back 45.3
      this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP;
      this.codeStream = new StackMapFrameCodeStream(this);
    } else {
      this.codeStream = new CodeStream(this);
    }
    initByteArrays();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream

Copyright © 2018 www.massapicom. 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.