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

Side by Side Diff: lib/runtime/dart/_internal.js

Issue 1074923003: rename dart_runtime.js helpers (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « lib/runtime/dart/_interceptors.js ('k') | lib/runtime/dart/_isolate_helper.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var _internal; 1 var _internal;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class EfficientLength extends core.Object {} 4 class EfficientLength extends core.Object {}
5 let ListIterable$ = dart.generic(function(E) { 5 let ListIterable$ = dart.generic(function(E) {
6 class ListIterable extends collection.IterableBase$(E) { 6 class ListIterable extends collection.IterableBase$(E) {
7 ListIterable() { 7 ListIterable() {
8 super.IterableBase(); 8 super.IterableBase();
9 } 9 }
10 get [core.$iterator]() { 10 get [core.$iterator]() {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 [core.$map](f) { 160 [core.$map](f) {
161 return new MappedListIterable(this, f); 161 return new MappedListIterable(this, f);
162 } 162 }
163 [core.$reduce](combine) { 163 [core.$reduce](combine) {
164 let length = this[core.$length]; 164 let length = this[core.$length];
165 if (length == 0) 165 if (length == 0)
166 throw IterableElementError.noElement(); 166 throw IterableElementError.noElement();
167 let value = this.elementAt(0); 167 let value = this.elementAt(0);
168 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 168 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
169 value = dart.dinvokef(combine, value, this.elementAt(i)); 169 value = dart.dcall(combine, value, this.elementAt(i));
170 if (length != this[core.$length]) { 170 if (length != this[core.$length]) {
171 throw new core.ConcurrentModificationError(this); 171 throw new core.ConcurrentModificationError(this);
172 } 172 }
173 } 173 }
174 return value; 174 return value;
175 } 175 }
176 [core.$fold](initialValue, combine) { 176 [core.$fold](initialValue, combine) {
177 let value = initialValue; 177 let value = initialValue;
178 let length = this[core.$length]; 178 let length = this[core.$length];
179 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 179 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
180 value = dart.dinvokef(combine, value, this.elementAt(i)); 180 value = dart.dcall(combine, value, this.elementAt(i));
181 if (length != this[core.$length]) { 181 if (length != this[core.$length]) {
182 throw new core.ConcurrentModificationError(this); 182 throw new core.ConcurrentModificationError(this);
183 } 183 }
184 } 184 }
185 return value; 185 return value;
186 } 186 }
187 [core.$skip](count) { 187 [core.$skip](count) {
188 return new (SubListIterable$(E))(this, count, null); 188 return new (SubListIterable$(E))(this, count, null);
189 } 189 }
190 [core.$skipWhile](test) { 190 [core.$skipWhile](test) {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 get current() { 519 get current() {
520 return this[_current]; 520 return this[_current];
521 } 521 }
522 moveNext() { 522 moveNext() {
523 if (this[_currentExpansion] == null) 523 if (this[_currentExpansion] == null)
524 return false; 524 return false;
525 while (!dart.notNull(this[_currentExpansion].moveNext())) { 525 while (!dart.notNull(this[_currentExpansion].moveNext())) {
526 this[_current] = null; 526 this[_current] = null;
527 if (this[_iterator].moveNext()) { 527 if (this[_iterator].moveNext()) {
528 this[_currentExpansion] = null; 528 this[_currentExpansion] = null;
529 this[_currentExpansion] = dart.as(dart.dinvokef(this[_f], this[_iter ator].current)[core.$iterator], core.Iterator$(T)); 529 this[_currentExpansion] = dart.as(dart.dcall(this[_f], this[_iterato r].current)[core.$iterator], core.Iterator$(T));
530 } else { 530 } else {
531 return false; 531 return false;
532 } 532 }
533 } 533 }
534 this[_current] = this[_currentExpansion].current; 534 this[_current] = this[_currentExpansion].current;
535 return true; 535 return true;
536 } 536 }
537 } 537 }
538 ExpandIterator[dart.implements] = () => [core.Iterator$(T)]; 538 ExpandIterator[dart.implements] = () => [core.Iterator$(T)];
539 return ExpandIterator; 539 return ExpandIterator;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 class TakeWhileIterator extends core.Iterator$(E) { 625 class TakeWhileIterator extends core.Iterator$(E) {
626 TakeWhileIterator(iterator$, f$) { 626 TakeWhileIterator(iterator$, f$) {
627 this[_iterator] = iterator$; 627 this[_iterator] = iterator$;
628 this[_f] = f$; 628 this[_f] = f$;
629 this[_isFinished] = false; 629 this[_isFinished] = false;
630 super.Iterator(); 630 super.Iterator();
631 } 631 }
632 moveNext() { 632 moveNext() {
633 if (this[_isFinished]) 633 if (this[_isFinished])
634 return false; 634 return false;
635 if (!dart.notNull(this[_iterator].moveNext()) || !dart.notNull(dart.dinv okef(this[_f], this[_iterator].current))) { 635 if (!dart.notNull(this[_iterator].moveNext()) || !dart.notNull(dart.dcal l(this[_f], this[_iterator].current))) {
636 this[_isFinished] = true; 636 this[_isFinished] = true;
637 return false; 637 return false;
638 } 638 }
639 return true; 639 return true;
640 } 640 }
641 get current() { 641 get current() {
642 if (this[_isFinished]) 642 if (this[_isFinished])
643 return null; 643 return null;
644 return this[_iterator].current; 644 return this[_iterator].current;
645 } 645 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 SkipWhileIterator(iterator$, f$) { 737 SkipWhileIterator(iterator$, f$) {
738 this[_iterator] = iterator$; 738 this[_iterator] = iterator$;
739 this[_f] = f$; 739 this[_f] = f$;
740 this[_hasSkipped] = false; 740 this[_hasSkipped] = false;
741 super.Iterator(); 741 super.Iterator();
742 } 742 }
743 moveNext() { 743 moveNext() {
744 if (!dart.notNull(this[_hasSkipped])) { 744 if (!dart.notNull(this[_hasSkipped])) {
745 this[_hasSkipped] = true; 745 this[_hasSkipped] = true;
746 while (this[_iterator].moveNext()) { 746 while (this[_iterator].moveNext()) {
747 if (!dart.notNull(dart.dinvokef(this[_f], this[_iterator].current))) 747 if (!dart.notNull(dart.dcall(this[_f], this[_iterator].current)))
748 return true; 748 return true;
749 } 749 }
750 } 750 }
751 return this[_iterator].moveNext(); 751 return this[_iterator].moveNext();
752 } 752 }
753 get current() { 753 get current() {
754 return this[_iterator].current; 754 return this[_iterator].current;
755 } 755 }
756 } 756 }
757 return SkipWhileIterator; 757 return SkipWhileIterator;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 class IterableMixinWorkaround extends core.Object { 880 class IterableMixinWorkaround extends core.Object {
881 static contains(iterable, element) { 881 static contains(iterable, element) {
882 for (let e of iterable) { 882 for (let e of iterable) {
883 if (dart.equals(e, element)) 883 if (dart.equals(e, element))
884 return true; 884 return true;
885 } 885 }
886 return false; 886 return false;
887 } 887 }
888 static forEach(iterable, f) { 888 static forEach(iterable, f) {
889 for (let e of iterable) { 889 for (let e of iterable) {
890 dart.dinvokef(f, e); 890 dart.dcall(f, e);
891 } 891 }
892 } 892 }
893 static any(iterable, f) { 893 static any(iterable, f) {
894 for (let e of iterable) { 894 for (let e of iterable) {
895 if (dart.dinvokef(f, e)) 895 if (dart.dcall(f, e))
896 return true; 896 return true;
897 } 897 }
898 return false; 898 return false;
899 } 899 }
900 static every(iterable, f) { 900 static every(iterable, f) {
901 for (let e of iterable) { 901 for (let e of iterable) {
902 if (!dart.notNull(dart.dinvokef(f, e))) 902 if (!dart.notNull(dart.dcall(f, e)))
903 return false; 903 return false;
904 } 904 }
905 return true; 905 return true;
906 } 906 }
907 static reduce(iterable, combine) { 907 static reduce(iterable, combine) {
908 let iterator = iterable[core.$iterator]; 908 let iterator = iterable[core.$iterator];
909 if (!dart.notNull(iterator.moveNext())) 909 if (!dart.notNull(iterator.moveNext()))
910 throw IterableElementError.noElement(); 910 throw IterableElementError.noElement();
911 let value = iterator.current; 911 let value = iterator.current;
912 while (iterator.moveNext()) { 912 while (iterator.moveNext()) {
913 value = dart.dinvokef(combine, value, iterator.current); 913 value = dart.dcall(combine, value, iterator.current);
914 } 914 }
915 return value; 915 return value;
916 } 916 }
917 static fold(iterable, initialValue, combine) { 917 static fold(iterable, initialValue, combine) {
918 for (let element of iterable) { 918 for (let element of iterable) {
919 initialValue = dart.dinvokef(combine, initialValue, element); 919 initialValue = dart.dcall(combine, initialValue, element);
920 } 920 }
921 return initialValue; 921 return initialValue;
922 } 922 }
923 static removeWhereList(list, test) { 923 static removeWhereList(list, test) {
924 let retained = new core.List.from([]); 924 let retained = new core.List.from([]);
925 let length = list[core.$length]; 925 let length = list[core.$length];
926 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 926 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
927 let element = list[core.$get](i); 927 let element = list[core.$get](i);
928 if (!dart.notNull(dart.dinvokef(test, element))) { 928 if (!dart.notNull(dart.dcall(test, element))) {
929 retained[core.$add](element); 929 retained[core.$add](element);
930 } 930 }
931 if (length != list[core.$length]) { 931 if (length != list[core.$length]) {
932 throw new core.ConcurrentModificationError(list); 932 throw new core.ConcurrentModificationError(list);
933 } 933 }
934 } 934 }
935 if (retained[core.$length] == length) 935 if (retained[core.$length] == length)
936 return; 936 return;
937 list[core.$length] = retained[core.$length]; 937 list[core.$length] = retained[core.$length];
938 for (let i = 0; dart.notNull(i) < dart.notNull(retained[core.$length]); i = dart.notNull(i) + 1) { 938 for (let i = 0; dart.notNull(i) < dart.notNull(retained[core.$length]); i = dart.notNull(i) + 1) {
(...skipping 25 matching lines...) Expand all
964 let it = iterable[core.$iterator]; 964 let it = iterable[core.$iterator];
965 if (!dart.notNull(it.moveNext())) 965 if (!dart.notNull(it.moveNext()))
966 throw IterableElementError.noElement(); 966 throw IterableElementError.noElement();
967 let result = it.current; 967 let result = it.current;
968 if (it.moveNext()) 968 if (it.moveNext())
969 throw IterableElementError.tooMany(); 969 throw IterableElementError.tooMany();
970 return result; 970 return result;
971 } 971 }
972 static firstWhere(iterable, test, orElse) { 972 static firstWhere(iterable, test, orElse) {
973 for (let element of iterable) { 973 for (let element of iterable) {
974 if (dart.dinvokef(test, element)) 974 if (dart.dcall(test, element))
975 return element; 975 return element;
976 } 976 }
977 if (orElse != null) 977 if (orElse != null)
978 return orElse(); 978 return orElse();
979 throw IterableElementError.noElement(); 979 throw IterableElementError.noElement();
980 } 980 }
981 static lastWhere(iterable, test, orElse) { 981 static lastWhere(iterable, test, orElse) {
982 let result = null; 982 let result = null;
983 let foundMatching = false; 983 let foundMatching = false;
984 for (let element of iterable) { 984 for (let element of iterable) {
985 if (dart.dinvokef(test, element)) { 985 if (dart.dcall(test, element)) {
986 result = element; 986 result = element;
987 foundMatching = true; 987 foundMatching = true;
988 } 988 }
989 } 989 }
990 if (foundMatching) 990 if (foundMatching)
991 return result; 991 return result;
992 if (orElse != null) 992 if (orElse != null)
993 return orElse(); 993 return orElse();
994 throw IterableElementError.noElement(); 994 throw IterableElementError.noElement();
995 } 995 }
996 static lastWhereList(list, test, orElse) { 996 static lastWhereList(list, test, orElse) {
997 for (let i = dart.notNull(list[core.$length]) - 1; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { 997 for (let i = dart.notNull(list[core.$length]) - 1; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) {
998 let element = list[core.$get](i); 998 let element = list[core.$get](i);
999 if (dart.dinvokef(test, element)) 999 if (dart.dcall(test, element))
1000 return element; 1000 return element;
1001 } 1001 }
1002 if (orElse != null) 1002 if (orElse != null)
1003 return orElse(); 1003 return orElse();
1004 throw IterableElementError.noElement(); 1004 throw IterableElementError.noElement();
1005 } 1005 }
1006 static singleWhere(iterable, test) { 1006 static singleWhere(iterable, test) {
1007 let result = null; 1007 let result = null;
1008 let foundMatching = false; 1008 let foundMatching = false;
1009 for (let element of iterable) { 1009 for (let element of iterable) {
1010 if (dart.dinvokef(test, element)) { 1010 if (dart.dcall(test, element)) {
1011 if (foundMatching) { 1011 if (foundMatching) {
1012 throw IterableElementError.tooMany(); 1012 throw IterableElementError.tooMany();
1013 } 1013 }
1014 result = element; 1014 result = element;
1015 foundMatching = true; 1015 foundMatching = true;
1016 } 1016 }
1017 } 1017 }
1018 if (foundMatching) 1018 if (foundMatching)
1019 return result; 1019 return result;
1020 throw IterableElementError.noElement(); 1020 throw IterableElementError.noElement();
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1589 if (dart.notNull(right) - dart.notNull(left) <= dart.notNull(Sort[_INSERTI ON_SORT_THRESHOLD])) { 1589 if (dart.notNull(right) - dart.notNull(left) <= dart.notNull(Sort[_INSERTI ON_SORT_THRESHOLD])) {
1590 Sort[_insertionSort](a, left, right, compare); 1590 Sort[_insertionSort](a, left, right, compare);
1591 } else { 1591 } else {
1592 Sort[_dualPivotQuicksort](a, left, right, compare); 1592 Sort[_dualPivotQuicksort](a, left, right, compare);
1593 } 1593 }
1594 } 1594 }
1595 static [_insertionSort](a, left, right, compare) { 1595 static [_insertionSort](a, left, right, compare) {
1596 for (let i = dart.notNull(left) + 1; dart.notNull(i) <= dart.notNull(right ); i = dart.notNull(i) + 1) { 1596 for (let i = dart.notNull(left) + 1; dart.notNull(i) <= dart.notNull(right ); i = dart.notNull(i) + 1) {
1597 let el = a[core.$get](i); 1597 let el = a[core.$get](i);
1598 let j = i; 1598 let j = i;
1599 while (dart.notNull(j) > dart.notNull(left) && dart.notNull(dart.dinvoke f(compare, a[core.$get](dart.notNull(j) - 1), el)) > 0) { 1599 while (dart.notNull(j) > dart.notNull(left) && dart.notNull(dart.dcall(c ompare, a[core.$get](dart.notNull(j) - 1), el)) > 0) {
1600 a[core.$set](j, a[core.$get](dart.notNull(j) - 1)); 1600 a[core.$set](j, a[core.$get](dart.notNull(j) - 1));
1601 j = dart.notNull(j) - 1; 1601 j = dart.notNull(j) - 1;
1602 } 1602 }
1603 a[core.$set](j, el); 1603 a[core.$set](j, el);
1604 } 1604 }
1605 } 1605 }
1606 static [_dualPivotQuicksort](a, left, right, compare) { 1606 static [_dualPivotQuicksort](a, left, right, compare) {
1607 dart.assert(dart.notNull(right) - dart.notNull(left) > dart.notNull(Sort[_ INSERTION_SORT_THRESHOLD])); 1607 dart.assert(dart.notNull(right) - dart.notNull(left) > dart.notNull(Sort[_ INSERTION_SORT_THRESHOLD]));
1608 let sixth = ((dart.notNull(right) - dart.notNull(left) + 1) / 6).truncate( ); 1608 let sixth = ((dart.notNull(right) - dart.notNull(left) + 1) / 6).truncate( );
1609 let index1 = dart.notNull(left) + dart.notNull(sixth); 1609 let index1 = dart.notNull(left) + dart.notNull(sixth);
1610 let index5 = dart.notNull(right) - dart.notNull(sixth); 1610 let index5 = dart.notNull(right) - dart.notNull(sixth);
1611 let index3 = ((dart.notNull(left) + dart.notNull(right)) / 2).truncate(); 1611 let index3 = ((dart.notNull(left) + dart.notNull(right)) / 2).truncate();
1612 let index2 = dart.notNull(index3) - dart.notNull(sixth); 1612 let index2 = dart.notNull(index3) - dart.notNull(sixth);
1613 let index4 = dart.notNull(index3) + dart.notNull(sixth); 1613 let index4 = dart.notNull(index3) + dart.notNull(sixth);
1614 let el1 = a[core.$get](index1); 1614 let el1 = a[core.$get](index1);
1615 let el2 = a[core.$get](index2); 1615 let el2 = a[core.$get](index2);
1616 let el3 = a[core.$get](index3); 1616 let el3 = a[core.$get](index3);
1617 let el4 = a[core.$get](index4); 1617 let el4 = a[core.$get](index4);
1618 let el5 = a[core.$get](index5); 1618 let el5 = a[core.$get](index5);
1619 if (dart.notNull(dart.dinvokef(compare, el1, el2)) > 0) { 1619 if (dart.notNull(dart.dcall(compare, el1, el2)) > 0) {
1620 let t = el1; 1620 let t = el1;
1621 el1 = el2; 1621 el1 = el2;
1622 el2 = t; 1622 el2 = t;
1623 } 1623 }
1624 if (dart.notNull(dart.dinvokef(compare, el4, el5)) > 0) { 1624 if (dart.notNull(dart.dcall(compare, el4, el5)) > 0) {
1625 let t = el4; 1625 let t = el4;
1626 el4 = el5; 1626 el4 = el5;
1627 el5 = t; 1627 el5 = t;
1628 } 1628 }
1629 if (dart.notNull(dart.dinvokef(compare, el1, el3)) > 0) { 1629 if (dart.notNull(dart.dcall(compare, el1, el3)) > 0) {
1630 let t = el1; 1630 let t = el1;
1631 el1 = el3; 1631 el1 = el3;
1632 el3 = t; 1632 el3 = t;
1633 } 1633 }
1634 if (dart.notNull(dart.dinvokef(compare, el2, el3)) > 0) { 1634 if (dart.notNull(dart.dcall(compare, el2, el3)) > 0) {
1635 let t = el2; 1635 let t = el2;
1636 el2 = el3; 1636 el2 = el3;
1637 el3 = t; 1637 el3 = t;
1638 } 1638 }
1639 if (dart.notNull(dart.dinvokef(compare, el1, el4)) > 0) { 1639 if (dart.notNull(dart.dcall(compare, el1, el4)) > 0) {
1640 let t = el1; 1640 let t = el1;
1641 el1 = el4; 1641 el1 = el4;
1642 el4 = t; 1642 el4 = t;
1643 } 1643 }
1644 if (dart.notNull(dart.dinvokef(compare, el3, el4)) > 0) { 1644 if (dart.notNull(dart.dcall(compare, el3, el4)) > 0) {
1645 let t = el3; 1645 let t = el3;
1646 el3 = el4; 1646 el3 = el4;
1647 el4 = t; 1647 el4 = t;
1648 } 1648 }
1649 if (dart.notNull(dart.dinvokef(compare, el2, el5)) > 0) { 1649 if (dart.notNull(dart.dcall(compare, el2, el5)) > 0) {
1650 let t = el2; 1650 let t = el2;
1651 el2 = el5; 1651 el2 = el5;
1652 el5 = t; 1652 el5 = t;
1653 } 1653 }
1654 if (dart.notNull(dart.dinvokef(compare, el2, el3)) > 0) { 1654 if (dart.notNull(dart.dcall(compare, el2, el3)) > 0) {
1655 let t = el2; 1655 let t = el2;
1656 el2 = el3; 1656 el2 = el3;
1657 el3 = t; 1657 el3 = t;
1658 } 1658 }
1659 if (dart.notNull(dart.dinvokef(compare, el4, el5)) > 0) { 1659 if (dart.notNull(dart.dcall(compare, el4, el5)) > 0) {
1660 let t = el4; 1660 let t = el4;
1661 el4 = el5; 1661 el4 = el5;
1662 el5 = t; 1662 el5 = t;
1663 } 1663 }
1664 let pivot1 = el2; 1664 let pivot1 = el2;
1665 let pivot2 = el4; 1665 let pivot2 = el4;
1666 a[core.$set](index1, el1); 1666 a[core.$set](index1, el1);
1667 a[core.$set](index3, el3); 1667 a[core.$set](index3, el3);
1668 a[core.$set](index5, el5); 1668 a[core.$set](index5, el5);
1669 a[core.$set](index2, a[core.$get](left)); 1669 a[core.$set](index2, a[core.$get](left));
1670 a[core.$set](index4, a[core.$get](right)); 1670 a[core.$set](index4, a[core.$get](right));
1671 let less = dart.notNull(left) + 1; 1671 let less = dart.notNull(left) + 1;
1672 let great = dart.notNull(right) - 1; 1672 let great = dart.notNull(right) - 1;
1673 let pivots_are_equal = dart.dinvokef(compare, pivot1, pivot2) == 0; 1673 let pivots_are_equal = dart.dcall(compare, pivot1, pivot2) == 0;
1674 if (pivots_are_equal) { 1674 if (pivots_are_equal) {
1675 let pivot = pivot1; 1675 let pivot = pivot1;
1676 for (let k = less; dart.notNull(k) <= dart.notNull(great); k = dart.notN ull(k) + 1) { 1676 for (let k = less; dart.notNull(k) <= dart.notNull(great); k = dart.notN ull(k) + 1) {
1677 let ak = a[core.$get](k); 1677 let ak = a[core.$get](k);
1678 let comp = dart.dinvokef(compare, ak, pivot); 1678 let comp = dart.dcall(compare, ak, pivot);
1679 if (comp == 0) 1679 if (comp == 0)
1680 continue; 1680 continue;
1681 if (dart.notNull(comp) < 0) { 1681 if (dart.notNull(comp) < 0) {
1682 if (k != less) { 1682 if (k != less) {
1683 a[core.$set](k, a[core.$get](less)); 1683 a[core.$set](k, a[core.$get](less));
1684 a[core.$set](less, ak); 1684 a[core.$set](less, ak);
1685 } 1685 }
1686 less = dart.notNull(less) + 1; 1686 less = dart.notNull(less) + 1;
1687 } else { 1687 } else {
1688 while (true) { 1688 while (true) {
1689 comp = dart.dinvokef(compare, a[core.$get](great), pivot); 1689 comp = dart.dcall(compare, a[core.$get](great), pivot);
1690 if (dart.notNull(comp) > 0) { 1690 if (dart.notNull(comp) > 0) {
1691 great = dart.notNull(great) - 1; 1691 great = dart.notNull(great) - 1;
1692 continue; 1692 continue;
1693 } else if (dart.notNull(comp) < 0) { 1693 } else if (dart.notNull(comp) < 0) {
1694 a[core.$set](k, a[core.$get](less)); 1694 a[core.$set](k, a[core.$get](less));
1695 a[core.$set]((() => { 1695 a[core.$set]((() => {
1696 let x = less; 1696 let x = less;
1697 less = dart.notNull(x) + 1; 1697 less = dart.notNull(x) + 1;
1698 return x; 1698 return x;
1699 })(), a[core.$get](great)); 1699 })(), a[core.$get](great));
(...skipping 11 matching lines...) Expand all
1711 return x; 1711 return x;
1712 })(), ak); 1712 })(), ak);
1713 break; 1713 break;
1714 } 1714 }
1715 } 1715 }
1716 } 1716 }
1717 } 1717 }
1718 } else { 1718 } else {
1719 for (let k = less; dart.notNull(k) <= dart.notNull(great); k = dart.notN ull(k) + 1) { 1719 for (let k = less; dart.notNull(k) <= dart.notNull(great); k = dart.notN ull(k) + 1) {
1720 let ak = a[core.$get](k); 1720 let ak = a[core.$get](k);
1721 let comp_pivot1 = dart.dinvokef(compare, ak, pivot1); 1721 let comp_pivot1 = dart.dcall(compare, ak, pivot1);
1722 if (dart.notNull(comp_pivot1) < 0) { 1722 if (dart.notNull(comp_pivot1) < 0) {
1723 if (k != less) { 1723 if (k != less) {
1724 a[core.$set](k, a[core.$get](less)); 1724 a[core.$set](k, a[core.$get](less));
1725 a[core.$set](less, ak); 1725 a[core.$set](less, ak);
1726 } 1726 }
1727 less = dart.notNull(less) + 1; 1727 less = dart.notNull(less) + 1;
1728 } else { 1728 } else {
1729 let comp_pivot2 = dart.dinvokef(compare, ak, pivot2); 1729 let comp_pivot2 = dart.dcall(compare, ak, pivot2);
1730 if (dart.notNull(comp_pivot2) > 0) { 1730 if (dart.notNull(comp_pivot2) > 0) {
1731 while (true) { 1731 while (true) {
1732 let comp = dart.dinvokef(compare, a[core.$get](great), pivot2); 1732 let comp = dart.dcall(compare, a[core.$get](great), pivot2);
1733 if (dart.notNull(comp) > 0) { 1733 if (dart.notNull(comp) > 0) {
1734 great = dart.notNull(great) - 1; 1734 great = dart.notNull(great) - 1;
1735 if (dart.notNull(great) < dart.notNull(k)) 1735 if (dart.notNull(great) < dart.notNull(k))
1736 break; 1736 break;
1737 continue; 1737 continue;
1738 } else { 1738 } else {
1739 comp = dart.dinvokef(compare, a[core.$get](great), pivot1); 1739 comp = dart.dcall(compare, a[core.$get](great), pivot1);
1740 if (dart.notNull(comp) < 0) { 1740 if (dart.notNull(comp) < 0) {
1741 a[core.$set](k, a[core.$get](less)); 1741 a[core.$set](k, a[core.$get](less));
1742 a[core.$set]((() => { 1742 a[core.$set]((() => {
1743 let x = less; 1743 let x = less;
1744 less = dart.notNull(x) + 1; 1744 less = dart.notNull(x) + 1;
1745 return x; 1745 return x;
1746 })(), a[core.$get](great)); 1746 })(), a[core.$get](great));
1747 a[core.$set]((() => { 1747 a[core.$set]((() => {
1748 let x = great; 1748 let x = great;
1749 great = dart.notNull(x) - 1; 1749 great = dart.notNull(x) - 1;
(...skipping 17 matching lines...) Expand all
1767 a[core.$set](left, a[core.$get](dart.notNull(less) - 1)); 1767 a[core.$set](left, a[core.$get](dart.notNull(less) - 1));
1768 a[core.$set](dart.notNull(less) - 1, pivot1); 1768 a[core.$set](dart.notNull(less) - 1, pivot1);
1769 a[core.$set](right, a[core.$get](dart.notNull(great) + 1)); 1769 a[core.$set](right, a[core.$get](dart.notNull(great) + 1));
1770 a[core.$set](dart.notNull(great) + 1, pivot2); 1770 a[core.$set](dart.notNull(great) + 1, pivot2);
1771 Sort[_doSort](a, left, dart.notNull(less) - 2, compare); 1771 Sort[_doSort](a, left, dart.notNull(less) - 2, compare);
1772 Sort[_doSort](a, dart.notNull(great) + 2, right, compare); 1772 Sort[_doSort](a, dart.notNull(great) + 2, right, compare);
1773 if (pivots_are_equal) { 1773 if (pivots_are_equal) {
1774 return; 1774 return;
1775 } 1775 }
1776 if (dart.notNull(less) < dart.notNull(index1) && dart.notNull(great) > dar t.notNull(index5)) { 1776 if (dart.notNull(less) < dart.notNull(index1) && dart.notNull(great) > dar t.notNull(index5)) {
1777 while (dart.dinvokef(compare, a[core.$get](less), pivot1) == 0) { 1777 while (dart.dcall(compare, a[core.$get](less), pivot1) == 0) {
1778 less = dart.notNull(less) + 1; 1778 less = dart.notNull(less) + 1;
1779 } 1779 }
1780 while (dart.dinvokef(compare, a[core.$get](great), pivot2) == 0) { 1780 while (dart.dcall(compare, a[core.$get](great), pivot2) == 0) {
1781 great = dart.notNull(great) - 1; 1781 great = dart.notNull(great) - 1;
1782 } 1782 }
1783 for (let k = less; dart.notNull(k) <= dart.notNull(great); k = dart.notN ull(k) + 1) { 1783 for (let k = less; dart.notNull(k) <= dart.notNull(great); k = dart.notN ull(k) + 1) {
1784 let ak = a[core.$get](k); 1784 let ak = a[core.$get](k);
1785 let comp_pivot1 = dart.dinvokef(compare, ak, pivot1); 1785 let comp_pivot1 = dart.dcall(compare, ak, pivot1);
1786 if (comp_pivot1 == 0) { 1786 if (comp_pivot1 == 0) {
1787 if (k != less) { 1787 if (k != less) {
1788 a[core.$set](k, a[core.$get](less)); 1788 a[core.$set](k, a[core.$get](less));
1789 a[core.$set](less, ak); 1789 a[core.$set](less, ak);
1790 } 1790 }
1791 less = dart.notNull(less) + 1; 1791 less = dart.notNull(less) + 1;
1792 } else { 1792 } else {
1793 let comp_pivot2 = dart.dinvokef(compare, ak, pivot2); 1793 let comp_pivot2 = dart.dcall(compare, ak, pivot2);
1794 if (comp_pivot2 == 0) { 1794 if (comp_pivot2 == 0) {
1795 while (true) { 1795 while (true) {
1796 let comp = dart.dinvokef(compare, a[core.$get](great), pivot2); 1796 let comp = dart.dcall(compare, a[core.$get](great), pivot2);
1797 if (comp == 0) { 1797 if (comp == 0) {
1798 great = dart.notNull(great) - 1; 1798 great = dart.notNull(great) - 1;
1799 if (dart.notNull(great) < dart.notNull(k)) 1799 if (dart.notNull(great) < dart.notNull(k))
1800 break; 1800 break;
1801 continue; 1801 continue;
1802 } else { 1802 } else {
1803 comp = dart.dinvokef(compare, a[core.$get](great), pivot1); 1803 comp = dart.dcall(compare, a[core.$get](great), pivot1);
1804 if (dart.notNull(comp) < 0) { 1804 if (dart.notNull(comp) < 0) {
1805 a[core.$set](k, a[core.$get](less)); 1805 a[core.$set](k, a[core.$get](less));
1806 a[core.$set]((() => { 1806 a[core.$set]((() => {
1807 let x = less; 1807 let x = less;
1808 less = dart.notNull(x) + 1; 1808 less = dart.notNull(x) + 1;
1809 return x; 1809 return x;
1810 })(), a[core.$get](great)); 1810 })(), a[core.$get](great));
1811 a[core.$set]((() => { 1811 a[core.$set]((() => {
1812 let x = great; 1812 let x = great;
1813 great = dart.notNull(x) - 1; 1813 great = dart.notNull(x) - 1;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1953 exports.ReversedListIterable = ReversedListIterable; 1953 exports.ReversedListIterable = ReversedListIterable;
1954 exports.UnmodifiableListError = UnmodifiableListError; 1954 exports.UnmodifiableListError = UnmodifiableListError;
1955 exports.NonGrowableListError = NonGrowableListError; 1955 exports.NonGrowableListError = NonGrowableListError;
1956 exports.makeListFixedLength = makeListFixedLength; 1956 exports.makeListFixedLength = makeListFixedLength;
1957 exports.Lists = Lists; 1957 exports.Lists = Lists;
1958 exports.printToConsole = printToConsole; 1958 exports.printToConsole = printToConsole;
1959 exports.Sort = Sort; 1959 exports.Sort = Sort;
1960 exports.Symbol = Symbol; 1960 exports.Symbol = Symbol;
1961 exports.POWERS_OF_TEN = POWERS_OF_TEN; 1961 exports.POWERS_OF_TEN = POWERS_OF_TEN;
1962 })(_internal || (_internal = {})); 1962 })(_internal || (_internal = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/_interceptors.js ('k') | lib/runtime/dart/_isolate_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698