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

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

Issue 1144303003: Use signature inheritance when method types are unchanged (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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
OLDNEW
1 var _internal = dart.defineLibrary(_internal, {}); 1 var _internal = dart.defineLibrary(_internal, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var collection = dart.import(collection); 3 var collection = dart.import(collection);
4 var math = dart.lazyImport(math); 4 var math = dart.lazyImport(math);
5 var _interceptors = dart.lazyImport(_interceptors); 5 var _interceptors = dart.lazyImport(_interceptors);
6 var _js_primitives = dart.lazyImport(_js_primitives); 6 var _js_primitives = dart.lazyImport(_js_primitives);
7 (function(exports, core, collection, math, _interceptors, _js_primitives) { 7 (function(exports, core, collection, math, _interceptors, _js_primitives) {
8 'use strict'; 8 'use strict';
9 class EfficientLength extends core.Object {} 9 class EfficientLength extends core.Object {}
10 dart.setSignature(EfficientLength, {}); 10 dart.setSignature(EfficientLength, {});
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i = dart.notNull(i) + 1) { 235 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i = dart.notNull(i) + 1) {
236 result.add(this[core.$elementAt](i)); 236 result.add(this[core.$elementAt](i));
237 } 237 }
238 return result; 238 return result;
239 } 239 }
240 } 240 }
241 ListIterable[dart.implements] = () => [EfficientLength]; 241 ListIterable[dart.implements] = () => [EfficientLength];
242 dart.setSignature(ListIterable, { 242 dart.setSignature(ListIterable, {
243 methods: () => ({ 243 methods: () => ({
244 [core.$forEach]: dart.functionType(dart.void, [dart.functionType(dart.vo id, [E])]), 244 [core.$forEach]: dart.functionType(dart.void, [dart.functionType(dart.vo id, [E])]),
245 [core.$contains]: dart.functionType(core.bool, [core.Object]),
246 [core.$every]: dart.functionType(core.bool, [dart.functionType(core.bool , [E])]), 245 [core.$every]: dart.functionType(core.bool, [dart.functionType(core.bool , [E])]),
247 [core.$any]: dart.functionType(core.bool, [dart.functionType(core.bool, [E])]), 246 [core.$any]: dart.functionType(core.bool, [dart.functionType(core.bool, [E])]),
248 [core.$firstWhere]: dart.functionType(E, [dart.functionType(core.bool, [ E])], {rEls: dart.functionType(E, [])}), 247 [core.$firstWhere]: dart.functionType(E, [dart.functionType(core.bool, [ E])], {rEls: dart.functionType(E, [])}),
249 [core.$lastWhere]: dart.functionType(E, [dart.functionType(core.bool, [E ])], {rEls: dart.functionType(E, [])}), 248 [core.$lastWhere]: dart.functionType(E, [dart.functionType(core.bool, [E ])], {rEls: dart.functionType(E, [])}),
250 [core.$singleWhere]: dart.functionType(E, [dart.functionType(core.bool, [E])]), 249 [core.$singleWhere]: dart.functionType(E, [dart.functionType(core.bool, [E])]),
251 [core.$join]: dart.functionType(core.String, [], [core.String]),
252 [core.$where]: dart.functionType(core.Iterable$(E), [dart.functionType(c ore.bool, [E])]), 250 [core.$where]: dart.functionType(core.Iterable$(E), [dart.functionType(c ore.bool, [E])]),
253 [core.$map]: dart.functionType(core.Iterable, [dart.functionType(dart.dy namic, [E])]), 251 [core.$map]: dart.functionType(core.Iterable, [dart.functionType(dart.dy namic, [E])]),
254 [core.$reduce]: dart.functionType(E, [dart.functionType(E, [dart.dynamic , E])]), 252 [core.$reduce]: dart.functionType(E, [dart.functionType(E, [dart.dynamic , E])]),
255 [core.$fold]: dart.functionType(dart.dynamic, [dart.dynamic, dart.functi onType(dart.dynamic, [dart.dynamic, E])]), 253 [core.$fold]: dart.functionType(dart.dynamic, [dart.dynamic, dart.functi onType(dart.dynamic, [dart.dynamic, E])]),
256 [core.$skip]: dart.functionType(core.Iterable$(E), [core.int]), 254 [core.$skip]: dart.functionType(core.Iterable$(E), [core.int]),
257 [core.$skipWhile]: dart.functionType(core.Iterable$(E), [dart.functionTy pe(core.bool, [E])]), 255 [core.$skipWhile]: dart.functionType(core.Iterable$(E), [dart.functionTy pe(core.bool, [E])]),
258 [core.$take]: dart.functionType(core.Iterable$(E), [core.int]), 256 [core.$take]: dart.functionType(core.Iterable$(E), [core.int]),
259 [core.$takeWhile]: dart.functionType(core.Iterable$(E), [dart.functionTy pe(core.bool, [E])]), 257 [core.$takeWhile]: dart.functionType(core.Iterable$(E), [dart.functionTy pe(core.bool, [E])]),
260 [core.$toList]: dart.functionType(core.List$(E), [], {rowabl: core.bool} ), 258 [core.$toList]: dart.functionType(core.List$(E), [], {rowabl: core.bool} ),
261 [core.$toSet]: dart.functionType(core.Set$(E), []) 259 [core.$toSet]: dart.functionType(core.Set$(E), [])
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 } 949 }
952 [core.$toSet]() { 950 [core.$toSet]() {
953 return new (core.Set$(E))(); 951 return new (core.Set$(E))();
954 } 952 }
955 } 953 }
956 EmptyIterable[dart.implements] = () => [EfficientLength]; 954 EmptyIterable[dart.implements] = () => [EfficientLength];
957 dart.setSignature(EmptyIterable, { 955 dart.setSignature(EmptyIterable, {
958 methods: () => ({ 956 methods: () => ({
959 [core.$forEach]: dart.functionType(dart.void, [dart.functionType(dart.vo id, [E])]), 957 [core.$forEach]: dart.functionType(dart.void, [dart.functionType(dart.vo id, [E])]),
960 [core.$elementAt]: dart.functionType(E, [core.int]), 958 [core.$elementAt]: dart.functionType(E, [core.int]),
961 [core.$contains]: dart.functionType(core.bool, [core.Object]),
962 [core.$every]: dart.functionType(core.bool, [dart.functionType(core.bool , [E])]), 959 [core.$every]: dart.functionType(core.bool, [dart.functionType(core.bool , [E])]),
963 [core.$any]: dart.functionType(core.bool, [dart.functionType(core.bool, [E])]), 960 [core.$any]: dart.functionType(core.bool, [dart.functionType(core.bool, [E])]),
964 [core.$firstWhere]: dart.functionType(E, [dart.functionType(core.bool, [ E])], {rEls: dart.functionType(E, [])}), 961 [core.$firstWhere]: dart.functionType(E, [dart.functionType(core.bool, [ E])], {rEls: dart.functionType(E, [])}),
965 [core.$lastWhere]: dart.functionType(E, [dart.functionType(core.bool, [E ])], {rEls: dart.functionType(E, [])}), 962 [core.$lastWhere]: dart.functionType(E, [dart.functionType(core.bool, [E ])], {rEls: dart.functionType(E, [])}),
966 [core.$singleWhere]: dart.functionType(E, [dart.functionType(core.bool, [E])], {rEls: dart.functionType(E, [])}), 963 [core.$singleWhere]: dart.functionType(E, [dart.functionType(core.bool, [E])], {rEls: dart.functionType(E, [])}),
967 [core.$join]: dart.functionType(core.String, [], [core.String]),
968 [core.$where]: dart.functionType(core.Iterable$(E), [dart.functionType(c ore.bool, [E])]), 964 [core.$where]: dart.functionType(core.Iterable$(E), [dart.functionType(c ore.bool, [E])]),
969 [core.$map]: dart.functionType(core.Iterable, [dart.functionType(dart.dy namic, [E])]), 965 [core.$map]: dart.functionType(core.Iterable, [dart.functionType(dart.dy namic, [E])]),
970 [core.$reduce]: dart.functionType(E, [dart.functionType(E, [E, E])]), 966 [core.$reduce]: dart.functionType(E, [dart.functionType(E, [E, E])]),
971 [core.$fold]: dart.functionType(dart.dynamic, [dart.dynamic, dart.functi onType(dart.dynamic, [dart.dynamic, E])]), 967 [core.$fold]: dart.functionType(dart.dynamic, [dart.dynamic, dart.functi onType(dart.dynamic, [dart.dynamic, E])]),
972 [core.$skip]: dart.functionType(core.Iterable$(E), [core.int]), 968 [core.$skip]: dart.functionType(core.Iterable$(E), [core.int]),
973 [core.$skipWhile]: dart.functionType(core.Iterable$(E), [dart.functionTy pe(core.bool, [E])]), 969 [core.$skipWhile]: dart.functionType(core.Iterable$(E), [dart.functionTy pe(core.bool, [E])]),
974 [core.$take]: dart.functionType(core.Iterable$(E), [core.int]), 970 [core.$take]: dart.functionType(core.Iterable$(E), [core.int]),
975 [core.$takeWhile]: dart.functionType(core.Iterable$(E), [dart.functionTy pe(core.bool, [E])]), 971 [core.$takeWhile]: dart.functionType(core.Iterable$(E), [dart.functionTy pe(core.bool, [E])]),
976 [core.$toList]: dart.functionType(core.List$(E), [], {rowabl: core.bool} ), 972 [core.$toList]: dart.functionType(core.List$(E), [], {rowabl: core.bool} ),
977 [core.$toSet]: dart.functionType(core.Set$(E), []) 973 [core.$toSet]: dart.functionType(core.Set$(E), [])
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 dart.setSignature(ListMapView, { 1741 dart.setSignature(ListMapView, {
1746 methods: () => ({ 1742 methods: () => ({
1747 get: dart.functionType(E, [core.Object]), 1743 get: dart.functionType(E, [core.Object]),
1748 containsValue: dart.functionType(core.bool, [core.Object]), 1744 containsValue: dart.functionType(core.bool, [core.Object]),
1749 containsKey: dart.functionType(core.bool, [core.Object]), 1745 containsKey: dart.functionType(core.bool, [core.Object]),
1750 forEach: dart.functionType(dart.void, [dart.functionType(dart.void, [cor e.int, E])]), 1746 forEach: dart.functionType(dart.void, [dart.functionType(dart.void, [cor e.int, E])]),
1751 set: dart.functionType(dart.void, [core.int, E]), 1747 set: dart.functionType(dart.void, [core.int, E]),
1752 putIfAbsent: dart.functionType(E, [core.int, dart.functionType(E, [])]), 1748 putIfAbsent: dart.functionType(E, [core.int, dart.functionType(E, [])]),
1753 remove: dart.functionType(E, [core.Object]), 1749 remove: dart.functionType(E, [core.Object]),
1754 clear: dart.functionType(dart.void, []), 1750 clear: dart.functionType(dart.void, []),
1755 addAll: dart.functionType(dart.void, [core.Map$(core.int, E)]), 1751 addAll: dart.functionType(dart.void, [core.Map$(core.int, E)])
1756 toString: dart.functionType(core.String, [])
1757 }) 1752 })
1758 }); 1753 });
1759 return ListMapView; 1754 return ListMapView;
1760 }); 1755 });
1761 let ListMapView = ListMapView$(); 1756 let ListMapView = ListMapView$();
1762 let ReversedListIterable$ = dart.generic(function(E) { 1757 let ReversedListIterable$ = dart.generic(function(E) {
1763 class ReversedListIterable extends ListIterable$(E) { 1758 class ReversedListIterable extends ListIterable$(E) {
1764 ReversedListIterable(source) { 1759 ReversedListIterable(source) {
1765 this[_source] = source; 1760 this[_source] = source;
1766 super.ListIterable(); 1761 super.ListIterable();
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 throw new core.ArgumentError(`"${name}" is not a valid (qualified) symbol name`); 2204 throw new core.ArgumentError(`"${name}" is not a valid (qualified) symbol name`);
2210 } 2205 }
2211 static isValidSymbol(name) { 2206 static isValidSymbol(name) {
2212 return dart.notNull(name.isEmpty) || dart.notNull(Symbol.symbolPattern.has Match(name)); 2207 return dart.notNull(name.isEmpty) || dart.notNull(Symbol.symbolPattern.has Match(name));
2213 } 2208 }
2214 } 2209 }
2215 Symbol[dart.implements] = () => [core.Symbol]; 2210 Symbol[dart.implements] = () => [core.Symbol];
2216 dart.defineNamedConstructor(Symbol, 'unvalidated'); 2211 dart.defineNamedConstructor(Symbol, 'unvalidated');
2217 dart.defineNamedConstructor(Symbol, 'validated'); 2212 dart.defineNamedConstructor(Symbol, 'validated');
2218 dart.setSignature(Symbol, { 2213 dart.setSignature(Symbol, {
2219 methods: () => ({ 2214 methods: () => ({'==': dart.functionType(core.bool, [core.Object])}),
2220 '==': dart.functionType(core.bool, [core.Object]),
2221 toString: dart.functionType(core.String, [])
2222 }),
2223 statics: () => ({ 2215 statics: () => ({
2224 getName: dart.functionType(core.String, [Symbol]), 2216 getName: dart.functionType(core.String, [Symbol]),
2225 validatePublicSymbol: dart.functionType(core.String, [core.String]), 2217 validatePublicSymbol: dart.functionType(core.String, [core.String]),
2226 isValidSymbol: dart.functionType(core.bool, [core.String]) 2218 isValidSymbol: dart.functionType(core.bool, [core.String])
2227 }), 2219 }),
2228 names: ['getName', 'validatePublicSymbol', 'isValidSymbol'] 2220 names: ['getName', 'validatePublicSymbol', 'isValidSymbol']
2229 }); 2221 });
2230 Symbol.reservedWordRE = '(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))| d(?:efault|o)|' + 'e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?:ew|ul l)|' + 'ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|' + 'v(?:ar|o id)|w(?:hile|ith))'; 2222 Symbol.reservedWordRE = '(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))| d(?:efault|o)|' + 'e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?:ew|ul l)|' + 'ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|' + 'v(?:ar|o id)|w(?:hile|ith))';
2231 Symbol.publicIdentifierRE = '(?!' + `${Symbol.reservedWordRE}` + '\\b(?!\\$))[ a-zA-Z$][\\w$]*'; 2223 Symbol.publicIdentifierRE = '(?!' + `${Symbol.reservedWordRE}` + '\\b(?!\\$))[ a-zA-Z$][\\w$]*';
2232 Symbol.identifierRE = '(?!' + `${Symbol.reservedWordRE}` + '\\b(?!\\$))[a-zA-Z $_][\\w$]*'; 2224 Symbol.identifierRE = '(?!' + `${Symbol.reservedWordRE}` + '\\b(?!\\$))[a-zA-Z $_][\\w$]*';
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
2307 exports.ReversedListIterable = ReversedListIterable; 2299 exports.ReversedListIterable = ReversedListIterable;
2308 exports.UnmodifiableListError = UnmodifiableListError; 2300 exports.UnmodifiableListError = UnmodifiableListError;
2309 exports.NonGrowableListError = NonGrowableListError; 2301 exports.NonGrowableListError = NonGrowableListError;
2310 exports.makeListFixedLength = makeListFixedLength; 2302 exports.makeListFixedLength = makeListFixedLength;
2311 exports.Lists = Lists; 2303 exports.Lists = Lists;
2312 exports.printToConsole = printToConsole; 2304 exports.printToConsole = printToConsole;
2313 exports.Sort = Sort; 2305 exports.Sort = Sort;
2314 exports.Symbol = Symbol; 2306 exports.Symbol = Symbol;
2315 exports.POWERS_OF_TEN = POWERS_OF_TEN; 2307 exports.POWERS_OF_TEN = POWERS_OF_TEN;
2316 })(_internal, core, collection, math, _interceptors, _js_primitives); 2308 })(_internal, core, collection, math, _interceptors, _js_primitives);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698