Index: sdk/lib/internal/sort.dart |
diff --git a/sdk/lib/internal/sort.dart b/sdk/lib/internal/sort.dart |
index 63037ea4d6388bad057aec257d0db30247540ddc..40a7d0957323cba9552329a75db968ccd7833528 100644 |
--- a/sdk/lib/internal/sort.dart |
+++ b/sdk/lib/internal/sort.dart |
@@ -29,7 +29,7 @@ class Sort { |
* The function's behavior must be consistent. It must not return different |
* results for the same values. |
*/ |
- static void sort/*<E>*/(List/*<E>*/ a, int compare(dynamic /*=E*/ a, dynamic /*=E*/ b)) { |
+ static void sort<E>(List<E> a, int compare(E a, E b)) { |
_doSort(a, 0, a.length - 1, compare); |
} |
@@ -42,7 +42,7 @@ class Sort { |
* |
* See [:sort:] for requirements of the [:compare:] function. |
*/ |
- static void sortRange/*<E>*/(List/*<E>*/ a, int from, int to, int compare(dynamic /*=E*/ a, dynamic /*=E*/ b)) { |
+ static void sortRange<E>(List<E> a, int from, int to, int compare(E a, E b)) { |
if ((from < 0) || (to > a.length) || (to < from)) { |
throw "OutOfRange"; |
} |
@@ -52,7 +52,8 @@ class Sort { |
/** |
* Sorts the list in the interval [:left:] to [:right:] (both inclusive). |
*/ |
- static void _doSort/*<E>*/(List/*<E>*/ a, int left, int right, int compare(dynamic /*=E*/ a, dynamic /*=E*/ b)) { |
+ static void _doSort<E>(List<E> a, int left, int right, |
+ int compare(E a, E b)) { |
if ((right - left) <= _INSERTION_SORT_THRESHOLD) { |
_insertionSort(a, left, right, compare); |
} else { |
@@ -60,7 +61,8 @@ class Sort { |
} |
} |
- static void _insertionSort/*<E>*/(List/*<E>*/ a, int left, int right, int compare(dynamic /*=E*/ a, dynamic /*=E*/ b)) { |
+ static void _insertionSort<E>(List<E> a, int left, int right, |
+ int compare(E a, E b)) { |
for (int i = left + 1; i <= right; i++) { |
var el = a[i]; |
int j = i; |
@@ -72,9 +74,8 @@ class Sort { |
} |
} |
- static void _dualPivotQuicksort/*<E>*/(List/*<E>*/ a, |
- int left, int right, |
- int compare(dynamic /*=E*/ a, dynamic /*=E*/ b)) { |
+ static void _dualPivotQuicksort<E>(List<E> a, int left, int right, |
+ int compare(E a, E b)) { |
assert(right - left > _INSERTION_SORT_THRESHOLD); |
// Compute the two pivots by looking at 5 elements. |