Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions lucene/core/src/java/org/apache/lucene/util/MSBRadixSorter.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,7 @@ protected int getBucket(int i, int k) {
*
* @see #buildHistogram
*/
// This method, and its namesakes, have been manually split to work around a JVM crash.
// See https://github.com/apache/lucene/issues/12898
private int computeCommonPrefixLengthAndBuildHistogram(int from, int to, int k, int[] histogram) {
int commonPrefixLength = computeInitialCommonPrefixLength(from, k);
return computeCommonPrefixLengthAndBuildHistogramPart1(
from, to, k, histogram, commonPrefixLength);
}

// This method, and its namesakes, have been manually split to work around a JVM crash.
private int computeInitialCommonPrefixLength(int from, int k) {
final int[] commonPrefix = this.commonPrefix;
int commonPrefixLength = Math.min(commonPrefix.length, maxLength - k);
for (int j = 0; j < commonPrefixLength; ++j) {
Expand All @@ -233,13 +224,7 @@ private int computeInitialCommonPrefixLength(int from, int k) {
break;
}
}
return commonPrefixLength;
}

// This method, and its namesakes, have been manually split to work around a JVM crash.
private int computeCommonPrefixLengthAndBuildHistogramPart1(
int from, int to, int k, int[] histogram, int commonPrefixLength) {
final int[] commonPrefix = this.commonPrefix;
int i;
outer:
for (i = from + 1; i < to; ++i) {
Expand All @@ -254,13 +239,7 @@ private int computeCommonPrefixLengthAndBuildHistogramPart1(
}
}
}
return computeCommonPrefixLengthAndBuildHistogramPart2(
from, to, k, histogram, commonPrefixLength, i);
}

// This method, and its namesakes, have been manually split to work around a JVM crash.
private int computeCommonPrefixLengthAndBuildHistogramPart2(
int from, int to, int k, int[] histogram, int commonPrefixLength, int i) {
if (i < to) {
// the loop got broken because there is no common prefix
assert commonPrefixLength == 0;
Expand Down
21 changes: 0 additions & 21 deletions lucene/core/src/java/org/apache/lucene/util/RadixSelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,7 @@ private int getBucket(int i, int k) {
*
* @see #buildHistogram
*/
// This method, and its namesakes, have been manually split to work around a JVM crash.
// See https://github.com/apache/lucene/issues/12898
private int computeCommonPrefixLengthAndBuildHistogram(int from, int to, int k, int[] histogram) {
int commonPrefixLength = computeInitialCommonPrefixLength(from, k);
return computeCommonPrefixLengthAndBuildHistogramPart1(
from, to, k, histogram, commonPrefixLength);
}

// This method, and its namesakes, have been manually split to work around a JVM crash.
private int computeInitialCommonPrefixLength(int from, int k) {
final int[] commonPrefix = this.commonPrefix;
int commonPrefixLength = Math.min(commonPrefix.length, maxLength - k);
for (int j = 0; j < commonPrefixLength; ++j) {
Expand All @@ -218,13 +209,7 @@ private int computeInitialCommonPrefixLength(int from, int k) {
break;
}
}
return commonPrefixLength;
}

// This method, and its namesakes, have been manually split to work around a JVM crash.
private int computeCommonPrefixLengthAndBuildHistogramPart1(
int from, int to, int k, int[] histogram, int commonPrefixLength) {
final int[] commonPrefix = this.commonPrefix;
int i;
outer:
for (i = from + 1; i < to; ++i) {
Expand All @@ -241,13 +226,7 @@ private int computeCommonPrefixLengthAndBuildHistogramPart1(
}
}
}
return computeCommonPrefixLengthAndBuildHistogramPart2(
from, to, k, histogram, commonPrefixLength, i);
}

// This method, and its namesakes, have been manually split to work around a JVM crash.
private int computeCommonPrefixLengthAndBuildHistogramPart2(
int from, int to, int k, int[] histogram, int commonPrefixLength, int i) {
if (i < to) {
// the loop got broken because there is no common prefix
assert commonPrefixLength == 0;
Expand Down
Loading