Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: lib/core/sort.dart

Issue 11239004: Move DualPivotQuicksort from coreimpl to core as _Sort. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add note Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/core/corelib_sources.gypi ('k') | lib/coreimpl/coreimpl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/core/sort.dart
diff --git a/lib/coreimpl/dual_pivot_quicksort.dart b/lib/core/sort.dart
similarity index 98%
rename from lib/coreimpl/dual_pivot_quicksort.dart
rename to lib/core/sort.dart
index c74e90fc000b2560bcf605660b32d41164f72bd0..252a110f639aadc2a4a75d380a53dd094d7e48c0 100644
--- a/lib/coreimpl/dual_pivot_quicksort.dart
+++ b/lib/core/sort.dart
@@ -2,6 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// TODO(ajohnsen): Remove once coreimpl is eliminated.
+/**
+ * WARNING: This method is temporary and will go away soon.
+ */
+void coreSort(List l, int compare(a, b)) => _Sort.sort(l, compare);
+
/**
* Dual-Pivot Quicksort algorithm.
*
@@ -10,7 +16,7 @@
*
* Some improvements have been copied from Android's implementation.
*/
-class DualPivotQuicksort {
+class _Sort {
// When a list has less then [:_INSERTION_SORT_THRESHOLD:] elements it will
// be sorted by an insertion sort.
static const int _INSERTION_SORT_THRESHOLD = 32;
« no previous file with comments | « lib/core/corelib_sources.gypi ('k') | lib/coreimpl/coreimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698