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

Side by Side Diff: dart/frog/minfrog

Issue 9416065: Stopwatch.elapsed must always increase after start has been called. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments and rebase Created 8 years, 10 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
OLDNEW
1 #!/usr/bin/env node 1 #!/usr/bin/env node
2 // ********** Library dart:core ************** 2 // ********** Library dart:core **************
3 // ********** Natives dart:core ************** 3 // ********** Natives dart:core **************
4 function $defProp(obj, prop, value) { 4 function $defProp(obj, prop, value) {
5 Object.defineProperty(obj, prop, 5 Object.defineProperty(obj, prop,
6 {value: value, enumerable: false, writable: true, configurable: true}); 6 {value: value, enumerable: false, writable: true, configurable: true});
7 } 7 }
8 Function.prototype.bind = Function.prototype.bind || 8 Function.prototype.bind = Function.prototype.bind ||
9 function(thisObj, args) { 9 function(thisObj, args) {
10 var func = this; 10 var func = this;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 }); 260 });
261 $defProp(Object.prototype, "instanceOf$3$isTrue$forceCheck", function($0, $1, $2 , isTrue, forceCheck) { 261 $defProp(Object.prototype, "instanceOf$3$isTrue$forceCheck", function($0, $1, $2 , isTrue, forceCheck) {
262 return this.noSuchMethod("instanceOf", [$0, $1, $2, isTrue, forceCheck]); 262 return this.noSuchMethod("instanceOf", [$0, $1, $2, isTrue, forceCheck]);
263 }); 263 });
264 $defProp(Object.prototype, "instanceOf$4", function($0, $1, $2, $3) { 264 $defProp(Object.prototype, "instanceOf$4", function($0, $1, $2, $3) {
265 return this.noSuchMethod("instanceOf", [$0, $1, $2, $3]); 265 return this.noSuchMethod("instanceOf", [$0, $1, $2, $3]);
266 }); 266 });
267 $defProp(Object.prototype, "invokeNoSuchMethod$3", function($0, $1, $2) { 267 $defProp(Object.prototype, "invokeNoSuchMethod$3", function($0, $1, $2) {
268 return this.noSuchMethod("invokeNoSuchMethod", [$0, $1, $2]); 268 return this.noSuchMethod("invokeNoSuchMethod", [$0, $1, $2]);
269 }); 269 });
270 $defProp(Object.prototype, "is$Collection", function() {
271 return false;
272 });
270 $defProp(Object.prototype, "is$List", function() { 273 $defProp(Object.prototype, "is$List", function() {
271 return false; 274 return false;
272 }); 275 });
276 $defProp(Object.prototype, "is$Map", function() {
277 return false;
278 });
273 $defProp(Object.prototype, "is$RegExp", function() { 279 $defProp(Object.prototype, "is$RegExp", function() {
274 return false; 280 return false;
275 }); 281 });
276 $defProp(Object.prototype, "remove$1", function($0) { 282 $defProp(Object.prototype, "remove$1", function($0) {
277 return this.noSuchMethod("remove", [$0]); 283 return this.noSuchMethod("remove", [$0]);
278 }); 284 });
279 $defProp(Object.prototype, "run$0", function() { 285 $defProp(Object.prototype, "run$0", function() {
280 return this.noSuchMethod("run", []); 286 return this.noSuchMethod("run", []);
281 }); 287 });
282 $defProp(Object.prototype, "setIndex$4$kind", function($0, $1, $2, $3, kind) { 288 $defProp(Object.prototype, "setIndex$4$kind", function($0, $1, $2, $3, kind) {
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 if (e.message.indexOf('call stack') >= 0) { 567 if (e.message.indexOf('call stack') >= 0) {
562 return attachStack(new StackOverflowException()); 568 return attachStack(new StackOverflowException());
563 } 569 }
564 } 570 }
565 return e; 571 return e;
566 } 572 }
567 // ********** Library dart:coreimpl ************** 573 // ********** Library dart:coreimpl **************
568 // ********** Code for ListFactory ************** 574 // ********** Code for ListFactory **************
569 ListFactory = Array; 575 ListFactory = Array;
570 $defProp(ListFactory.prototype, "is$List", function(){return true}); 576 $defProp(ListFactory.prototype, "is$List", function(){return true});
577 $defProp(ListFactory.prototype, "is$Collection", function(){return true});
571 ListFactory.ListFactory$from$factory = function(other) { 578 ListFactory.ListFactory$from$factory = function(other) {
572 var list = []; 579 var list = [];
573 for (var $$i = other.iterator(); $$i.hasNext(); ) { 580 for (var $$i = other.iterator(); $$i.hasNext(); ) {
574 var e = $$i.next(); 581 var e = $$i.next();
575 list.add(e); 582 list.add(e);
576 } 583 }
577 return list; 584 return list;
578 } 585 }
579 $defProp(ListFactory.prototype, "get$length", function() { return this.length; } ); 586 $defProp(ListFactory.prototype, "get$length", function() { return this.length; } );
580 $defProp(ListFactory.prototype, "set$length", function(value) { return this.leng th = value; }); 587 $defProp(ListFactory.prototype, "set$length", function(value) { return this.leng th = value; });
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 } 629 }
623 this.splice.apply(this, args); 630 this.splice.apply(this, args);
624 631
625 }); 632 });
626 $defProp(ListFactory.prototype, "isEmpty", function() { 633 $defProp(ListFactory.prototype, "isEmpty", function() {
627 return this.get$length() == (0); 634 return this.get$length() == (0);
628 }); 635 });
629 $defProp(ListFactory.prototype, "iterator", function() { 636 $defProp(ListFactory.prototype, "iterator", function() {
630 return new ListIterator(this); 637 return new ListIterator(this);
631 }); 638 });
639 $defProp(ListFactory.prototype, "toString", function() {
640 return Collections.collectionToString(this);
641 });
632 $defProp(ListFactory.prototype, "indexOf$1", ListFactory.prototype.indexOf); 642 $defProp(ListFactory.prototype, "indexOf$1", ListFactory.prototype.indexOf);
643 $defProp(ListFactory.prototype, "toString$0", ListFactory.prototype.toString);
633 // ********** Code for ListIterator ************** 644 // ********** Code for ListIterator **************
634 function ListIterator(array) { 645 function ListIterator(array) {
635 this._array = array; 646 this._array = array;
636 this._pos = (0); 647 this._pos = (0);
637 } 648 }
638 ListIterator.prototype.hasNext = function() { 649 ListIterator.prototype.hasNext = function() {
639 return this._array.get$length() > this._pos; 650 return this._array.get$length() > this._pos;
640 } 651 }
641 ListIterator.prototype.next = function() { 652 ListIterator.prototype.next = function() {
642 if (!this.hasNext()) { 653 if (!this.hasNext()) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 ImmutableList.prototype.addAll = function(elements) { 698 ImmutableList.prototype.addAll = function(elements) {
688 $throw(const$0006); 699 $throw(const$0006);
689 } 700 }
690 ImmutableList.prototype.clear = function() { 701 ImmutableList.prototype.clear = function() {
691 $throw(const$0006); 702 $throw(const$0006);
692 } 703 }
693 ImmutableList.prototype.removeLast = function() { 704 ImmutableList.prototype.removeLast = function() {
694 $throw(const$0006); 705 $throw(const$0006);
695 } 706 }
696 ImmutableList.prototype.toString = function() { 707 ImmutableList.prototype.toString = function() {
697 return ListFactory.ListFactory$from$factory(this).toString$0(); 708 return Collections.collectionToString(this);
698 } 709 }
699 ImmutableList.prototype.toString$0 = ImmutableList.prototype.toString; 710 ImmutableList.prototype.toString$0 = ImmutableList.prototype.toString;
700 // ********** Code for JSSyntaxRegExp ************** 711 // ********** Code for JSSyntaxRegExp **************
701 function JSSyntaxRegExp(pattern, multiLine, ignoreCase) { 712 function JSSyntaxRegExp(pattern, multiLine, ignoreCase) {
702 JSSyntaxRegExp._create$ctor.call(this, pattern, $add(($eq(multiLine, true) ? " m" : ""), ($eq(ignoreCase, true) ? "i" : ""))); 713 JSSyntaxRegExp._create$ctor.call(this, pattern, $add(($eq(multiLine, true) ? " m" : ""), ($eq(ignoreCase, true) ? "i" : "")));
703 } 714 }
704 JSSyntaxRegExp._create$ctor = function(pattern, flags) { 715 JSSyntaxRegExp._create$ctor = function(pattern, flags) {
705 this.re = new RegExp(pattern, flags); 716 this.re = new RegExp(pattern, flags);
706 this.pattern = pattern; 717 this.pattern = pattern;
707 this.multiLine = this.re.multiline; 718 this.multiLine = this.re.multiline;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 else if (this.isNaN()) { 842 else if (this.isNaN()) {
832 if (other.isNaN()) { 843 if (other.isNaN()) {
833 return (0); 844 return (0);
834 } 845 }
835 return (1); 846 return (1);
836 } 847 }
837 else { 848 else {
838 return (-1); 849 return (-1);
839 } 850 }
840 } 851 }
852 // ********** Code for Collections **************
853 function Collections() {}
854 Collections.collectionToString = function(c) {
855 var result = new StringBufferImpl("");
856 Collections._emitCollection(c, result, new Array());
857 return result.toString$0();
858 }
859 Collections._emitCollection = function(c, result, visiting) {
860 visiting.add(c);
861 var isList = !!(c && c.is$List());
862 result.add(isList ? "[" : "{");
863 var first = true;
864 for (var $$i = c.iterator(); $$i.hasNext(); ) {
865 var e = $$i.next();
866 if (!first) {
867 result.add(", ");
868 }
869 first = false;
870 Collections._emitObject(e, result, visiting);
871 }
872 result.add(isList ? "]" : "}");
873 visiting.removeLast();
874 }
875 Collections._emitObject = function(o, result, visiting) {
876 if (!!(o && o.is$Collection())) {
877 if (Collections._containsRef(visiting, o)) {
878 result.add(!!(o && o.is$List()) ? "[...]" : "{...}");
879 }
880 else {
881 Collections._emitCollection(o, result, visiting);
882 }
883 }
884 else if (!!(o && o.is$Map())) {
885 if (Collections._containsRef(visiting, o)) {
886 result.add("{...}");
887 }
888 else {
889 Maps._emitMap(o, result, visiting);
890 }
891 }
892 else {
893 result.add($eq(o) ? "null" : o);
894 }
895 }
896 Collections._containsRef = function(c, ref) {
897 for (var $$i = c.iterator(); $$i.hasNext(); ) {
898 var e = $$i.next();
899 if ((null == e ? null == (ref) : e === ref)) return true;
900 }
901 return false;
902 }
841 // ********** Code for HashMapImplementation ************** 903 // ********** Code for HashMapImplementation **************
842 function HashMapImplementation() { 904 function HashMapImplementation() {
843 this._numberOfEntries = (0); 905 this._numberOfEntries = (0);
844 this._numberOfDeleted = (0); 906 this._numberOfDeleted = (0);
845 this._loadLimit = HashMapImplementation._computeLoadLimit((8)); 907 this._loadLimit = HashMapImplementation._computeLoadLimit((8));
846 this._keys = new Array((8)); 908 this._keys = new Array((8));
847 this._values = new Array((8)); 909 this._values = new Array((8));
848 } 910 }
911 HashMapImplementation.prototype.is$Map = function(){return true};
849 HashMapImplementation.HashMapImplementation$from$factory = function(other) { 912 HashMapImplementation.HashMapImplementation$from$factory = function(other) {
850 var result = new HashMapImplementation(); 913 var result = new HashMapImplementation();
851 other.forEach((function (key, value) { 914 other.forEach((function (key, value) {
852 result.$setindex(key, value); 915 result.$setindex(key, value);
853 }) 916 })
854 ); 917 );
855 return result; 918 return result;
856 } 919 }
857 HashMapImplementation._computeLoadLimit = function(capacity) { 920 HashMapImplementation._computeLoadLimit = function(capacity) {
858 return $truncdiv((capacity * (3)), (4)); 921 return $truncdiv((capacity * (3)), (4));
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 var i = (0); 1057 var i = (0);
995 this.forEach(function _(key, value) { 1058 this.forEach(function _(key, value) {
996 list.$setindex(i++, value); 1059 list.$setindex(i++, value);
997 } 1060 }
998 ); 1061 );
999 return list; 1062 return list;
1000 } 1063 }
1001 HashMapImplementation.prototype.containsKey = function(key) { 1064 HashMapImplementation.prototype.containsKey = function(key) {
1002 return (this._probeForLookup(key) != (-1)); 1065 return (this._probeForLookup(key) != (-1));
1003 } 1066 }
1067 HashMapImplementation.prototype.toString = function() {
1068 return Maps.mapToString(this);
1069 }
1004 HashMapImplementation.prototype.remove$1 = HashMapImplementation.prototype.remov e; 1070 HashMapImplementation.prototype.remove$1 = HashMapImplementation.prototype.remov e;
1071 HashMapImplementation.prototype.toString$0 = HashMapImplementation.prototype.toS tring;
1005 // ********** Code for HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyV aluePair ************** 1072 // ********** Code for HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyV aluePair **************
1006 $inherits(HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValuePair, Has hMapImplementation); 1073 $inherits(HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValuePair, Has hMapImplementation);
1007 function HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValuePair() { 1074 function HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValuePair() {
1008 this._numberOfEntries = (0); 1075 this._numberOfEntries = (0);
1009 this._numberOfDeleted = (0); 1076 this._numberOfDeleted = (0);
1010 this._loadLimit = HashMapImplementation._computeLoadLimit((8)); 1077 this._loadLimit = HashMapImplementation._computeLoadLimit((8));
1011 this._keys = new Array((8)); 1078 this._keys = new Array((8));
1012 this._values = new Array((8)); 1079 this._values = new Array((8));
1013 } 1080 }
1081 HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValuePair.prototype.is$M ap = function(){return true};
1014 HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValuePair.prototype.remo ve$1 = HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValuePair.prototy pe.remove; 1082 HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValuePair.prototype.remo ve$1 = HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValuePair.prototy pe.remove;
1015 // ********** Code for HashMapImplementation_dart_core_String$dart_core_String * ************* 1083 // ********** Code for HashMapImplementation_dart_core_String$dart_core_String * *************
1016 $inherits(HashMapImplementation_dart_core_String$dart_core_String, HashMapImplem entation); 1084 $inherits(HashMapImplementation_dart_core_String$dart_core_String, HashMapImplem entation);
1017 function HashMapImplementation_dart_core_String$dart_core_String() { 1085 function HashMapImplementation_dart_core_String$dart_core_String() {
1018 this._numberOfEntries = (0); 1086 this._numberOfEntries = (0);
1019 this._numberOfDeleted = (0); 1087 this._numberOfDeleted = (0);
1020 this._loadLimit = HashMapImplementation._computeLoadLimit((8)); 1088 this._loadLimit = HashMapImplementation._computeLoadLimit((8));
1021 this._keys = new Array((8)); 1089 this._keys = new Array((8));
1022 this._values = new Array((8)); 1090 this._values = new Array((8));
1023 } 1091 }
1092 HashMapImplementation_dart_core_String$dart_core_String.prototype.is$Map = funct ion(){return true};
1024 HashMapImplementation_dart_core_String$dart_core_String.prototype.remove$1 = Has hMapImplementation_dart_core_String$dart_core_String.prototype.remove; 1093 HashMapImplementation_dart_core_String$dart_core_String.prototype.remove$1 = Has hMapImplementation_dart_core_String$dart_core_String.prototype.remove;
1025 // ********** Code for HashMapImplementation_dart_core_String$VariableValue **** ********** 1094 // ********** Code for HashMapImplementation_dart_core_String$VariableValue **** **********
1026 $inherits(HashMapImplementation_dart_core_String$VariableValue, HashMapImplement ation); 1095 $inherits(HashMapImplementation_dart_core_String$VariableValue, HashMapImplement ation);
1027 function HashMapImplementation_dart_core_String$VariableValue() { 1096 function HashMapImplementation_dart_core_String$VariableValue() {
1028 this._numberOfEntries = (0); 1097 this._numberOfEntries = (0);
1029 this._numberOfDeleted = (0); 1098 this._numberOfDeleted = (0);
1030 this._loadLimit = HashMapImplementation._computeLoadLimit((8)); 1099 this._loadLimit = HashMapImplementation._computeLoadLimit((8));
1031 this._keys = new Array((8)); 1100 this._keys = new Array((8));
1032 this._values = new Array((8)); 1101 this._values = new Array((8));
1033 } 1102 }
1103 HashMapImplementation_dart_core_String$VariableValue.prototype.is$Map = function (){return true};
1034 HashMapImplementation_dart_core_String$VariableValue.prototype.remove$1 = HashMa pImplementation_dart_core_String$VariableValue.prototype.remove; 1104 HashMapImplementation_dart_core_String$VariableValue.prototype.remove$1 = HashMa pImplementation_dart_core_String$VariableValue.prototype.remove;
1035 // ********** Code for HashMapImplementation_Library$Library ************** 1105 // ********** Code for HashMapImplementation_Library$Library **************
1036 $inherits(HashMapImplementation_Library$Library, HashMapImplementation); 1106 $inherits(HashMapImplementation_Library$Library, HashMapImplementation);
1037 function HashMapImplementation_Library$Library() { 1107 function HashMapImplementation_Library$Library() {
1038 this._numberOfEntries = (0); 1108 this._numberOfEntries = (0);
1039 this._numberOfDeleted = (0); 1109 this._numberOfDeleted = (0);
1040 this._loadLimit = HashMapImplementation._computeLoadLimit((8)); 1110 this._loadLimit = HashMapImplementation._computeLoadLimit((8));
1041 this._keys = new Array((8)); 1111 this._keys = new Array((8));
1042 this._values = new Array((8)); 1112 this._values = new Array((8));
1043 } 1113 }
1114 HashMapImplementation_Library$Library.prototype.is$Map = function(){return true} ;
1044 // ********** Code for HashMapImplementation_Member$Member ************** 1115 // ********** Code for HashMapImplementation_Member$Member **************
1045 $inherits(HashMapImplementation_Member$Member, HashMapImplementation); 1116 $inherits(HashMapImplementation_Member$Member, HashMapImplementation);
1046 function HashMapImplementation_Member$Member() { 1117 function HashMapImplementation_Member$Member() {
1047 this._numberOfEntries = (0); 1118 this._numberOfEntries = (0);
1048 this._numberOfDeleted = (0); 1119 this._numberOfDeleted = (0);
1049 this._loadLimit = HashMapImplementation._computeLoadLimit((8)); 1120 this._loadLimit = HashMapImplementation._computeLoadLimit((8));
1050 this._keys = new Array((8)); 1121 this._keys = new Array((8));
1051 this._values = new Array((8)); 1122 this._values = new Array((8));
1052 } 1123 }
1124 HashMapImplementation_Member$Member.prototype.is$Map = function(){return true};
1053 // ********** Code for HashMapImplementation_Type$Type ************** 1125 // ********** Code for HashMapImplementation_Type$Type **************
1054 $inherits(HashMapImplementation_Type$Type, HashMapImplementation); 1126 $inherits(HashMapImplementation_Type$Type, HashMapImplementation);
1055 function HashMapImplementation_Type$Type() { 1127 function HashMapImplementation_Type$Type() {
1056 this._numberOfEntries = (0); 1128 this._numberOfEntries = (0);
1057 this._numberOfDeleted = (0); 1129 this._numberOfDeleted = (0);
1058 this._loadLimit = HashMapImplementation._computeLoadLimit((8)); 1130 this._loadLimit = HashMapImplementation._computeLoadLimit((8));
1059 this._keys = new Array((8)); 1131 this._keys = new Array((8));
1060 this._values = new Array((8)); 1132 this._values = new Array((8));
1061 } 1133 }
1134 HashMapImplementation_Type$Type.prototype.is$Map = function(){return true};
1062 // ********** Code for HashSetImplementation ************** 1135 // ********** Code for HashSetImplementation **************
1063 function HashSetImplementation() { 1136 function HashSetImplementation() {
1064 this._backingMap = new HashMapImplementation(); 1137 this._backingMap = new HashMapImplementation();
1065 } 1138 }
1139 HashSetImplementation.prototype.is$Collection = function(){return true};
1066 HashSetImplementation.HashSetImplementation$from$factory = function(other) { 1140 HashSetImplementation.HashSetImplementation$from$factory = function(other) {
1067 var set = new HashSetImplementation(); 1141 var set = new HashSetImplementation();
1068 for (var $$i = other.iterator(); $$i.hasNext(); ) { 1142 for (var $$i = other.iterator(); $$i.hasNext(); ) {
1069 var e = $$i.next(); 1143 var e = $$i.next();
1070 set.add(e); 1144 set.add(e);
1071 } 1145 }
1072 return set; 1146 return set;
1073 } 1147 }
1074 HashSetImplementation.prototype.add = function(value) { 1148 HashSetImplementation.prototype.add = function(value) {
1075 this._backingMap.$setindex(value, value); 1149 this._backingMap.$setindex(value, value);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 } 1195 }
1122 HashSetImplementation.prototype.isEmpty = function() { 1196 HashSetImplementation.prototype.isEmpty = function() {
1123 return this._backingMap.isEmpty(); 1197 return this._backingMap.isEmpty();
1124 } 1198 }
1125 HashSetImplementation.prototype.get$length = function() { 1199 HashSetImplementation.prototype.get$length = function() {
1126 return this._backingMap.get$length(); 1200 return this._backingMap.get$length();
1127 } 1201 }
1128 HashSetImplementation.prototype.iterator = function() { 1202 HashSetImplementation.prototype.iterator = function() {
1129 return new HashSetIterator(this); 1203 return new HashSetIterator(this);
1130 } 1204 }
1205 HashSetImplementation.prototype.toString = function() {
1206 return Collections.collectionToString(this);
1207 }
1131 HashSetImplementation.prototype.contains$1 = HashSetImplementation.prototype.con tains; 1208 HashSetImplementation.prototype.contains$1 = HashSetImplementation.prototype.con tains;
1132 HashSetImplementation.prototype.remove$1 = HashSetImplementation.prototype.remov e; 1209 HashSetImplementation.prototype.remove$1 = HashSetImplementation.prototype.remov e;
1210 HashSetImplementation.prototype.toString$0 = HashSetImplementation.prototype.toS tring;
1133 // ********** Code for HashSetImplementation_dart_core_String ************** 1211 // ********** Code for HashSetImplementation_dart_core_String **************
1134 $inherits(HashSetImplementation_dart_core_String, HashSetImplementation); 1212 $inherits(HashSetImplementation_dart_core_String, HashSetImplementation);
1135 function HashSetImplementation_dart_core_String() { 1213 function HashSetImplementation_dart_core_String() {
1136 this._backingMap = new HashMapImplementation_dart_core_String$dart_core_String (); 1214 this._backingMap = new HashMapImplementation_dart_core_String$dart_core_String ();
1137 } 1215 }
1216 HashSetImplementation_dart_core_String.prototype.is$Collection = function(){retu rn true};
1138 HashSetImplementation_dart_core_String.prototype.contains$1 = HashSetImplementat ion_dart_core_String.prototype.contains; 1217 HashSetImplementation_dart_core_String.prototype.contains$1 = HashSetImplementat ion_dart_core_String.prototype.contains;
1139 // ********** Code for HashSetImplementation_Library ************** 1218 // ********** Code for HashSetImplementation_Library **************
1140 $inherits(HashSetImplementation_Library, HashSetImplementation); 1219 $inherits(HashSetImplementation_Library, HashSetImplementation);
1141 function HashSetImplementation_Library() { 1220 function HashSetImplementation_Library() {
1142 this._backingMap = new HashMapImplementation_Library$Library(); 1221 this._backingMap = new HashMapImplementation_Library$Library();
1143 } 1222 }
1144 HashSetImplementation_Library.prototype.contains$1 = HashSetImplementation_Libra ry.prototype.contains; 1223 HashSetImplementation_Library.prototype.is$Collection = function(){return true};
1145 // ********** Code for HashSetImplementation_Member ************** 1224 // ********** Code for HashSetImplementation_Member **************
1146 $inherits(HashSetImplementation_Member, HashSetImplementation); 1225 $inherits(HashSetImplementation_Member, HashSetImplementation);
1147 function HashSetImplementation_Member() { 1226 function HashSetImplementation_Member() {
1148 this._backingMap = new HashMapImplementation_Member$Member(); 1227 this._backingMap = new HashMapImplementation_Member$Member();
1149 } 1228 }
1229 HashSetImplementation_Member.prototype.is$Collection = function(){return true};
1150 // ********** Code for HashSetImplementation_Type ************** 1230 // ********** Code for HashSetImplementation_Type **************
1151 $inherits(HashSetImplementation_Type, HashSetImplementation); 1231 $inherits(HashSetImplementation_Type, HashSetImplementation);
1152 function HashSetImplementation_Type() { 1232 function HashSetImplementation_Type() {
1153 this._backingMap = new HashMapImplementation_Type$Type(); 1233 this._backingMap = new HashMapImplementation_Type$Type();
1154 } 1234 }
1235 HashSetImplementation_Type.prototype.is$Collection = function(){return true};
1155 HashSetImplementation_Type.prototype.contains$1 = HashSetImplementation_Type.pro totype.contains; 1236 HashSetImplementation_Type.prototype.contains$1 = HashSetImplementation_Type.pro totype.contains;
1156 // ********** Code for HashSetIterator ************** 1237 // ********** Code for HashSetIterator **************
1157 function HashSetIterator(set_) { 1238 function HashSetIterator(set_) {
1158 this._entries = set_._backingMap._keys; 1239 this._entries = set_._backingMap._keys;
1159 this._nextValidIndex = (-1); 1240 this._nextValidIndex = (-1);
1160 this._advance(); 1241 this._advance();
1161 } 1242 }
1162 HashSetIterator.prototype.hasNext = function() { 1243 HashSetIterator.prototype.hasNext = function() {
1163 var $0; 1244 var $0;
1164 if (this._nextValidIndex >= this._entries.get$length()) return false; 1245 if (this._nextValidIndex >= this._entries.get$length()) return false;
(...skipping 29 matching lines...) Expand all
1194 this.value = value; 1275 this.value = value;
1195 this.key = key; 1276 this.key = key;
1196 } 1277 }
1197 KeyValuePair.prototype.get$value = function() { return this.value; }; 1278 KeyValuePair.prototype.get$value = function() { return this.value; };
1198 KeyValuePair.prototype.set$value = function(value) { return this.value = value; }; 1279 KeyValuePair.prototype.set$value = function(value) { return this.value = value; };
1199 // ********** Code for LinkedHashMapImplementation ************** 1280 // ********** Code for LinkedHashMapImplementation **************
1200 function LinkedHashMapImplementation() { 1281 function LinkedHashMapImplementation() {
1201 this._map = new HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValueP air(); 1282 this._map = new HashMapImplementation_Dynamic$DoubleLinkedQueueEntry_KeyValueP air();
1202 this._list = new DoubleLinkedQueue_KeyValuePair(); 1283 this._list = new DoubleLinkedQueue_KeyValuePair();
1203 } 1284 }
1285 LinkedHashMapImplementation.prototype.is$Map = function(){return true};
1204 LinkedHashMapImplementation.prototype.$setindex = function(key, value) { 1286 LinkedHashMapImplementation.prototype.$setindex = function(key, value) {
1205 if (this._map.containsKey(key)) { 1287 if (this._map.containsKey(key)) {
1206 this._map.$index(key).get$element().set$value(value); 1288 this._map.$index(key).get$element().set$value(value);
1207 } 1289 }
1208 else { 1290 else {
1209 this._list.addLast(new KeyValuePair(key, value)); 1291 this._list.addLast(new KeyValuePair(key, value));
1210 this._map.$setindex(key, this._list.lastEntry()); 1292 this._map.$setindex(key, this._list.lastEntry());
1211 } 1293 }
1212 } 1294 }
1213 LinkedHashMapImplementation.prototype.$index = function(key) { 1295 LinkedHashMapImplementation.prototype.$index = function(key) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 } 1337 }
1256 LinkedHashMapImplementation.prototype.containsKey = function(key) { 1338 LinkedHashMapImplementation.prototype.containsKey = function(key) {
1257 return this._map.containsKey(key); 1339 return this._map.containsKey(key);
1258 } 1340 }
1259 LinkedHashMapImplementation.prototype.get$length = function() { 1341 LinkedHashMapImplementation.prototype.get$length = function() {
1260 return this._map.get$length(); 1342 return this._map.get$length();
1261 } 1343 }
1262 LinkedHashMapImplementation.prototype.isEmpty = function() { 1344 LinkedHashMapImplementation.prototype.isEmpty = function() {
1263 return this.get$length() == (0); 1345 return this.get$length() == (0);
1264 } 1346 }
1347 LinkedHashMapImplementation.prototype.toString = function() {
1348 return Maps.mapToString(this);
1349 }
1265 LinkedHashMapImplementation.prototype.remove$1 = LinkedHashMapImplementation.pro totype.remove; 1350 LinkedHashMapImplementation.prototype.remove$1 = LinkedHashMapImplementation.pro totype.remove;
1351 LinkedHashMapImplementation.prototype.toString$0 = LinkedHashMapImplementation.p rototype.toString;
1352 // ********** Code for Maps **************
1353 function Maps() {}
1354 Maps.mapToString = function(m) {
1355 var result = new StringBufferImpl("");
1356 Maps._emitMap(m, result, new Array());
1357 return result.toString$0();
1358 }
1359 Maps._emitMap = function(m, result, visiting) {
1360 visiting.add(m);
1361 result.add("{");
1362 var first = true;
1363 m.forEach((function (k, v) {
1364 if (!first) {
1365 result.add(", ");
1366 }
1367 first = false;
1368 Collections._emitObject(k, result, visiting);
1369 result.add(": ");
1370 Collections._emitObject(v, result, visiting);
1371 })
1372 );
1373 result.add("}");
1374 visiting.removeLast();
1375 }
1266 // ********** Code for DoubleLinkedQueueEntry ************** 1376 // ********** Code for DoubleLinkedQueueEntry **************
1267 function DoubleLinkedQueueEntry(e) { 1377 function DoubleLinkedQueueEntry(e) {
1268 this._element = e; 1378 this._element = e;
1269 } 1379 }
1270 DoubleLinkedQueueEntry.prototype._link = function(p, n) { 1380 DoubleLinkedQueueEntry.prototype._link = function(p, n) {
1271 this._next = n; 1381 this._next = n;
1272 this._previous = p; 1382 this._previous = p;
1273 p._next = this; 1383 p._next = this;
1274 n._previous = this; 1384 n._previous = this;
1275 } 1385 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 // ********** Code for _DoubleLinkedQueueEntrySentinel_KeyValuePair ************ ** 1425 // ********** Code for _DoubleLinkedQueueEntrySentinel_KeyValuePair ************ **
1316 $inherits(_DoubleLinkedQueueEntrySentinel_KeyValuePair, _DoubleLinkedQueueEntryS entinel); 1426 $inherits(_DoubleLinkedQueueEntrySentinel_KeyValuePair, _DoubleLinkedQueueEntryS entinel);
1317 function _DoubleLinkedQueueEntrySentinel_KeyValuePair() { 1427 function _DoubleLinkedQueueEntrySentinel_KeyValuePair() {
1318 DoubleLinkedQueueEntry_KeyValuePair.call(this, null); 1428 DoubleLinkedQueueEntry_KeyValuePair.call(this, null);
1319 this._link(this, this); 1429 this._link(this, this);
1320 } 1430 }
1321 // ********** Code for DoubleLinkedQueue ************** 1431 // ********** Code for DoubleLinkedQueue **************
1322 function DoubleLinkedQueue() { 1432 function DoubleLinkedQueue() {
1323 this._sentinel = new _DoubleLinkedQueueEntrySentinel(); 1433 this._sentinel = new _DoubleLinkedQueueEntrySentinel();
1324 } 1434 }
1435 DoubleLinkedQueue.prototype.is$Collection = function(){return true};
1325 DoubleLinkedQueue.DoubleLinkedQueue$from$factory = function(other) { 1436 DoubleLinkedQueue.DoubleLinkedQueue$from$factory = function(other) {
1326 var list = new DoubleLinkedQueue(); 1437 var list = new DoubleLinkedQueue();
1327 for (var $$i = other.iterator(); $$i.hasNext(); ) { 1438 for (var $$i = other.iterator(); $$i.hasNext(); ) {
1328 var e = $$i.next(); 1439 var e = $$i.next();
1329 list.addLast(e); 1440 list.addLast(e);
1330 } 1441 }
1331 return list; 1442 return list;
1332 } 1443 }
1333 DoubleLinkedQueue.prototype.addLast = function(value) { 1444 DoubleLinkedQueue.prototype.addLast = function(value) {
1334 this._sentinel.prepend(value); 1445 this._sentinel.prepend(value);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 while ((null == entry ? null != (this._sentinel) : entry !== this._sentinel)) { 1519 while ((null == entry ? null != (this._sentinel) : entry !== this._sentinel)) {
1409 var nextEntry = entry._next; 1520 var nextEntry = entry._next;
1410 if (f(entry._element)) other.addLast(entry._element); 1521 if (f(entry._element)) other.addLast(entry._element);
1411 entry = nextEntry; 1522 entry = nextEntry;
1412 } 1523 }
1413 return other; 1524 return other;
1414 } 1525 }
1415 DoubleLinkedQueue.prototype.iterator = function() { 1526 DoubleLinkedQueue.prototype.iterator = function() {
1416 return new _DoubleLinkedQueueIterator(this._sentinel); 1527 return new _DoubleLinkedQueueIterator(this._sentinel);
1417 } 1528 }
1529 DoubleLinkedQueue.prototype.toString = function() {
1530 return Collections.collectionToString(this);
1531 }
1532 DoubleLinkedQueue.prototype.toString$0 = DoubleLinkedQueue.prototype.toString;
1418 // ********** Code for DoubleLinkedQueue_KeyValuePair ************** 1533 // ********** Code for DoubleLinkedQueue_KeyValuePair **************
1419 $inherits(DoubleLinkedQueue_KeyValuePair, DoubleLinkedQueue); 1534 $inherits(DoubleLinkedQueue_KeyValuePair, DoubleLinkedQueue);
1420 function DoubleLinkedQueue_KeyValuePair() { 1535 function DoubleLinkedQueue_KeyValuePair() {
1421 this._sentinel = new _DoubleLinkedQueueEntrySentinel_KeyValuePair(); 1536 this._sentinel = new _DoubleLinkedQueueEntrySentinel_KeyValuePair();
1422 } 1537 }
1538 DoubleLinkedQueue_KeyValuePair.prototype.is$Collection = function(){return true} ;
1423 // ********** Code for _DoubleLinkedQueueIterator ************** 1539 // ********** Code for _DoubleLinkedQueueIterator **************
1424 function _DoubleLinkedQueueIterator(_sentinel) { 1540 function _DoubleLinkedQueueIterator(_sentinel) {
1425 this._sentinel = _sentinel; 1541 this._sentinel = _sentinel;
1426 this._currentEntry = this._sentinel; 1542 this._currentEntry = this._sentinel;
1427 } 1543 }
1428 _DoubleLinkedQueueIterator.prototype.hasNext = function() { 1544 _DoubleLinkedQueueIterator.prototype.hasNext = function() {
1429 var $0; 1545 var $0;
1430 return (($0 = this._currentEntry._next) == null ? null != (this._sentinel) : $ 0 !== this._sentinel); 1546 return (($0 = this._currentEntry._next) == null ? null != (this._sentinel) : $ 0 !== this._sentinel);
1431 } 1547 }
1432 _DoubleLinkedQueueIterator.prototype.next = function() { 1548 _DoubleLinkedQueueIterator.prototype.next = function() {
(...skipping 10 matching lines...) Expand all
1443 } 1559 }
1444 StopwatchImplementation.prototype.start = function() { 1560 StopwatchImplementation.prototype.start = function() {
1445 if (null == this._start) { 1561 if (null == this._start) {
1446 this._start = Clock.now(); 1562 this._start = Clock.now();
1447 } 1563 }
1448 else { 1564 else {
1449 if (null == this._stop) { 1565 if (null == this._stop) {
1450 return; 1566 return;
1451 } 1567 }
1452 this._start = Clock.now() - (this._stop - this._start); 1568 this._start = Clock.now() - (this._stop - this._start);
1569 this._stop = null;
1453 } 1570 }
1454 } 1571 }
1455 StopwatchImplementation.prototype.get$start = function() { 1572 StopwatchImplementation.prototype.get$start = function() {
1456 return this.start.bind(this); 1573 return this.start.bind(this);
1457 } 1574 }
1458 StopwatchImplementation.prototype.stop = function() { 1575 StopwatchImplementation.prototype.stop = function() {
1459 if (null == this._start) { 1576 if (null == this._start || null != this._stop) {
1460 return; 1577 return;
1461 } 1578 }
1462 this._stop = Clock.now(); 1579 this._stop = Clock.now();
1463 } 1580 }
1464 StopwatchImplementation.prototype.elapsed = function() { 1581 StopwatchImplementation.prototype.elapsed = function() {
1465 if (null == this._start) { 1582 if (null == this._start) {
1466 return (0); 1583 return (0);
1467 } 1584 }
1468 return (null == this._stop) ? (Clock.now() - this._start) : (this._stop - this ._start); 1585 return (null == this._stop) ? (Clock.now() - this._start) : (this._stop - this ._start);
1469 } 1586 }
(...skipping 10788 matching lines...) Expand 10 before | Expand all | Expand 10 after
12258 function _SharedBackingMap_dart_core_String$VariableValue() { 12375 function _SharedBackingMap_dart_core_String$VariableValue() {
12259 this.shared = (0); 12376 this.shared = (0);
12260 HashMapImplementation_dart_core_String$VariableValue.call(this); 12377 HashMapImplementation_dart_core_String$VariableValue.call(this);
12261 } 12378 }
12262 // ********** Code for CopyOnWriteMap ************** 12379 // ********** Code for CopyOnWriteMap **************
12263 CopyOnWriteMap._wrap$ctor = function(_map) { 12380 CopyOnWriteMap._wrap$ctor = function(_map) {
12264 this._lang_map = _map; 12381 this._lang_map = _map;
12265 } 12382 }
12266 CopyOnWriteMap._wrap$ctor.prototype = CopyOnWriteMap.prototype; 12383 CopyOnWriteMap._wrap$ctor.prototype = CopyOnWriteMap.prototype;
12267 function CopyOnWriteMap() {} 12384 function CopyOnWriteMap() {}
12385 CopyOnWriteMap.prototype.is$Map = function(){return true};
12268 CopyOnWriteMap.prototype.clone = function() { 12386 CopyOnWriteMap.prototype.clone = function() {
12269 var $0; 12387 var $0;
12270 ($0 = this._lang_map).shared = $0.shared + (1); 12388 ($0 = this._lang_map).shared = $0.shared + (1);
12271 return new CopyOnWriteMap._wrap$ctor(this._lang_map); 12389 return new CopyOnWriteMap._wrap$ctor(this._lang_map);
12272 } 12390 }
12273 CopyOnWriteMap.prototype._ensureWritable = function() { 12391 CopyOnWriteMap.prototype._ensureWritable = function() {
12274 var $0; 12392 var $0;
12275 if (this._lang_map.shared > (0)) { 12393 if (this._lang_map.shared > (0)) {
12276 ($0 = this._lang_map).shared = $0.shared - (1); 12394 ($0 = this._lang_map).shared = $0.shared - (1);
12277 this._lang_map = _SharedBackingMap._SharedBackingMap$from$factory(this._lang _map); 12395 this._lang_map = _SharedBackingMap._SharedBackingMap$from$factory(this._lang _map);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
12309 } 12427 }
12310 CopyOnWriteMap.prototype.containsKey = function(key) { 12428 CopyOnWriteMap.prototype.containsKey = function(key) {
12311 return this._lang_map.containsKey(key); 12429 return this._lang_map.containsKey(key);
12312 } 12430 }
12313 CopyOnWriteMap.prototype.remove$1 = CopyOnWriteMap.prototype.remove; 12431 CopyOnWriteMap.prototype.remove$1 = CopyOnWriteMap.prototype.remove;
12314 // ********** Code for CopyOnWriteMap_dart_core_String$VariableValue *********** *** 12432 // ********** Code for CopyOnWriteMap_dart_core_String$VariableValue *********** ***
12315 $inherits(CopyOnWriteMap_dart_core_String$VariableValue, CopyOnWriteMap); 12433 $inherits(CopyOnWriteMap_dart_core_String$VariableValue, CopyOnWriteMap);
12316 function CopyOnWriteMap_dart_core_String$VariableValue() { 12434 function CopyOnWriteMap_dart_core_String$VariableValue() {
12317 this._lang_map = new _SharedBackingMap_dart_core_String$VariableValue(); 12435 this._lang_map = new _SharedBackingMap_dart_core_String$VariableValue();
12318 } 12436 }
12437 CopyOnWriteMap_dart_core_String$VariableValue.prototype.is$Map = function(){retu rn true};
12319 CopyOnWriteMap_dart_core_String$VariableValue.prototype.remove$1 = CopyOnWriteMa p_dart_core_String$VariableValue.prototype.remove; 12438 CopyOnWriteMap_dart_core_String$VariableValue.prototype.remove$1 = CopyOnWriteMa p_dart_core_String$VariableValue.prototype.remove;
12320 // ********** Code for Value ************** 12439 // ********** Code for Value **************
12321 function Value(type, code, span) { 12440 function Value(type, code, span) {
12322 this.type = type; 12441 this.type = type;
12323 this.span = span; 12442 this.span = span;
12324 this.code = code; 12443 this.code = code;
12325 if (this.get$type() == null) $globals.world.internalError("type passed as null ", this.span); 12444 if (this.get$type() == null) $globals.world.internalError("type passed as null ", this.span);
12326 } 12445 }
12327 Value.prototype.get$type = function() { return this.type; }; 12446 Value.prototype.get$type = function() { return this.type; };
12328 Value.prototype.get$code = function() { return this.code; }; 12447 Value.prototype.get$code = function() { return this.code; };
(...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after
14683 } 14802 }
14684 var const$0000 = Object.create(_DeletedKeySentinel.prototype, {}); 14803 var const$0000 = Object.create(_DeletedKeySentinel.prototype, {});
14685 var const$0001 = Object.create(NoMoreElementsException.prototype, {}); 14804 var const$0001 = Object.create(NoMoreElementsException.prototype, {});
14686 var const$0002 = Object.create(EmptyQueueException.prototype, {}); 14805 var const$0002 = Object.create(EmptyQueueException.prototype, {});
14687 var const$0006 = Object.create(IllegalAccessException.prototype, {}); 14806 var const$0006 = Object.create(IllegalAccessException.prototype, {});
14688 var const$0007 = ImmutableList.ImmutableList$from$factory([]); 14807 var const$0007 = ImmutableList.ImmutableList$from$factory([]);
14689 var const$0009 = new JSSyntaxRegExp("^[a-zA-Z]:/"); 14808 var const$0009 = new JSSyntaxRegExp("^[a-zA-Z]:/");
14690 var $globals = {}; 14809 var $globals = {};
14691 $static_init(); 14810 $static_init();
14692 main(); 14811 main();
OLDNEW
« no previous file with comments | « dart/corelib/src/implementation/stopwatch_implementation.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698