我正在查看TimSort java代码: 在SourceLo函数的特定行676到739中的原始源代码.它(大致)有以下布局:
outer:
while (true) {
//Code here
break outer; //Code within a few if tests in the loop.
}
//Code here executes somehow.
Run Code Online (Sandbox Code Playgroud)
我很困惑这个函数如何停止运行,因为唯一的break语句转到外部块(然后应该回到while(true),并且没有return语句.
我的问题是,当我尝试排序184个或更多元素时,第747行正在执行并抛出异常,我想弄清楚如何解决它,任何帮助都将非常感激.
[注意]:这是部署在Android手机上的Java的collections.sort方法调用的函数.