// We can't do better than this
public int pcToLine(int pc) {
        /*
         * Line number entries don't have to appear in any particular
         * order, so we have to do a linear search. TODO: If
         * this turns out to be a bottleneck, consider sorting the
         * list prior to use.
         */
        int sz = size();
        int bestPc = -1;
        int bestLine = -1;
        for (int i = 0; i < sz; i++) {
            Item one = get(i);
            int onePc = one.getStartPc();
            if ((onePc <= pc) && (onePc > bestPc)) {
                bestPc = onePc;
                bestLine = one.getLineNumber();
                if (bestPc == pc) {
                    // We can't do better than this
                    break;
                }
            }
        }
        return bestLine;
    }
bestLine = one.getLineNumber();
if (bestPc == pc) {
// We can't do better than this
break;
}
int sz = size();
int bestPc = -1;
int bestLine = -1;
for (int i = 0; i < sz; i++) {
Item one = get(i);
int onePc = one.getStartPc();
if ((onePc <= pc) && (onePc > bestPc)) {
bestPc = onePc;
bestLine = one.getLineNumber();
if (bestPc == pc) {
// We can't do better than this
break;
}
}
}
return bestLine;
}
public int pcToLine(int pc) {
/*
* Line number entries don't have to appear in any particular
* order, so we have to do a linear search. TODO: If
* this turns out to be a bottleneck, consider sorting the
* list prior to use.
*/
int sz = size();
int bestPc = -1;
int bestLine = -1;
for (int i = 0; i < sz; i++) {
Item one = get(i);
int onePc = one.getStartPc();
if ((onePc <= pc) && (onePc > bestPc)) {
bestPc = onePc;
bestLine = one.getLineNumber();
if (bestPc == pc) {
// We can't do better than this
break;
}
}
}
return bestLine;
}