8217424: Remove the idempotent parameter to Method::sort_methods
Reviewed-by: coleenp, shade
--- a/src/hotspot/share/classfile/defaultMethods.cpp Tue Jan 22 15:22:13 2019 -0800
+++ b/src/hotspot/share/classfile/defaultMethods.cpp Tue Jan 22 12:37:35 2019 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -988,7 +988,7 @@
for (int index = 0; index < new_size; index++ ) {
total_default_methods->at_put(index, new_methods->at(index));
}
- Method::sort_methods(total_default_methods, false, false);
+ Method::sort_methods(total_default_methods, /*set_idnums=*/false);
klass->set_default_methods(total_default_methods);
}
--- a/src/hotspot/share/oops/method.cpp Tue Jan 22 15:22:13 2019 -0800
+++ b/src/hotspot/share/oops/method.cpp Tue Jan 22 12:37:35 2019 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1604,12 +1604,12 @@
// This is only done during class loading, so it is OK to assume method_idnum matches the methods() array
// default_methods also uses this without the ordering for fast find_method
-void Method::sort_methods(Array<Method*>* methods, bool idempotent, bool set_idnums) {
+void Method::sort_methods(Array<Method*>* methods, bool set_idnums) {
int length = methods->length();
if (length > 1) {
{
NoSafepointVerifier nsv;
- QuickSort::sort(methods->data(), length, method_comparator, idempotent);
+ QuickSort::sort(methods->data(), length, method_comparator, /*idempotent=*/false);
}
// Reset method ordering
if (set_idnums) {
--- a/src/hotspot/share/oops/method.hpp Tue Jan 22 15:22:13 2019 -0800
+++ b/src/hotspot/share/oops/method.hpp Tue Jan 22 12:37:35 2019 -0800
@@ -969,7 +969,7 @@
#endif
// Helper routine used for method sorting
- static void sort_methods(Array<Method*>* methods, bool idempotent = false, bool set_idnums = true);
+ static void sort_methods(Array<Method*>* methods, bool set_idnums = true);
// Deallocation function for redefine classes or if an error occurs
void deallocate_contents(ClassLoaderData* loader_data);