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

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

Issue 1148333003: No dynamic at runtime (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 methods = dart.defineLibrary(methods, {}); 1 var methods = dart.defineLibrary(methods, {});
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 let _c = Symbol('_c'); 5 let _c = Symbol('_c');
6 class A extends core.Object { 6 class A extends core.Object {
7 A() { 7 A() {
8 this[_c] = 3; 8 this[_c] = 3;
9 } 9 }
10 x() { 10 x() {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 w: dart.functionType(core.int, [core.int], {b: core.num}), 51 w: dart.functionType(core.int, [core.int], {b: core.num}),
52 ww: dart.functionType(core.int, [core.int], {b: core.int}) 52 ww: dart.functionType(core.int, [core.int], {b: core.int})
53 }) 53 })
54 }); 54 });
55 class Bar extends core.Object { 55 class Bar extends core.Object {
56 call(x) { 56 call(x) {
57 return core.print(`hello from ${x}`); 57 return core.print(`hello from ${x}`);
58 } 58 }
59 } 59 }
60 dart.setSignature(Bar, { 60 dart.setSignature(Bar, {
61 methods: () => ({call: dart.functionType(dart.dynamic, [dart.dynamic])}) 61 methods: () => ({call: dart.functionType(core.Object, [core.Object])})
62 }); 62 });
63 class Foo extends core.Object { 63 class Foo extends core.Object {
64 Foo() { 64 Foo() {
65 this.bar = new Bar(); 65 this.bar = new Bar();
66 } 66 }
67 } 67 }
68 function test() { 68 function test() {
69 let f = new Foo(); 69 let f = new Foo();
70 dart.dcall(f.bar, "Bar's call method!"); 70 dart.dcall(f.bar, "Bar's call method!");
71 let a = new A(); 71 let a = new A();
72 let g = dart.bind(a, 'x'); 72 let g = dart.bind(a, 'x');
73 let aa = new A(); 73 let aa = new A();
74 let h = dart.dload(aa, 'x'); 74 let h = dart.dload(aa, 'x');
75 } 75 }
76 dart.fn(test); 76 dart.fn(test);
77 // Exports: 77 // Exports:
78 exports.A = A; 78 exports.A = A;
79 exports.Bar = Bar; 79 exports.Bar = Bar;
80 exports.Foo = Foo; 80 exports.Foo = Foo;
81 exports.test = test; 81 exports.test = test;
82 })(methods, core); 82 })(methods, core);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698