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

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

Issue 1088943006: implement tear offs (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
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 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequen cy)).truncate(); 1404 return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequen cy)).truncate();
1405 } 1405 }
1406 get isRunning() { 1406 get isRunning() {
1407 return this[_start] != null && this[_stop] == null; 1407 return this[_start] != null && this[_stop] == null;
1408 } 1408 }
1409 static [_initTicker]() { 1409 static [_initTicker]() {
1410 _js_helper.Primitives.initTicker(); 1410 _js_helper.Primitives.initTicker();
1411 Stopwatch[_frequency] = _js_helper.Primitives.timerFrequency; 1411 Stopwatch[_frequency] = _js_helper.Primitives.timerFrequency;
1412 } 1412 }
1413 static [_now]() { 1413 static [_now]() {
1414 return dart.as(dart.dsend(_js_helper.Primitives, 'timerTicks'), int); 1414 return dart.as(dart.dcall(_js_helper.Primitives.timerTicks), int);
1415 } 1415 }
1416 } 1416 }
1417 Stopwatch._frequency = null; 1417 Stopwatch._frequency = null;
1418 let _stringFromIterable = dart.JsSymbol('_stringFromIterable'); 1418 let _stringFromIterable = dart.JsSymbol('_stringFromIterable');
1419 let $sublist = dart.JsSymbol('$sublist'); 1419 let $sublist = dart.JsSymbol('$sublist');
1420 class String extends Object { 1420 class String extends Object {
1421 fromCharCodes(charCodes, start, end) { 1421 fromCharCodes(charCodes, start, end) {
1422 if (start === void 0) 1422 if (start === void 0)
1423 start = 0; 1423 start = 0;
1424 if (end === void 0) 1424 if (end === void 0)
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
2213 if (fragment != null) { 2213 if (fragment != null) {
2214 fragment = Uri[_makeFragment](fragment, 0, fragment.length); 2214 fragment = Uri[_makeFragment](fragment, 0, fragment.length);
2215 } else if (this.hasFragment) { 2215 } else if (this.hasFragment) {
2216 fragment = this.fragment; 2216 fragment = this.fragment;
2217 } 2217 }
2218 return new Uri[_internal](scheme, userInfo, host, port, path, query, fragm ent); 2218 return new Uri[_internal](scheme, userInfo, host, port, path, query, fragm ent);
2219 } 2219 }
2220 get pathSegments() { 2220 get pathSegments() {
2221 if (this[_pathSegments] == null) { 2221 if (this[_pathSegments] == null) {
2222 let pathToSplit = !dart.notNull(this.path.isEmpty) && this.path.codeUnit At(0) == Uri[_SLASH] ? this.path.substring(1) : this.path; 2222 let pathToSplit = !dart.notNull(this.path.isEmpty) && this.path.codeUnit At(0) == Uri[_SLASH] ? this.path.substring(1) : this.path;
2223 this[_pathSegments] = new collection.UnmodifiableListView(pathToSplit == "" ? /* Unimplemented const */dart.setType([], List$(String)) : pathToSplit.spl it("/")[exports.$map](Uri.decodeComponent)[exports.$toList]({growable: false})); 2223 this[_pathSegments] = new collection.UnmodifiableListView(pathToSplit == "" ? /* Unimplemented const */dart.setType([], List$(String)) : pathToSplit.spl it("/")[exports.$map](dart.bind(Uri, 'decodeComponent'))[exports.$toList]({growa ble: false}));
2224 } 2224 }
2225 return this[_pathSegments]; 2225 return this[_pathSegments];
2226 } 2226 }
2227 get queryParameters() { 2227 get queryParameters() {
2228 if (this[_queryParameters] == null) { 2228 if (this[_queryParameters] == null) {
2229 this[_queryParameters] = new (collection.UnmodifiableMapView$(String, St ring))(Uri.splitQueryString(this.query)); 2229 this[_queryParameters] = new (collection.UnmodifiableMapView$(String, St ring))(Uri.splitQueryString(this.query));
2230 } 2230 }
2231 return this[_queryParameters]; 2231 return this[_queryParameters];
2232 } 2232 }
2233 static [_makePort](port, scheme) { 2233 static [_makePort](port, scheme) {
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
3151 exports.Symbol = Symbol; 3151 exports.Symbol = Symbol;
3152 exports.Type = Type; 3152 exports.Type = Type;
3153 exports.$forEach = $forEach; 3153 exports.$forEach = $forEach;
3154 exports.$map = $map; 3154 exports.$map = $map;
3155 exports.$toList = $toList; 3155 exports.$toList = $toList;
3156 exports.$isEmpty = $isEmpty; 3156 exports.$isEmpty = $isEmpty;
3157 exports.$removeLast = $removeLast; 3157 exports.$removeLast = $removeLast;
3158 exports.$fold = $fold; 3158 exports.$fold = $fold;
3159 exports.Uri = Uri; 3159 exports.Uri = Uri;
3160 })(core || (core = {})); 3160 })(core || (core = {}));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698