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

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

Issue 1173023004: fixes #217, Object members on extension types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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/codegen/js_codegen.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 dart.library('dart/core', null, /* Imports */[ 1 dart.library('dart/core', null, /* Imports */[
2 ], /* Lazy imports */[ 2 ], /* Lazy imports */[
3 'dart/_js_helper', 3 'dart/_js_helper',
4 'dart/_internal', 4 'dart/_internal',
5 'dart/collection', 5 'dart/collection',
6 'dart/_interceptors', 6 'dart/_interceptors',
7 'dart/convert' 7 'dart/convert'
8 ], function(exports, _js_helper, _internal, collection, _interceptors, convert) { 8 ], function(exports, _js_helper, _internal, collection, _interceptors, convert) {
9 'use strict'; 9 'use strict';
10 class Object { 10 class Object {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 }); 69 });
70 let proxy = dart.const(new _Proxy()); 70 let proxy = dart.const(new _Proxy());
71 dart.defineExtensionNames([ 71 dart.defineExtensionNames([
72 'toString' 72 'toString'
73 ]); 73 ]);
74 class bool extends Object { 74 class bool extends Object {
75 static fromEnvironment(name, opts) { 75 static fromEnvironment(name, opts) {
76 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : fa lse; 76 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : fa lse;
77 throw new UnsupportedError('bool.fromEnvironment can only be used as a con st constructor'); 77 throw new UnsupportedError('bool.fromEnvironment can only be used as a con st constructor');
78 } 78 }
79 [dartx.toString]() { 79 toString() {
80 return this ? "true" : "false"; 80 return this ? "true" : "false";
81 } 81 }
82 } 82 }
83 dart.setSignature(bool, { 83 dart.setSignature(bool, {
84 constructors: () => ({fromEnvironment: [bool, [String], {defaultValue: bool} ]}) 84 constructors: () => ({fromEnvironment: [bool, [String], {defaultValue: bool} ]})
85 }); 85 });
86 let Comparator$ = dart.generic(function(T) { 86 let Comparator$ = dart.generic(function(T) {
87 let Comparator = dart.typedef('Comparator', () => dart.functionType(int, [T, T])); 87 let Comparator = dart.typedef('Comparator', () => dart.functionType(int, [T, T]));
88 return Comparator; 88 return Comparator;
89 }); 89 });
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 513 }
514 get inMicroseconds() { 514 get inMicroseconds() {
515 return this[_duration]; 515 return this[_duration];
516 } 516 }
517 ['=='](other) { 517 ['=='](other) {
518 if (!dart.is(other, Duration)) 518 if (!dart.is(other, Duration))
519 return false; 519 return false;
520 return dart.equals(this[_duration], dart.dload(other, _duration)); 520 return dart.equals(this[_duration], dart.dload(other, _duration));
521 } 521 }
522 get hashCode() { 522 get hashCode() {
523 return dart[dartx.hashCode](this[_duration]); 523 return dart.hashCode(this[_duration]);
524 } 524 }
525 compareTo(other) { 525 compareTo(other) {
526 return this[_duration][dartx.compareTo](other[_duration]); 526 return this[_duration][dartx.compareTo](other[_duration]);
527 } 527 }
528 toString() { 528 toString() {
529 let sixDigits = n => { 529 let sixDigits = n => {
530 if (dart.notNull(n) >= 100000) 530 if (dart.notNull(n) >= 100000)
531 return `${n}`; 531 return `${n}`;
532 if (dart.notNull(n) >= 10000) 532 if (dart.notNull(n) >= 10000)
533 return `0${n}`; 533 return `0${n}`;
(...skipping 2830 matching lines...) Expand 10 before | Expand all | Expand 10 after
3364 exports.StackTrace = StackTrace; 3364 exports.StackTrace = StackTrace;
3365 exports.Stopwatch = Stopwatch; 3365 exports.Stopwatch = Stopwatch;
3366 exports.String = String; 3366 exports.String = String;
3367 exports.RuneIterator = RuneIterator; 3367 exports.RuneIterator = RuneIterator;
3368 exports.StringBuffer = StringBuffer; 3368 exports.StringBuffer = StringBuffer;
3369 exports.StringSink = StringSink; 3369 exports.StringSink = StringSink;
3370 exports.Symbol = Symbol; 3370 exports.Symbol = Symbol;
3371 exports.Type = Type; 3371 exports.Type = Type;
3372 exports.Uri = Uri; 3372 exports.Uri = Uri;
3373 }); 3373 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/convert.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698