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

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: address review comments 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/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
(Empty)
1 var fieldtest;
2 (function(exports) {
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(exports, {
39 get y() {
40 return compute() + 444;
41 },
42 set y() {}
43 });
44 dart.copyProperties(exports, {
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 exports.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 exports.A = A;
64 exports.B = B;
65 exports.B$ = B$;
66 exports.foo = foo;
67 exports.bar = bar;
68 exports.baz = baz;
69 exports.compute = compute;
70 exports.q = q;
71 exports.z = z;
72 exports.z = z;
73 exports.main = main;
74 })(fieldtest || (fieldtest = {}));
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