jodd-proxetta/src/main/java/jodd/asm7/Frame.java
final void accept(final MethodWriter methodWriter) {
    // Compute the number of locals, ignoring TOP types that are just after a LONG or a DOUBLE, and
    // all trailing TOP types.
    int[] localTypes = inputLocals;
    int numLocal = 0;
    int numTrailingTop = 0;
    int i = 0;
    while (i < localTypes.length) {
      int localType = localTypes[i];
      i += (localType == LONG || localType == DOUBLE) ? 2 : 1;
      if (localType == TOP) {
        numTrailingTop++;
      } else {
        numLocal += numTrailingTop + 1;
        numTrailingTop = 0;
      }
    }
    // Compute the stack size, ignoring TOP types that are just after a LONG or a DOUBLE.
    int[] stackTypes = inputStack;
    int numStack = 0;
    i = 0;
    while (i < stackTypes.length) {
      int stackType = stackTypes[i];
      i += (stackType == LONG || stackType == DOUBLE) ? 2 : 1;
      numStack++;
    }
    // Visit the frame and its content.
    int frameIndex = methodWriter.visitFrameStart(owner.bytecodeOffset, numLocal, numStack);
    i = 0;
    while (numLocal-- > 0) {
      int localType = localTypes[i];
      i += (localType == LONG || localType == DOUBLE) ? 2 : 1;
      methodWriter.visitAbstractType(frameIndex++, localType);
    }
    i = 0;
    while (numStack-- > 0) {
      int stackType = stackTypes[i];
      i += (stackType == LONG || stackType == DOUBLE) ? 2 : 1;
      methodWriter.visitAbstractType(frameIndex++, stackType);
    }
    methodWriter.visitFrameEnd();
  }
final void accept(final MethodWriter methodWriter) {
    // Compute the number of locals, ignoring TOP types that are just after a LONG or a DOUBLE, and
    // all trailing TOP types.
    int[] localTypes = inputLocals;
    int numLocal = 0;
    int numTrailingTop = 0;
    int i = 0;
    while (i < localTypes.length) {
      int localType = localTypes[i];
      i += (localType == LONG || localType == DOUBLE) ? 2 : 1;
      if (localType == TOP) {
        numTrailingTop++;
      } else {
        numLocal += numTrailingTop + 1;
        numTrailingTop = 0;
      }
    }
    // Compute the stack size, ignoring TOP types that are just after a LONG or a DOUBLE.
    int[] stackTypes = inputStack;
    int numStack = 0;
    i = 0;
    while (i < stackTypes.length) {
      int stackType = stackTypes[i];
      i += (stackType == LONG || stackType == DOUBLE) ? 2 : 1;
      numStack++;
    }
    // Visit the frame and its content.
    int frameIndex = methodWriter.visitFrameStart(owner.bytecodeOffset, numLocal, numStack);
    i = 0;
    while (numLocal-- > 0) {
      int localType = localTypes[i];
      i += (localType == LONG || localType == DOUBLE) ? 2 : 1;
      methodWriter.visitAbstractType(frameIndex++, localType);
    }
    i = 0;
    while (numStack-- > 0) {
      int stackType = stackTypes[i];
      i += (stackType == LONG || stackType == DOUBLE) ? 2 : 1;
      methodWriter.visitAbstractType(frameIndex++, stackType);
    }
    methodWriter.visitFrameEnd();
  }
final void accept ( final MethodWriter methodWriter ) { // Compute the number of locals, ignoring TOP types that are just after a LONG or a DOUBLE, and // all trailing TOP types. int [ ] localTypes = inputLocals ; int numLocal = 0 ; int numTrailingTop = 0 ; int i = 0 ; while ( i < localTypes . length ) { int localType = localTypes [ i ] ; i += ( localType == LONG || localType == DOUBLE ) ? 2 : 1 ; if ( localType == TOP ) { numTrailingTop ++ ; } else { numLocal += numTrailingTop + 1 ; numTrailingTop = 0 ; } } // Compute the stack size, ignoring TOP types that are just after a LONG or a DOUBLE. int [ ] stackTypes = inputStack ; int numStack = 0 ; i = 0 ; while ( i < stackTypes . length ) { int stackType = stackTypes [ i ] ; i += ( stackType == LONG || stackType == DOUBLE ) ? 2 : 1 ; numStack ++ ; } // Visit the frame and its content. int frameIndex = methodWriter . visitFrameStart ( owner . bytecodeOffset , numLocal , numStack ) ; i = 0 ; while ( numLocal -- > 0 ) { int localType = localTypes [ i ] ; i += ( localType == LONG || localType == DOUBLE ) ? 2 : 1 ; methodWriter . visitAbstractType ( frameIndex ++ , localType ) ; } i = 0 ; while ( numStack -- > 0 ) { int stackType = stackTypes [ i ] ; i += ( stackType == LONG || stackType == DOUBLE ) ? 2 : 1 ; methodWriter . visitAbstractType ( frameIndex ++ , stackType ) ; } methodWriter . visitFrameEnd ( ) ; }
Makes the given {@link MethodWriter} visit the input frame of this {@link Frame}. The visit is
done with the {@link MethodWriter#visitFrameStart}, {@link MethodWriter#visitAbstractType} and
{@link MethodWriter#visitFrameEnd} methods.

@param methodWriter the {@link MethodWriter} that should visit the input frame of this {@link
Frame}.
Makes the given { @link MethodWriter } visit the input frame of this { @link Frame } . The visit is done with the { @link MethodWriter#visitFrameStart } { @link MethodWriter#visitAbstractType } and { @link MethodWriter#visitFrameEnd } methods .