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

Side by Side Diff: test/codegen/expect/dart/_interceptors.js

Issue 977153002: Fix increment on nullable (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Remove assignments Created 5 years, 9 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 | « test/codegen/expect/DeltaBlue.js ('k') | test/codegen/expect/dart/_internal.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 _interceptors; 1 var _interceptors;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 // Function _symbolToString: (Symbol) → String 4 // Function _symbolToString: (Symbol) → String
5 function _symbolToString(symbol) { 5 function _symbolToString(symbol) {
6 return _internal.Symbol.getName(dart.as(symbol, _internal.Symbol)); 6 return _internal.Symbol.getName(dart.as(symbol, _internal.Symbol));
7 } 7 }
8 // Function _symbolMapToStringMap: (Map<Symbol, dynamic>) → dynamic 8 // Function _symbolMapToStringMap: (Map<Symbol, dynamic>) → dynamic
9 function _symbolMapToStringMap(map) { 9 function _symbolMapToStringMap(map) {
10 if (map === null) 10 if (map === null)
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 _internal.IterableMixinWorkaround.setAllList(this, index, iterable); 282 _internal.IterableMixinWorkaround.setAllList(this, index, iterable);
283 } 283 }
284 removeLast() { 284 removeLast() {
285 this.checkGrowable('removeLast'); 285 this.checkGrowable('removeLast');
286 if (this.length === 0) 286 if (this.length === 0)
287 throw new core.RangeError.value(-1); 287 throw new core.RangeError.value(-1);
288 return dart.as(this.pop(), E); 288 return dart.as(this.pop(), E);
289 } 289 }
290 remove(element) { 290 remove(element) {
291 this.checkGrowable('remove'); 291 this.checkGrowable('remove');
292 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); dart.notNul l(i)++) { 292 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
293 if (dart.equals(this.get(i), element)) { 293 if (dart.equals(this.get(i), element)) {
294 this.splice(i, 1); 294 this.splice(i, 1);
295 return true; 295 return true;
296 } 296 }
297 } 297 }
298 return false; 298 return false;
299 } 299 }
300 removeWhere(test) { 300 removeWhere(test) {
301 _internal.IterableMixinWorkaround.removeWhereList(this, dart.as(test, da rt.throw_("Unimplemented type (dynamic) → bool"))); 301 _internal.IterableMixinWorkaround.removeWhereList(this, dart.as(test, da rt.throw_("Unimplemented type (dynamic) → bool")));
302 } 302 }
303 retainWhere(test) { 303 retainWhere(test) {
304 _internal.IterableMixinWorkaround.removeWhereList(this, dart.as((element ) => !dart.notNull(test(element)), dart.throw_("Unimplemented type (dynamic) → b ool"))); 304 _internal.IterableMixinWorkaround.removeWhereList(this, dart.as((element ) => !dart.notNull(test(element)), dart.throw_("Unimplemented type (dynamic) → b ool")));
305 } 305 }
306 where(f) { 306 where(f) {
307 return new _internal.IterableMixinWorkaround().where(this, dart.as(f, da rt.throw_("Unimplemented type (dynamic) → bool"))); 307 return new _internal.IterableMixinWorkaround().where(this, dart.as(f, da rt.throw_("Unimplemented type (dynamic) → bool")));
308 } 308 }
309 expand(f) { 309 expand(f) {
310 return _internal.IterableMixinWorkaround.expand(this, dart.as(f, dart.th row_("Unimplemented type (dynamic) → Iterable<dynamic>"))); 310 return _internal.IterableMixinWorkaround.expand(this, dart.as(f, dart.th row_("Unimplemented type (dynamic) → Iterable<dynamic>")));
311 } 311 }
312 addAll(collection) { 312 addAll(collection) {
313 for (let e of collection) { 313 for (let e of collection) {
314 this.add(e); 314 this.add(e);
315 } 315 }
316 } 316 }
317 clear() { 317 clear() {
318 this.length = 0; 318 this.length = 0;
319 } 319 }
320 forEach(f) { 320 forEach(f) {
321 let length = this.length; 321 let length = this.length;
322 for (let i = 0; dart.notNull(i) < dart.notNull(length); dart.notNull(i)+ +) { 322 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
323 f(dart.as(this[i], E)); 323 f(dart.as(this[i], E));
324 if (length !== this.length) { 324 if (length !== this.length) {
325 throw new core.ConcurrentModificationError(this); 325 throw new core.ConcurrentModificationError(this);
326 } 326 }
327 } 327 }
328 } 328 }
329 map(f) { 329 map(f) {
330 return _internal.IterableMixinWorkaround.mapList(this, dart.as(f, dart.t hrow_("Unimplemented type (dynamic) → dynamic"))); 330 return _internal.IterableMixinWorkaround.mapList(this, dart.as(f, dart.t hrow_("Unimplemented type (dynamic) → dynamic")));
331 } 331 }
332 join(separator) { 332 join(separator) {
333 if (separator === void 0) 333 if (separator === void 0)
334 separator = ""; 334 separator = "";
335 let list = new core.List(this.length); 335 let list = new core.List(this.length);
336 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); dart.notNul l(i)++) { 336 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
337 list.set(i, `${this.get(i)}`); 337 list.set(i, `${this.get(i)}`);
338 } 338 }
339 return list.join(separator); 339 return list.join(separator);
340 } 340 }
341 take(n) { 341 take(n) {
342 return new _internal.IterableMixinWorkaround().takeList(this, n); 342 return new _internal.IterableMixinWorkaround().takeList(this, n);
343 } 343 }
344 takeWhile(test) { 344 takeWhile(test) {
345 return new _internal.IterableMixinWorkaround().takeWhile(this, dart.as(t est, dart.throw_("Unimplemented type (dynamic) → bool"))); 345 return new _internal.IterableMixinWorkaround().takeWhile(this, dart.as(t est, dart.throw_("Unimplemented type (dynamic) → bool")));
346 } 346 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 if (start === void 0) 464 if (start === void 0)
465 start = 0; 465 start = 0;
466 return _internal.IterableMixinWorkaround.indexOfList(this, element, star t); 466 return _internal.IterableMixinWorkaround.indexOfList(this, element, star t);
467 } 467 }
468 lastIndexOf(element, start) { 468 lastIndexOf(element, start) {
469 if (start === void 0) 469 if (start === void 0)
470 start = null; 470 start = null;
471 return _internal.IterableMixinWorkaround.lastIndexOfList(this, element, start); 471 return _internal.IterableMixinWorkaround.lastIndexOfList(this, element, start);
472 } 472 }
473 contains(other) { 473 contains(other) {
474 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); dart.notNul l(i)++) { 474 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
475 if (dart.equals(this.get(i), other)) 475 if (dart.equals(this.get(i), other))
476 return true; 476 return true;
477 } 477 }
478 return false; 478 return false;
479 } 479 }
480 get isEmpty() { 480 get isEmpty() {
481 return this.length === 0; 481 return this.length === 0;
482 } 482 }
483 get isNotEmpty() { 483 get isNotEmpty() {
484 return !dart.notNull(this.isEmpty); 484 return !dart.notNull(this.isEmpty);
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 return _js_helper.allMatchesInStringUnchecked(this, string, start); 979 return _js_helper.allMatchesInStringUnchecked(this, string, start);
980 } 980 }
981 matchAsPrefix(string, start) { 981 matchAsPrefix(string, start) {
982 if (start === void 0) 982 if (start === void 0)
983 start = 0; 983 start = 0;
984 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(string.l ength)) { 984 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(string.l ength)) {
985 throw new core.RangeError.range(start, 0, string.length); 985 throw new core.RangeError.range(start, 0, string.length);
986 } 986 }
987 if (dart.notNull(start) + dart.notNull(this.length) > dart.notNull(string. length)) 987 if (dart.notNull(start) + dart.notNull(this.length) > dart.notNull(string. length))
988 return null; 988 return null;
989 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); dart.notNull( i)++) { 989 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.notN ull(i) + 1) {
990 if (string.codeUnitAt(dart.notNull(start) + dart.notNull(i)) !== this.co deUnitAt(i)) { 990 if (string.codeUnitAt(dart.notNull(start) + dart.notNull(i)) !== this.co deUnitAt(i)) {
991 return null; 991 return null;
992 } 992 }
993 } 993 }
994 return new _js_helper.StringMatch(start, string, this); 994 return new _js_helper.StringMatch(start, string, this);
995 } 995 }
996 ['+'](other) { 996 ['+'](other) {
997 if (!(typeof other == string)) 997 if (!(typeof other == string))
998 throw new core.ArgumentError(other); 998 throw new core.ArgumentError(other);
999 return this + other; 999 return this + other;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 } 1138 }
1139 } 1139 }
1140 static [_skipLeadingWhitespace](string, index) { 1140 static [_skipLeadingWhitespace](string, index) {
1141 let SPACE = 32; 1141 let SPACE = 32;
1142 let CARRIAGE_RETURN = 13; 1142 let CARRIAGE_RETURN = 13;
1143 while (dart.notNull(index) < dart.notNull(string.length)) { 1143 while (dart.notNull(index) < dart.notNull(string.length)) {
1144 let codeUnit = string.codeUnitAt(index); 1144 let codeUnit = string.codeUnitAt(index);
1145 if (codeUnit !== SPACE && codeUnit !== CARRIAGE_RETURN && !dart.notNull( _isWhitespace(codeUnit))) { 1145 if (codeUnit !== SPACE && codeUnit !== CARRIAGE_RETURN && !dart.notNull( _isWhitespace(codeUnit))) {
1146 break; 1146 break;
1147 } 1147 }
1148 dart.notNull(index)++; 1148 index = dart.notNull(index) + 1;
1149 } 1149 }
1150 return index; 1150 return index;
1151 } 1151 }
1152 static [_skipTrailingWhitespace](string, index) { 1152 static [_skipTrailingWhitespace](string, index) {
1153 let SPACE = 32; 1153 let SPACE = 32;
1154 let CARRIAGE_RETURN = 13; 1154 let CARRIAGE_RETURN = 13;
1155 while (dart.notNull(index) > 0) { 1155 while (dart.notNull(index) > 0) {
1156 let codeUnit = string.codeUnitAt(dart.notNull(index) - 1); 1156 let codeUnit = string.codeUnitAt(dart.notNull(index) - 1);
1157 if (codeUnit !== SPACE && codeUnit !== CARRIAGE_RETURN && !dart.notNull( _isWhitespace(codeUnit))) { 1157 if (codeUnit !== SPACE && codeUnit !== CARRIAGE_RETURN && !dart.notNull( _isWhitespace(codeUnit))) {
1158 break; 1158 break;
1159 } 1159 }
1160 dart.notNull(index)--; 1160 index = dart.notNull(index) - 1;
1161 } 1161 }
1162 return index; 1162 return index;
1163 } 1163 }
1164 trim() { 1164 trim() {
1165 let NEL = 133; 1165 let NEL = 133;
1166 let result = this.trim(); 1166 let result = this.trim();
1167 if (result.length === 0) 1167 if (result.length === 0)
1168 return result; 1168 return result;
1169 let firstCode = result.codeUnitAt(0); 1169 let firstCode = result.codeUnitAt(0);
1170 let startIndex = 0; 1170 let startIndex = 0;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 throw new core.RangeError.range(start, 0, this.length); 1279 throw new core.RangeError.range(start, 0, this.length);
1280 } 1280 }
1281 if (typeof pattern == string) { 1281 if (typeof pattern == string) {
1282 return this.indexOf(pattern, start); 1282 return this.indexOf(pattern, start);
1283 } 1283 }
1284 if (dart.is(pattern, _js_helper.JSSyntaxRegExp)) { 1284 if (dart.is(pattern, _js_helper.JSSyntaxRegExp)) {
1285 let re = pattern; 1285 let re = pattern;
1286 let match = _js_helper.firstMatchAfter(re, this, start); 1286 let match = _js_helper.firstMatchAfter(re, this, start);
1287 return match === null ? -1 : match.start; 1287 return match === null ? -1 : match.start;
1288 } 1288 }
1289 for (let i = start; dart.notNull(i) <= dart.notNull(this.length); dart.not Null(i)++) { 1289 for (let i = start; dart.notNull(i) <= dart.notNull(this.length); i = dart .notNull(i) + 1) {
1290 if (pattern.matchAsPrefix(this, i) !== null) 1290 if (pattern.matchAsPrefix(this, i) !== null)
1291 return i; 1291 return i;
1292 } 1292 }
1293 return -1; 1293 return -1;
1294 } 1294 }
1295 lastIndexOf(pattern, start) { 1295 lastIndexOf(pattern, start) {
1296 if (start === void 0) 1296 if (start === void 0)
1297 start = null; 1297 start = null;
1298 _js_helper.checkNull(pattern); 1298 _js_helper.checkNull(pattern);
1299 if (start === null) { 1299 if (start === null) {
1300 start = this.length; 1300 start = this.length;
1301 } else if (!(typeof start == number)) { 1301 } else if (!(typeof start == number)) {
1302 throw new core.ArgumentError(start); 1302 throw new core.ArgumentError(start);
1303 } else if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(t his.length)) { 1303 } else if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(t his.length)) {
1304 throw new core.RangeError.range(start, 0, this.length); 1304 throw new core.RangeError.range(start, 0, this.length);
1305 } 1305 }
1306 if (typeof pattern == string) { 1306 if (typeof pattern == string) {
1307 let other = pattern; 1307 let other = pattern;
1308 if (dart.notNull(start) + dart.notNull(other.length) > dart.notNull(this .length)) { 1308 if (dart.notNull(start) + dart.notNull(other.length) > dart.notNull(this .length)) {
1309 start = dart.notNull(this.length) - dart.notNull(other.length); 1309 start = dart.notNull(this.length) - dart.notNull(other.length);
1310 } 1310 }
1311 return dart.as(_js_helper.stringLastIndexOfUnchecked(this, other, start) , core.int); 1311 return dart.as(_js_helper.stringLastIndexOfUnchecked(this, other, start) , core.int);
1312 } 1312 }
1313 for (let i = start; dart.notNull(i) >= 0; dart.notNull(i)--) { 1313 for (let i = start; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) {
1314 if (pattern.matchAsPrefix(this, i) !== null) 1314 if (pattern.matchAsPrefix(this, i) !== null)
1315 return i; 1315 return i;
1316 } 1316 }
1317 return -1; 1317 return -1;
1318 } 1318 }
1319 contains(other, startIndex) { 1319 contains(other, startIndex) {
1320 if (startIndex === void 0) 1320 if (startIndex === void 0)
1321 startIndex = 0; 1321 startIndex = 0;
1322 _js_helper.checkNull(other); 1322 _js_helper.checkNull(other);
1323 if (dart.notNull(startIndex) < 0 || dart.notNull(startIndex) > dart.notNul l(this.length)) { 1323 if (dart.notNull(startIndex) < 0 || dart.notNull(startIndex) > dart.notNul l(this.length)) {
(...skipping 10 matching lines...) Expand all
1334 compareTo(other) { 1334 compareTo(other) {
1335 if (!(typeof other == string)) 1335 if (!(typeof other == string))
1336 throw new core.ArgumentError(other); 1336 throw new core.ArgumentError(other);
1337 return dart.equals(this, other) ? 0 : this < other ? -1 : 1; 1337 return dart.equals(this, other) ? 0 : this < other ? -1 : 1;
1338 } 1338 }
1339 toString() { 1339 toString() {
1340 return this; 1340 return this;
1341 } 1341 }
1342 get hashCode() { 1342 get hashCode() {
1343 let hash = 0; 1343 let hash = 0;
1344 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); dart.notNull( i)++) { 1344 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.notN ull(i) + 1) {
1345 hash = 536870911 & dart.notNull(hash) + this.charCodeAt(i); 1345 hash = 536870911 & dart.notNull(hash) + this.charCodeAt(i);
1346 hash = 536870911 & dart.notNull(hash) + ((524287 & dart.notNull(hash)) < < 10); 1346 hash = 536870911 & dart.notNull(hash) + ((524287 & dart.notNull(hash)) < < 10);
1347 hash = hash ^ hash >> 6; 1347 hash = hash ^ hash >> 6;
1348 } 1348 }
1349 hash = 536870911 & dart.notNull(hash) + ((67108863 & dart.notNull(hash)) < < 3); 1349 hash = 536870911 & dart.notNull(hash) + ((67108863 & dart.notNull(hash)) < < 3);
1350 hash = hash ^ hash >> 11; 1350 hash = hash ^ hash >> 11;
1351 return 536870911 & dart.notNull(hash) + ((16383 & dart.notNull(hash)) << 1 5); 1351 return 536870911 & dart.notNull(hash) + ((16383 & dart.notNull(hash)) << 1 5);
1352 } 1352 }
1353 get runtimeType() { 1353 get runtimeType() {
1354 return core.String; 1354 return core.String;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 exports.JSExtendableArray = JSExtendableArray; 1410 exports.JSExtendableArray = JSExtendableArray;
1411 exports.JSExtendableArray$ = JSExtendableArray$; 1411 exports.JSExtendableArray$ = JSExtendableArray$;
1412 exports.JSNumber = JSNumber; 1412 exports.JSNumber = JSNumber;
1413 exports.JSInt = JSInt; 1413 exports.JSInt = JSInt;
1414 exports.JSDouble = JSDouble; 1414 exports.JSDouble = JSDouble;
1415 exports.JSPositiveInt = JSPositiveInt; 1415 exports.JSPositiveInt = JSPositiveInt;
1416 exports.JSUInt32 = JSUInt32; 1416 exports.JSUInt32 = JSUInt32;
1417 exports.JSUInt31 = JSUInt31; 1417 exports.JSUInt31 = JSUInt31;
1418 exports.JSString = JSString; 1418 exports.JSString = JSString;
1419 })(_interceptors || (_interceptors = {})); 1419 })(_interceptors || (_interceptors = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/DeltaBlue.js ('k') | test/codegen/expect/dart/_internal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698