本文整理汇总了Java中com.android.dx.util.IntList.sort方法的典型用法代码示例。如果您正苦于以下问题:Java IntList.sort方法的具体用法?Java IntList.sort怎么用?Java IntList.sort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.android.dx.util.IntList
的用法示例。
在下文中一共展示了IntList.sort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deleteUnreachableBlocks
import com.android.dx.util.IntList; //导入方法依赖的package包/类
/**
* Deletes all blocks that cannot be reached. This is run to delete
* original subroutine blocks after subroutine inlining.
*/
private void deleteUnreachableBlocks() {
final IntList reachableLabels = new IntList(result.size());
// subroutine inlining is done now and we won't update this list here
resultSubroutines.clear();
forEachNonSubBlockDepthFirst(getSpecialLabel(PARAM_ASSIGNMENT),
new BasicBlock.Visitor() {
public void visitBlock(BasicBlock b) {
reachableLabels.add(b.getLabel());
}
});
reachableLabels.sort();
for (int i = result.size() - 1 ; i >= 0 ; i--) {
if (reachableLabels.indexOf(result.get(i).getLabel()) < 0) {
result.remove(i);
// unnecessary here really, since subroutine inlining is done
//resultSubroutines.remove(i);
}
}
}