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

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

Issue 1122313002: Typing fixes to eliminate casts/dcalls (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 7 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/convert.js ('k') | lib/src/checker/rules.dart » ('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 core; 1 var core;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class Object { 4 class Object {
5 constructor() { 5 constructor() {
6 let name = this.constructor.name; 6 let name = this.constructor.name;
7 let init = this[name]; 7 let init = this[name];
8 let result = void 0; 8 let result = void 0;
9 if (init) 9 if (init)
10 result = init.apply(this, arguments); 10 result = init.apply(this, arguments);
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 dart.setType(list, List$(E)); 1277 dart.setType(list, List$(E));
1278 return dart.as(list, List$(E)); 1278 return dart.as(list, List$(E));
1279 } 1279 }
1280 filled(length, fill) { 1280 filled(length, fill) {
1281 let result = new (List$(E))(length); 1281 let result = new (List$(E))(length);
1282 if (length != 0 && dart.notNull(fill != null)) { 1282 if (length != 0 && dart.notNull(fill != null)) {
1283 for (let i = 0; dart.notNull(i) < dart.notNull(result[$length]); i = d art.notNull(i) + 1) { 1283 for (let i = 0; dart.notNull(i) < dart.notNull(result[$length]); i = d art.notNull(i) + 1) {
1284 result[$set](i, fill); 1284 result[$set](i, fill);
1285 } 1285 }
1286 } 1286 }
1287 return dart.as(result, List$(E)); 1287 return result;
1288 } 1288 }
1289 from(elements, opts) { 1289 from(elements, opts) {
1290 let growable = opts && 'growable' in opts ? opts.growable : true; 1290 let growable = opts && 'growable' in opts ? opts.growable : true;
1291 let list = new (List$(E))(); 1291 let list = new (List$(E))();
1292 for (let e of dart.as(elements, Iterable$(E))) { 1292 for (let e of dart.as(elements, Iterable$(E))) {
1293 list[$add](e); 1293 list[$add](e);
1294 } 1294 }
1295 if (growable) 1295 if (growable)
1296 return list; 1296 return list;
1297 return dart.as(_internal.makeListFixedLength(list), List$(E)); 1297 return dart.as(_internal.makeListFixedLength(list), List$(E));
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2497 if (fragment != null) { 2497 if (fragment != null) {
2498 fragment = Uri._makeFragment(fragment, 0, fragment.length); 2498 fragment = Uri._makeFragment(fragment, 0, fragment.length);
2499 } else if (this.hasFragment) { 2499 } else if (this.hasFragment) {
2500 fragment = this.fragment; 2500 fragment = this.fragment;
2501 } 2501 }
2502 return new Uri._internal(scheme, userInfo, host, port, path, query, fragme nt); 2502 return new Uri._internal(scheme, userInfo, host, port, path, query, fragme nt);
2503 } 2503 }
2504 get pathSegments() { 2504 get pathSegments() {
2505 if (this[_pathSegments] == null) { 2505 if (this[_pathSegments] == null) {
2506 let pathToSplit = !dart.notNull(this.path.isEmpty) && this.path.codeUnit At(0) == Uri._SLASH ? this.path.substring(1) : this.path; 2506 let pathToSplit = !dart.notNull(this.path.isEmpty) && this.path.codeUnit At(0) == Uri._SLASH ? this.path.substring(1) : this.path;
2507 this[_pathSegments] = new (collection.UnmodifiableListView$(String))(pat hToSplit == "" ? dart.const(dart.setType([], List$(String))) : new List$(String) .from(pathToSplit.split("/")[$map](dart.bind(Uri, 'decodeComponent')), {growable : false})); 2507 this[_pathSegments] = new (collection.UnmodifiableListView$(String))(pat hToSplit == "" ? dart.const(dart.setType([], List$(String))) : new (List$(String )).from(pathToSplit.split("/")[$map](dart.bind(Uri, 'decodeComponent')), {growab le: false}));
2508 } 2508 }
2509 return this[_pathSegments]; 2509 return this[_pathSegments];
2510 } 2510 }
2511 get queryParameters() { 2511 get queryParameters() {
2512 if (this[_queryParameters] == null) { 2512 if (this[_queryParameters] == null) {
2513 this[_queryParameters] = new (collection.UnmodifiableMapView$(String, St ring))(Uri.splitQueryString(this.query)); 2513 this[_queryParameters] = new (collection.UnmodifiableMapView$(String, St ring))(Uri.splitQueryString(this.query));
2514 } 2514 }
2515 return this[_queryParameters]; 2515 return this[_queryParameters];
2516 } 2516 }
2517 static _makePort(port, scheme) { 2517 static _makePort(port, scheme) {
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
3480 exports.Stopwatch = Stopwatch; 3480 exports.Stopwatch = Stopwatch;
3481 exports.String = String; 3481 exports.String = String;
3482 exports.RuneIterator = RuneIterator; 3482 exports.RuneIterator = RuneIterator;
3483 exports.StringBuffer = StringBuffer; 3483 exports.StringBuffer = StringBuffer;
3484 exports.StringSink = StringSink; 3484 exports.StringSink = StringSink;
3485 exports.Symbol = Symbol; 3485 exports.Symbol = Symbol;
3486 exports.Type = Type; 3486 exports.Type = Type;
3487 exports.Uri = Uri; 3487 exports.Uri = Uri;
3488 exports.SupportJsExtensionMethods = SupportJsExtensionMethods; 3488 exports.SupportJsExtensionMethods = SupportJsExtensionMethods;
3489 })(core || (core = {})); 3489 })(core || (core = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/convert.js ('k') | lib/src/checker/rules.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698