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

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

Issue 1633003002: Add --modules=node support (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: regen sdk and expectations Created 4 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
OLDNEW
1 dart_library.library('dart/core', null, /* Imports */[ 1 dart_library.library('dart/core', null, /* Imports */[
2 'dart/_runtime' 2 'dart/_runtime'
3 ], /* Lazy imports */[ 3 ], /* Lazy imports */[
4 'dart/_js_helper', 4 'dart/_js_helper',
5 'dart/_internal', 5 'dart/_internal',
6 'dart/collection', 6 'dart/collection',
7 'dart/_interceptors', 7 'dart/_interceptors',
8 'dart/convert' 8 'dart/convert'
9 ], function(exports, dart, _js_helper, _internal, collection, _interceptors, con vert) { 9 ], function(exports, dart, _js_helper, _internal, collection, _interceptors, con vert) {
10 'use strict'; 10 'use strict';
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 const Comparator$ = dart.generic(function(T) { 86 const Comparator$ = dart.generic(function(T) {
87 const Comparator = dart.typedef('Comparator', () => dart.functionType(int, [ T, T])); 87 const Comparator = dart.typedef('Comparator', () => dart.functionType(int, [ T, T]));
88 return Comparator; 88 return Comparator;
89 }); 89 });
90 let Comparator = Comparator$(); 90 const Comparator = Comparator$();
91 const Comparable$ = dart.generic(function(T) { 91 const Comparable$ = dart.generic(function(T) {
92 class Comparable extends Object { 92 class Comparable extends Object {
93 static compare(a, b) { 93 static compare(a, b) {
94 return a[dartx.compareTo](b); 94 return a[dartx.compareTo](b);
95 } 95 }
96 } 96 }
97 dart.setSignature(Comparable, { 97 dart.setSignature(Comparable, {
98 statics: () => ({compare: [int, [Comparable$(), Comparable$()]]}), 98 statics: () => ({compare: [int, [Comparable$(), Comparable$()]]}),
99 names: ['compare'] 99 names: ['compare']
100 }); 100 });
101 return Comparable; 101 return Comparable;
102 }); 102 });
103 let Comparable = Comparable$(); 103 const Comparable = Comparable$();
104 class DateTime extends Object { 104 class DateTime extends Object {
105 DateTime(year, month, day, hour, minute, second, millisecond) { 105 DateTime(year, month, day, hour, minute, second, millisecond) {
106 if (month === void 0) month = 1; 106 if (month === void 0) month = 1;
107 if (day === void 0) day = 1; 107 if (day === void 0) day = 1;
108 if (hour === void 0) hour = 0; 108 if (hour === void 0) hour = 0;
109 if (minute === void 0) minute = 0; 109 if (minute === void 0) minute = 0;
110 if (second === void 0) second = 0; 110 if (second === void 0) second = 0;
111 if (millisecond === void 0) millisecond = 0; 111 if (millisecond === void 0) millisecond = 0;
112 this._internal(year, month, day, hour, minute, second, millisecond, false) ; 112 this._internal(year, month, day, hour, minute, second, millisecond, false) ;
113 } 113 }
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 dart.setSignature(Expando, { 1119 dart.setSignature(Expando, {
1120 constructors: () => ({Expando: [Expando$(T), [], [String]]}), 1120 constructors: () => ({Expando: [Expando$(T), [], [String]]}),
1121 methods: () => ({ 1121 methods: () => ({
1122 get: [T, [Object]], 1122 get: [T, [Object]],
1123 set: [dart.void, [Object, T]], 1123 set: [dart.void, [Object, T]],
1124 [_getKey]: [String, []] 1124 [_getKey]: [String, []]
1125 }) 1125 })
1126 }); 1126 });
1127 return Expando; 1127 return Expando;
1128 }); 1128 });
1129 let Expando = Expando$(); 1129 const Expando = Expando$();
1130 Expando._KEY_PROPERTY_NAME = 'expando$key'; 1130 Expando._KEY_PROPERTY_NAME = 'expando$key';
1131 Expando._EXPANDO_PROPERTY_NAME = 'expando$values'; 1131 Expando._EXPANDO_PROPERTY_NAME = 'expando$values';
1132 Expando._keyCount = 0; 1132 Expando._keyCount = 0;
1133 class Function extends Object { 1133 class Function extends Object {
1134 static apply(f, positionalArguments, namedArguments) { 1134 static apply(f, positionalArguments, namedArguments) {
1135 if (namedArguments === void 0) namedArguments = null; 1135 if (namedArguments === void 0) namedArguments = null;
1136 return dart.dcall.apply(null, [f].concat(positionalArguments)); 1136 return dart.dcall.apply(null, [f].concat(positionalArguments));
1137 } 1137 }
1138 static _toMangledNames(namedArguments) { 1138 static _toMangledNames(namedArguments) {
1139 let result = dart.map(); 1139 let result = dart.map();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 } 1203 }
1204 dart.setSignature(Iterable, { 1204 dart.setSignature(Iterable, {
1205 constructors: () => ({ 1205 constructors: () => ({
1206 Iterable: [Iterable$(E), []], 1206 Iterable: [Iterable$(E), []],
1207 generate: [Iterable$(E), [int], [dart.functionType(E, [int])]] 1207 generate: [Iterable$(E), [int], [dart.functionType(E, [int])]]
1208 }), 1208 }),
1209 methods: () => ({[dartx.join]: [String, [], [String]]}) 1209 methods: () => ({[dartx.join]: [String, [], [String]]})
1210 }); 1210 });
1211 return Iterable; 1211 return Iterable;
1212 }); 1212 });
1213 let Iterable = Iterable$(); 1213 const Iterable = Iterable$();
1214 const _Generator$ = dart.generic(function(E) { 1214 const _Generator$ = dart.generic(function(E) {
1215 const _Generator = dart.typedef('_Generator', () => dart.functionType(E, [in t])); 1215 const _Generator = dart.typedef('_Generator', () => dart.functionType(E, [in t]));
1216 return _Generator; 1216 return _Generator;
1217 }); 1217 });
1218 let _Generator = _Generator$(); 1218 const _Generator = _Generator$();
1219 const _end = dart.JsSymbol('_end'); 1219 const _end = dart.JsSymbol('_end');
1220 const _start = dart.JsSymbol('_start'); 1220 const _start = dart.JsSymbol('_start');
1221 const _generator = dart.JsSymbol('_generator'); 1221 const _generator = dart.JsSymbol('_generator');
1222 const _GeneratorIterable$ = dart.generic(function(E) { 1222 const _GeneratorIterable$ = dart.generic(function(E) {
1223 class _GeneratorIterable extends collection.IterableBase$(E) { 1223 class _GeneratorIterable extends collection.IterableBase$(E) {
1224 _GeneratorIterable(end, generator) { 1224 _GeneratorIterable(end, generator) {
1225 this[_end] = end; 1225 this[_end] = end;
1226 this[_start] = 0; 1226 this[_start] = 0;
1227 this[_generator] = dart.as(generator != null ? generator : exports._Gene ratorIterable$()._id, _Generator$(E)); 1227 this[_generator] = dart.as(generator != null ? generator : exports._Gene ratorIterable$()._id, _Generator$(E));
1228 super.IterableBase(); 1228 super.IterableBase();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 return this[_current]; 1299 return this[_current];
1300 } 1300 }
1301 } 1301 }
1302 _GeneratorIterator[dart.implements] = () => [Iterator$(E)]; 1302 _GeneratorIterator[dart.implements] = () => [Iterator$(E)];
1303 dart.setSignature(_GeneratorIterator, { 1303 dart.setSignature(_GeneratorIterator, {
1304 constructors: () => ({_GeneratorIterator: [_GeneratorIterator$(E), [int, i nt, _Generator$(E)]]}), 1304 constructors: () => ({_GeneratorIterator: [_GeneratorIterator$(E), [int, i nt, _Generator$(E)]]}),
1305 methods: () => ({moveNext: [bool, []]}) 1305 methods: () => ({moveNext: [bool, []]})
1306 }); 1306 });
1307 return _GeneratorIterator; 1307 return _GeneratorIterator;
1308 }); 1308 });
1309 let _GeneratorIterator = _GeneratorIterator$(); 1309 const _GeneratorIterator = _GeneratorIterator$();
1310 const BidirectionalIterator$ = dart.generic(function(E) { 1310 const BidirectionalIterator$ = dart.generic(function(E) {
1311 class BidirectionalIterator extends Object {} 1311 class BidirectionalIterator extends Object {}
1312 BidirectionalIterator[dart.implements] = () => [Iterator$(E)]; 1312 BidirectionalIterator[dart.implements] = () => [Iterator$(E)];
1313 return BidirectionalIterator; 1313 return BidirectionalIterator;
1314 }); 1314 });
1315 let BidirectionalIterator = BidirectionalIterator$(); 1315 const BidirectionalIterator = BidirectionalIterator$();
1316 const Iterator$ = dart.generic(function(E) { 1316 const Iterator$ = dart.generic(function(E) {
1317 class Iterator extends Object {} 1317 class Iterator extends Object {}
1318 return Iterator; 1318 return Iterator;
1319 }); 1319 });
1320 let Iterator = Iterator$(); 1320 const Iterator = Iterator$();
1321 const List$ = dart.generic(function(E) { 1321 const List$ = dart.generic(function(E) {
1322 class List extends Object { 1322 class List extends Object {
1323 static new(length) { 1323 static new(length) {
1324 if (length === void 0) length = null; 1324 if (length === void 0) length = null;
1325 let list = null; 1325 let list = null;
1326 if (length == null) { 1326 if (length == null) {
1327 list = []; 1327 list = [];
1328 } else { 1328 } else {
1329 if (!(typeof length == 'number') || dart.notNull(length) < 0) { 1329 if (!(typeof length == 'number') || dart.notNull(length) < 0) {
1330 dart.throw(new ArgumentError(`Length must be a non-negative integer: ${length}`)); 1330 dart.throw(new ArgumentError(`Length must be a non-negative integer: ${length}`));
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 dart.setSignature(List, { 1373 dart.setSignature(List, {
1374 constructors: () => ({ 1374 constructors: () => ({
1375 new: [List$(E), [], [int]], 1375 new: [List$(E), [], [int]],
1376 filled: [List$(E), [int, E]], 1376 filled: [List$(E), [int, E]],
1377 from: [List$(E), [Iterable], {growable: bool}], 1377 from: [List$(E), [Iterable], {growable: bool}],
1378 generate: [List$(E), [int, dart.functionType(E, [int])], {growable: bool }] 1378 generate: [List$(E), [int, dart.functionType(E, [int])], {growable: bool }]
1379 }) 1379 })
1380 }); 1380 });
1381 return List; 1381 return List;
1382 }); 1382 });
1383 let List = List$(); 1383 const List = List$();
1384 const Map$ = dart.generic(function(K, V) { 1384 const Map$ = dart.generic(function(K, V) {
1385 class Map extends Object { 1385 class Map extends Object {
1386 static new() { 1386 static new() {
1387 return collection.LinkedHashMap$(K, V).new(); 1387 return collection.LinkedHashMap$(K, V).new();
1388 } 1388 }
1389 static from(other) { 1389 static from(other) {
1390 return collection.LinkedHashMap$(K, V).from(other); 1390 return collection.LinkedHashMap$(K, V).from(other);
1391 } 1391 }
1392 static identity() { 1392 static identity() {
1393 return collection.LinkedHashMap$(K, V).identity(); 1393 return collection.LinkedHashMap$(K, V).identity();
1394 } 1394 }
1395 static fromIterable(iterable, opts) { 1395 static fromIterable(iterable, opts) {
1396 return collection.LinkedHashMap$(K, V).fromIterable(iterable, opts); 1396 return collection.LinkedHashMap$(K, V).fromIterable(iterable, opts);
1397 } 1397 }
1398 static fromIterables(keys, values) { 1398 static fromIterables(keys, values) {
1399 return collection.LinkedHashMap$(K, V).fromIterables(keys, values); 1399 return collection.LinkedHashMap$(K, V).fromIterables(keys, values);
1400 } 1400 }
1401 } 1401 }
1402 dart.setSignature(Map, { 1402 dart.setSignature(Map, {
1403 constructors: () => ({ 1403 constructors: () => ({
1404 new: [Map$(K, V), []], 1404 new: [Map$(K, V), []],
1405 from: [Map$(K, V), [Map$()]], 1405 from: [Map$(K, V), [Map$()]],
1406 identity: [Map$(K, V), []], 1406 identity: [Map$(K, V), []],
1407 fromIterable: [Map$(K, V), [Iterable], {key: dart.functionType(K, [dart. dynamic]), value: dart.functionType(V, [dart.dynamic])}], 1407 fromIterable: [Map$(K, V), [Iterable], {key: dart.functionType(K, [dart. dynamic]), value: dart.functionType(V, [dart.dynamic])}],
1408 fromIterables: [Map$(K, V), [Iterable$(K), Iterable$(V)]] 1408 fromIterables: [Map$(K, V), [Iterable$(K), Iterable$(V)]]
1409 }) 1409 })
1410 }); 1410 });
1411 return Map; 1411 return Map;
1412 }); 1412 });
1413 let Map = Map$(); 1413 const Map = Map$();
1414 class Null extends Object { 1414 class Null extends Object {
1415 static _uninstantiable() { 1415 static _uninstantiable() {
1416 dart.throw(new UnsupportedError('class Null cannot be instantiated')); 1416 dart.throw(new UnsupportedError('class Null cannot be instantiated'));
1417 } 1417 }
1418 toString() { 1418 toString() {
1419 return "null"; 1419 return "null";
1420 } 1420 }
1421 } 1421 }
1422 dart.setSignature(Null, { 1422 dart.setSignature(Null, {
1423 constructors: () => ({_uninstantiable: [Null, []]}) 1423 constructors: () => ({_uninstantiable: [Null, []]})
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 from: [exports.Set$(E), [Iterable$(E)]] 1465 from: [exports.Set$(E), [Iterable$(E)]]
1466 }) 1466 })
1467 }); 1467 });
1468 return Set; 1468 return Set;
1469 }); 1469 });
1470 dart.defineLazyClassGeneric(exports, 'Set', {get: Set$}); 1470 dart.defineLazyClassGeneric(exports, 'Set', {get: Set$});
1471 const Sink$ = dart.generic(function(T) { 1471 const Sink$ = dart.generic(function(T) {
1472 class Sink extends Object {} 1472 class Sink extends Object {}
1473 return Sink; 1473 return Sink;
1474 }); 1474 });
1475 let Sink = Sink$(); 1475 const Sink = Sink$();
1476 class StackTrace extends Object {} 1476 class StackTrace extends Object {}
1477 const _stop = dart.JsSymbol('_stop'); 1477 const _stop = dart.JsSymbol('_stop');
1478 class Stopwatch extends Object { 1478 class Stopwatch extends Object {
1479 get frequency() { 1479 get frequency() {
1480 return Stopwatch._frequency; 1480 return Stopwatch._frequency;
1481 } 1481 }
1482 Stopwatch() { 1482 Stopwatch() {
1483 this[_start] = null; 1483 this[_start] = null;
1484 this[_stop] = null; 1484 this[_stop] = null;
1485 Stopwatch._initTicker(); 1485 Stopwatch._initTicker();
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
3210 exports.StackTrace = StackTrace; 3210 exports.StackTrace = StackTrace;
3211 exports.Stopwatch = Stopwatch; 3211 exports.Stopwatch = Stopwatch;
3212 exports.String = String; 3212 exports.String = String;
3213 exports.RuneIterator = RuneIterator; 3213 exports.RuneIterator = RuneIterator;
3214 exports.StringBuffer = StringBuffer; 3214 exports.StringBuffer = StringBuffer;
3215 exports.StringSink = StringSink; 3215 exports.StringSink = StringSink;
3216 exports.Symbol = Symbol; 3216 exports.Symbol = Symbol;
3217 exports.Type = Type; 3217 exports.Type = Type;
3218 exports.Uri = Uri; 3218 exports.Uri = Uri;
3219 }); 3219 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698