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

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

Issue 967713002: fixes #69, avoid module name inside module scope (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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/dom/dom.js ('k') | test/codegen/expect/html_input_a/html_input_a.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 fieldtest; 1 var fieldtest;
2 (function(fieldtest) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class A extends dart.Object { 4 class A extends dart.Object {
5 A() { 5 A() {
6 this.x = 42; 6 this.x = 42;
7 } 7 }
8 } 8 }
9 let B$ = dart.generic(function(T) { 9 let B$ = dart.generic(function(T) {
10 class B extends dart.Object { 10 class B extends dart.Object {
11 B() { 11 B() {
12 this.x = dart.as(null, core.int); 12 this.x = dart.as(null, core.int);
(...skipping 15 matching lines...) Expand all
28 return dart.as(dart.dload(a, 'x'), core.int); 28 return dart.as(dart.dload(a, 'x'), core.int);
29 } 29 }
30 // Function baz: (A) → dynamic 30 // Function baz: (A) → dynamic
31 function baz(a) { 31 function baz(a) {
32 return a.x; 32 return a.x;
33 } 33 }
34 // Function compute: () → int 34 // Function compute: () → int
35 function compute() { 35 function compute() {
36 return 123; 36 return 123;
37 } 37 }
38 dart.defineLazyProperties(fieldtest, { 38 dart.defineLazyProperties(exports, {
39 get y() { 39 get y() {
40 return compute() + 444; 40 return compute() + 444;
41 }, 41 },
42 set y() {} 42 set y() {}
43 }); 43 });
44 dart.copyProperties(fieldtest, { 44 dart.copyProperties(exports, {
45 get q() { 45 get q() {
46 return core.String['+'](core.String['+']('life, ', 'the universe '), 'and everything'); 46 return core.String['+'](core.String['+']('life, ', 'the universe '), 'and everything');
47 }, 47 },
48 get z() { 48 get z() {
49 return 42; 49 return 42;
50 }, 50 },
51 set z(value) { 51 set z(value) {
52 fieldtest.y = dart.as(value, core.int); 52 exports.y = dart.as(value, core.int);
53 } 53 }
54 }); 54 });
55 // Function main: () → void 55 // Function main: () → void
56 function main() { 56 function main() {
57 let a = new A(); 57 let a = new A();
58 foo(a); 58 foo(a);
59 bar(a); 59 bar(a);
60 core.print(baz(a)); 60 core.print(baz(a));
61 } 61 }
62 // Exports: 62 // Exports:
63 fieldtest.A = A; 63 exports.A = A;
64 fieldtest.B = B; 64 exports.B = B;
65 fieldtest.B$ = B$; 65 exports.B$ = B$;
66 fieldtest.foo = foo; 66 exports.foo = foo;
67 fieldtest.bar = bar; 67 exports.bar = bar;
68 fieldtest.baz = baz; 68 exports.baz = baz;
69 fieldtest.compute = compute; 69 exports.compute = compute;
70 fieldtest.q = q; 70 exports.q = q;
71 fieldtest.z = z; 71 exports.z = z;
72 fieldtest.z = z; 72 exports.z = z;
73 fieldtest.main = main; 73 exports.main = main;
74 })(fieldtest || (fieldtest = {})); 74 })(fieldtest || (fieldtest = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/dom/dom.js ('k') | test/codegen/expect/html_input_a/html_input_a.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698