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

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

Issue 1988503002: Move generated files to gen/. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Revise. Created 4 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
« no previous file with comments | « test/codegen/expect/closure.txt ('k') | test/codegen/expect/constructors.txt » ('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 dart_library.library('constructors', null, /* Imports */[
2 'dart_sdk'
3 ], function(exports, dart_sdk) {
4 'use strict';
5 const core = dart_sdk.core;
6 const dart = dart_sdk.dart;
7 const dartx = dart_sdk.dartx;
8 const constructors = Object.create(null);
9 constructors.A = class A extends core.Object {};
10 constructors.B = class B extends core.Object {
11 new() {
12 }
13 };
14 dart.setSignature(constructors.B, {
15 constructors: () => ({new: [constructors.B, []]})
16 });
17 constructors.C = class C extends core.Object {
18 named() {
19 }
20 };
21 dart.defineNamedConstructor(constructors.C, 'named');
22 dart.setSignature(constructors.C, {
23 constructors: () => ({named: [constructors.C, []]})
24 });
25 constructors.C2 = class C2 extends constructors.C {
26 named() {
27 super.named();
28 }
29 };
30 dart.defineNamedConstructor(constructors.C2, 'named');
31 dart.setSignature(constructors.C2, {
32 constructors: () => ({named: [constructors.C2, []]})
33 });
34 constructors.D = class D extends core.Object {
35 new() {
36 }
37 named() {
38 }
39 };
40 dart.defineNamedConstructor(constructors.D, 'named');
41 dart.setSignature(constructors.D, {
42 constructors: () => ({
43 new: [constructors.D, []],
44 named: [constructors.D, []]
45 })
46 });
47 constructors.E = class E extends core.Object {
48 new(name) {
49 this.name = name;
50 }
51 };
52 dart.setSignature(constructors.E, {
53 constructors: () => ({new: [constructors.E, [core.String]]})
54 });
55 constructors.F = class F extends constructors.E {
56 new(name) {
57 super.new(name);
58 }
59 };
60 dart.setSignature(constructors.F, {
61 constructors: () => ({new: [constructors.F, [core.String]]})
62 });
63 constructors.G = class G extends core.Object {
64 new(p1) {
65 if (p1 === void 0) p1 = null;
66 }
67 };
68 dart.setSignature(constructors.G, {
69 constructors: () => ({new: [constructors.G, [], [core.String]]})
70 });
71 constructors.H = class H extends core.Object {
72 new(opts) {
73 let p1 = opts && 'p1' in opts ? opts.p1 : null;
74 }
75 };
76 dart.setSignature(constructors.H, {
77 constructors: () => ({new: [constructors.H, [], {p1: core.String}]})
78 });
79 constructors.I = class I extends core.Object {
80 new() {
81 this.name = 'default';
82 }
83 named(name) {
84 this.name = name;
85 }
86 };
87 dart.defineNamedConstructor(constructors.I, 'named');
88 dart.setSignature(constructors.I, {
89 constructors: () => ({
90 new: [constructors.I, []],
91 named: [constructors.I, [core.String]]
92 })
93 });
94 constructors.J = class J extends core.Object {
95 new() {
96 this.initialized = true;
97 this.nonInitialized = null;
98 }
99 };
100 dart.setSignature(constructors.J, {
101 constructors: () => ({new: [constructors.J, []]})
102 });
103 constructors.K = class K extends core.Object {
104 new() {
105 this.s = 'a';
106 }
107 withS(s) {
108 this.s = s;
109 }
110 };
111 dart.defineNamedConstructor(constructors.K, 'withS');
112 dart.setSignature(constructors.K, {
113 constructors: () => ({
114 new: [constructors.K, []],
115 withS: [constructors.K, [core.String]]
116 })
117 });
118 constructors.L = class L extends core.Object {
119 new(foo) {
120 this.foo = foo;
121 }
122 };
123 dart.setSignature(constructors.L, {
124 constructors: () => ({new: [constructors.L, [dart.dynamic]]})
125 });
126 constructors.M = class M extends constructors.L {
127 named(x) {
128 super.new(dart.notNull(x) + 42);
129 }
130 };
131 dart.defineNamedConstructor(constructors.M, 'named');
132 dart.setSignature(constructors.M, {
133 constructors: () => ({named: [constructors.M, [core.int]]})
134 });
135 constructors.N = class N extends constructors.M {
136 named(y) {
137 super.named(dart.notNull(y) + 100);
138 }
139 };
140 dart.defineNamedConstructor(constructors.N, 'named');
141 dart.setSignature(constructors.N, {
142 constructors: () => ({named: [constructors.N, [core.int]]})
143 });
144 constructors.P = class P extends constructors.N {
145 new(z) {
146 super.named(dart.notNull(z) + 9000);
147 }
148 foo(x) {
149 P.prototype.new.call(this, dart.notNull(x) + 42);
150 }
151 bar() {
152 P.prototype.foo.call(this, 1);
153 }
154 };
155 dart.defineNamedConstructor(constructors.P, 'foo');
156 dart.defineNamedConstructor(constructors.P, 'bar');
157 dart.setSignature(constructors.P, {
158 constructors: () => ({
159 new: [constructors.P, [core.int]],
160 foo: [constructors.P, [core.int]],
161 bar: [constructors.P, []]
162 })
163 });
164 constructors.Q$ = dart.generic(T => {
165 class Q extends core.Object {
166 new(y) {
167 this.x = dart.as(y, T);
168 }
169 static foo() {
170 return new constructors.Q("hello");
171 }
172 bar() {
173 let q = constructors.Q.foo();
174 return dart.as(q.x, core.String);
175 }
176 bar2() {
177 let q = new constructors.Q("world");
178 return dart.as(q.x, core.String);
179 }
180 static baz() {
181 let q = new (constructors.Q$(core.int))(42);
182 return dart.notNull(q.bar()) + dart.notNull(q.bar2());
183 }
184 }
185 dart.setSignature(Q, {
186 constructors: () => ({new: [constructors.Q$(T), [dart.dynamic]]}),
187 methods: () => ({
188 bar: [core.String, []],
189 bar2: [core.String, []]
190 }),
191 statics: () => ({
192 foo: [constructors.Q, []],
193 baz: [core.String, []]
194 }),
195 names: ['foo', 'baz']
196 });
197 return Q;
198 });
199 constructors.Q = constructors.Q$();
200 // Exports:
201 exports.constructors = constructors;
202 });
OLDNEW
« no previous file with comments | « test/codegen/expect/closure.txt ('k') | test/codegen/expect/constructors.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698