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

Side by Side Diff: test/codegen/expect/functions.js

Issue 1182653002: Refactor runtime into libraries, better type reps (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Address comments 2 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 | « test/codegen/expect/fieldtest.js ('k') | test/codegen/expect/html_input.html » ('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('functions', null, /* Imports */[ 1 dart_library.library('functions', null, /* Imports */[
2 "dart_runtime/dart",
2 'dart/core' 3 'dart/core'
3 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
4 ], function(exports, core) { 5 ], function(exports, dart, core) {
5 'use strict'; 6 'use strict';
7 let dartx = dart.dartx;
6 function bootstrap() { 8 function bootstrap() {
7 return dart.list([new Foo()], Foo); 9 return dart.list([new Foo()], Foo);
8 } 10 }
9 dart.fn(bootstrap, () => dart.functionType(core.List$(Foo), [])); 11 dart.fn(bootstrap, () => dart.functionType(core.List$(Foo), []));
10 let A2B$ = dart.generic(function(A, B) { 12 let A2B$ = dart.generic(function(A, B) {
11 let A2B = dart.typedef('A2B', () => dart.functionType(B, [A])); 13 let A2B = dart.typedef('A2B', () => dart.functionType(B, [A]));
12 return A2B; 14 return A2B;
13 }); 15 });
14 let A2B = A2B$(); 16 let A2B = A2B$();
15 function id(f) { 17 function id(f) {
16 return f; 18 return f;
17 } 19 }
18 dart.fn(id, () => dart.functionType(A2B$(Foo, Foo), [A2B$(Foo, Foo)])); 20 dart.fn(id, () => dart.functionType(A2B$(Foo, Foo), [A2B$(Foo, Foo)]));
19 class Foo extends core.Object {} 21 class Foo extends core.Object {}
20 function main() { 22 function main() {
21 core.print(bootstrap()[dartx.get](0)); 23 core.print(bootstrap()[dartx.get](0));
22 } 24 }
23 dart.fn(main, dart.void, []); 25 dart.fn(main, dart.void, []);
24 // Exports: 26 // Exports:
25 exports.bootstrap = bootstrap; 27 exports.bootstrap = bootstrap;
26 exports.A2B$ = A2B$; 28 exports.A2B$ = A2B$;
27 exports.A2B = A2B; 29 exports.A2B = A2B;
28 exports.id = id; 30 exports.id = id;
29 exports.Foo = Foo; 31 exports.Foo = Foo;
30 exports.main = main; 32 exports.main = main;
31 }); 33 });
OLDNEW
« no previous file with comments | « test/codegen/expect/fieldtest.js ('k') | test/codegen/expect/html_input.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698