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

Side by Side Diff: test/codegen/expect/functions.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: Remove empty signatures 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 | « test/codegen/expect/fieldtest.js ('k') | test/codegen/expect/methods.js » ('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 functions = dart.defineLibrary(functions, {}); 1 var functions = dart.defineLibrary(functions, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 (function(exports, core) { 3 (function(exports, core) {
4 'use strict'; 4 'use strict';
5 function bootstrap() { 5 function bootstrap() {
6 return dart.setType([new Foo()], core.List$(Foo)); 6 return dart.setType([new Foo()], core.List$(Foo));
7 } 7 }
8 dart.fn(bootstrap, () => dart.functionType(core.List$(Foo), [])); 8 dart.fn(bootstrap, () => dart.functionType(core.List$(Foo), []));
9 let A2B$ = dart.generic(function(A, B) { 9 let A2B$ = dart.generic(function(A, B) {
10 let A2B = dart.typedef('A2B', () => dart.functionType(B, [A])); 10 let A2B = dart.typedef('A2B', () => dart.functionType(B, [A]));
11 return A2B; 11 return A2B;
12 }); 12 });
13 let A2B = A2B$(); 13 let A2B = A2B$();
14 function id(f) { 14 function id(f) {
15 return f; 15 return f;
16 } 16 }
17 dart.fn(id, () => dart.functionType(A2B$(Foo, Foo), [A2B$(Foo, Foo)])); 17 dart.fn(id, () => dart.functionType(A2B$(Foo, Foo), [A2B$(Foo, Foo)]));
18 class Foo extends core.Object {} 18 class Foo extends core.Object {}
19 dart.setSignature(Foo, {});
20 function main() { 19 function main() {
21 core.print(bootstrap()[core.$get](0)); 20 core.print(bootstrap()[core.$get](0));
22 } 21 }
23 dart.fn(main, dart.void, []); 22 dart.fn(main, dart.void, []);
24 // Exports: 23 // Exports:
25 exports.bootstrap = bootstrap; 24 exports.bootstrap = bootstrap;
26 exports.A2B$ = A2B$; 25 exports.A2B$ = A2B$;
27 exports.A2B = A2B; 26 exports.A2B = A2B;
28 exports.id = id; 27 exports.id = id;
29 exports.Foo = Foo; 28 exports.Foo = Foo;
30 exports.main = main; 29 exports.main = main;
31 })(functions, core); 30 })(functions, core);
OLDNEW
« no previous file with comments | « test/codegen/expect/fieldtest.js ('k') | test/codegen/expect/methods.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698