Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static VectorizationProvider lookup(boolean testMode) {
return new DefaultVectorizationProvider();
}

static VectorizationProvider lookup(String className) {
private static VectorizationProvider lookup(String className) {
try {
// we use method handles with lookup, so we do not need to deal with setAccessible as we
// have private access through the lookup:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* overhead of ensuring MemorySegments are allocated off-heap before native calls.
*/
@SuppressWarnings("restricted")
public final class NativeVectorUtilSupport implements VectorUtilSupport {
final class NativeVectorUtilSupport implements VectorUtilSupport {

private final VectorUtilSupport delegateVectorUtilSupport;

Expand Down Expand Up @@ -259,7 +259,9 @@ private static float invokeFloatMethodHandle(MethodHandle mh, MemorySegment a, M
private static <T> T invokeOrDelegate(MethodHandle mh, Supplier<T> delegate, Object... args) {
if (mh != null) {
try {
return (T) mh.invokeExact(args);
// TODO: This is slow and we should avoid dynamic invocations and improve the test coverage
// (https://github.com/apache/lucene/issues/15840)
return (T) mh.invokeWithArguments(args);
} catch (Throwable ex) {
throw new AssertionError("should not reach here", ex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.lucene.util.SuppressForbidden;

/** Native provider returning native implementations which delegates to Panama implementation. */
public final class NativeVectorizationProvider extends VectorizationProvider {
final class NativeVectorizationProvider extends VectorizationProvider {

private final VectorizationProvider delegateVectorUtilProvider =
new PanamaVectorizationProvider();
Expand Down
Loading