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

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

Issue 968273002: Fixing layout in js output (use full paths rather than just the library name) (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
OLDNEW
(Empty)
1 var fieldtest;
2 (function(fieldtest) {
3 'use strict';
4 class A extends dart.Object {
5 A() {
6 this.x = 42;
7 }
8 }
9 let B$ = dart.generic(function(T) {
10 class B extends dart.Object {
11 B() {
12 this.x = dart.as(null, core.int);
13 this.y = null;
14 this.z = dart.as(null, T);
15 }
16 }
17 return B;
18 });
19 let B = B$(dynamic);
20 // Function foo: (A) → int
21 function foo(a) {
22 core.print(a.x);
23 return a.x;
24 }
25 // Function bar: (dynamic) → int
26 function bar(a) {
27 core.print(dart.dload(a, 'x'));
28 return dart.as(dart.dload(a, 'x'), core.int);
29 }
30 // Function baz: (A) → dynamic
31 function baz(a) {
32 return a.x;
33 }
34 // Function compute: () → int
35 function compute() {
36 return 123;
37 }
38 dart.defineLazyProperties(fieldtest, {
39 get y() {
40 return compute() + 444;
41 },
42 set y() {}
43 });
44 dart.copyProperties(fieldtest, {
45 get q() {
46 return core.String['+'](core.String['+']('life, ', 'the universe '), 'and everything');
47 },
48 get z() {
49 return 42;
50 },
51 set z(value) {
52 fieldtest.y = dart.as(value, core.int);
53 }
54 });
55 // Function main: () → void
56 function main() {
57 let a = new A();
58 foo(a);
59 bar(a);
60 core.print(baz(a));
61 }
62 // Exports:
63 fieldtest.A = A;
64 fieldtest.B = B;
65 fieldtest.B$ = B$;
66 fieldtest.foo = foo;
67 fieldtest.bar = bar;
68 fieldtest.baz = baz;
69 fieldtest.compute = compute;
70 fieldtest.q = q;
71 fieldtest.z = z;
72 fieldtest.z = z;
73 fieldtest.main = main;
74 })(fieldtest || (fieldtest = {}));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698