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

Side by Side Diff: webkit/data/test_shell/sort/sort-insertion.js

Issue 401923005: webkit: Remove all files from test_shell/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/data/test_shell/sort/sort-heap.js ('k') | webkit/data/test_shell/sort/sort-quick.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // insertion sort
2
3 function sort_insertion(sort, x, y) {
4 if (arguments.length == 1 || x == undefined) {
5 x = 1; y = 1;
6 }
7 var len = sort.bars.length;
8 if (x < len && y > 0) {
9 if (sort.compare(y, y - 1) < 0) {
10 sort.swap(y, y - 1);
11 y--;
12 if (y == 0) {
13 x++;
14 y = x;
15 }
16 } else {
17 x++;
18 y = x;
19 }
20 if (x < len) {
21 sort.add_work(function () { sort_insertion(sort, x, y); });
22 return;
23 }
24 }
25 }
26
OLDNEW
« no previous file with comments | « webkit/data/test_shell/sort/sort-heap.js ('k') | webkit/data/test_shell/sort/sort-quick.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698