src/main/java/org/plumelib/bcelutil/StackMapUtils.java
private final void update_NEW_object_stack_map_entries(int old_offset, int new_offset) {

    for (StackMapEntry smte : stack_map_table) {
      int frame_type = smte.getFrameType();

      if ((frame_type >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME
              && frame_type <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
          || (frame_type >= Const.APPEND_FRAME && frame_type <= Const.APPEND_FRAME_MAX)
          || (frame_type == Const.FULL_FRAME)) {

        if (smte.getNumberOfLocals() > 0) {
          for (StackMapType smt : smte.getTypesOfLocals()) {
            if (smt.getType() == Const.ITEM_NewObject) {
              if (old_offset == smt.getIndex()) {
                smt.setIndex(new_offset);
              }
            }
          }
        }
        if (smte.getNumberOfStackItems() > 0) {
          for (StackMapType smt : smte.getTypesOfStackItems()) {
            if (smt.getType() == Const.ITEM_NewObject) {
              if (old_offset == smt.getIndex()) {
                smt.setIndex(new_offset);
              }
            }
          }
        }
      }
    }
  }
private final void update_NEW_object_stack_map_entries(int old_offset, int new_offset) {

    for (StackMapEntry smte : stack_map_table) {
      int frame_type = smte.getFrameType();

      if ((frame_type >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME
              && frame_type <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
          || (frame_type >= Const.APPEND_FRAME && frame_type <= Const.APPEND_FRAME_MAX)
          || (frame_type == Const.FULL_FRAME)) {

        if (smte.getNumberOfLocals() > 0) {
          for (StackMapType smt : smte.getTypesOfLocals()) {
            if (smt.getType() == Const.ITEM_NewObject) {
              if (old_offset == smt.getIndex()) {
                smt.setIndex(new_offset);
              }
            }
          }
        }
        if (smte.getNumberOfStackItems() > 0) {
          for (StackMapType smt : smte.getTypesOfStackItems()) {
            if (smt.getType() == Const.ITEM_NewObject) {
              if (old_offset == smt.getIndex()) {
                smt.setIndex(new_offset);
              }
            }
          }
        }
      }
    }
  }
private final void update_NEW_object_stack_map_entries ( int old_offset , int new_offset ) { for ( StackMapEntry smte : stack_map_table ) { int frame_type = smte . getFrameType ( ) ; if ( ( frame_type >= Const . SAME_LOCALS_1_STACK_ITEM_FRAME && frame_type <= Const . SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED ) || ( frame_type >= Const . APPEND_FRAME && frame_type <= Const . APPEND_FRAME_MAX ) || ( frame_type == Const . FULL_FRAME ) ) { if ( smte . getNumberOfLocals ( ) > 0 ) { for ( StackMapType smt : smte . getTypesOfLocals ( ) ) { if ( smt . getType ( ) == Const . ITEM_NewObject ) { if ( old_offset == smt . getIndex ( ) ) { smt . setIndex ( new_offset ) ; } } } } if ( smte . getNumberOfStackItems ( ) > 0 ) { for ( StackMapType smt : smte . getTypesOfStackItems ( ) ) { if ( smt . getType ( ) == Const . ITEM_NewObject ) { if ( old_offset == smt . getIndex ( ) ) { smt . setIndex ( new_offset ) ; } } } } } } }
One of uninitialized NEW instructions has moved. Update its offset in StackMap entries. Note
that more than one entry could refer to the same instruction. This is a helper routine used by
update_uninitialized_NEW_offsets.

@param old_offset original location of NEW instruction
@param new_offset new location of NEW instruction
One of uninitialized NEW instructions has moved . Update its offset in StackMap entries . Note that more than one entry could refer to the same instruction . This is a helper routine used by update_uninitialized_NEW_offsets .