docs: int[] getTrimmedLocals() {
      int last = locals.length - 1;
      // Exclude all of the trailing TOPs not bound to a DOUBLE/LONG
      while (last >= 0 && locals[last] == TypeInfo.TOP &&
          !TypeInfo.isTwoWords(locals[last - 1])) {
        last--;
      }
      last++;
      // Exclude trailing TOPs following a DOUBLE/LONG
      int size = last;
      for (int i = 0; i < last; i++) {
        if (TypeInfo.isTwoWords(locals[i])) {
          size--;
        }
      }
      int[] copy = new int[size];
      for (int i = 0, j = 0; i < size; i++, j++) {
        copy[i] = locals[j];
        if (TypeInfo.isTwoWords(locals[j])) {
          j++;
        }
      }
      return copy;
    }