private void finalizeSuperBlockStarts ( ) { if ( GenerateStackMap ) { for ( int i = 0 ; i < itsExceptionTableTop ; i ++ ) { ExceptionTableEntry ete = itsExceptionTable [ i ] ; int handlerPC = getLabelPC ( ete . itsHandlerLabel ) ; addSuperBlockStart ( handlerPC ) ; } Arrays . sort ( itsSuperBlockStarts , 0 , itsSuperBlockStartsTop ) ; int prev = itsSuperBlockStarts [ 0 ] ; int copyTo = 1 ; for ( int i = 1 ; i < itsSuperBlockStartsTop ; i ++ ) { int curr = itsSuperBlockStarts [ i ] ; if ( prev != curr ) { if ( copyTo != i ) { itsSuperBlockStarts [ copyTo ] = curr ; } copyTo ++ ; prev = curr ; } } itsSuperBlockStartsTop = copyTo ; if ( itsSuperBlockStarts [ copyTo - 1 ] == itsCodeBufferTop ) { itsSuperBlockStartsTop -- ; } } }
Sort the list of recorded super block starts and remove duplicates .