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

Side by Side Diff: src/site/articles/trydart/examples/1-blankbadge/piratebadge.dart.js

Issue 35913002: Try Dart 1 hour experience first draft (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: Created 7 years, 2 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 // Generated by dart2js, the Dart to JavaScript compiler.
2 // The code supports the following hooks:
3 // dartPrint(message) - if this function is defined it is called
4 // instead of the Dart [print] method.
5 // dartMainRunner(main) - if this function is defined, the Dart [main]
6 // method will not be invoked directly.
7 // Instead, a closure that will invoke [main] is
8 // passed to [dartMainRunner].
9 (function($) {
10 var A = {};
11 delete A.x;
12 var B = {};
13 delete B.x;
14 var C = {};
15 delete C.x;
16 var D = {};
17 delete D.x;
18 var E = {};
19 delete E.x;
20 var F = {};
21 delete F.x;
22 var G = {};
23 delete G.x;
24 var H = {};
25 delete H.x;
26 var J = {};
27 delete J.x;
28 var K = {};
29 delete K.x;
30 var L = {};
31 delete L.x;
32 var M = {};
33 delete M.x;
34 var N = {};
35 delete N.x;
36 var O = {};
37 delete O.x;
38 var P = {};
39 delete P.x;
40 var Q = {};
41 delete Q.x;
42 var R = {};
43 delete R.x;
44 var S = {};
45 delete S.x;
46 var T = {};
47 delete T.x;
48 var U = {};
49 delete U.x;
50 var V = {};
51 delete V.x;
52 var W = {};
53 delete W.x;
54 var X = {};
55 delete X.x;
56 var Y = {};
57 delete Y.x;
58 var Z = {};
59 delete Z.x;
60 function Isolate() {}
61 init();
62
63 $ = Isolate.$isolateProperties;
64 // Method closures
65 (function (reflectionData) {
66 function map(x){x={x:x};delete x.x;return x}
67 if (!init.libraries) init.libraries = [];
68 if (!init.mangledNames) init.mangledNames = map();
69 if (!init.mangledGlobalNames) init.mangledGlobalNames = map();
70 if (!init.statics) init.statics = map();
71 if (!init.interfaces) init.interfaces = map();
72 if (!init.globalFunctions) init.globalFunctions = map();
73 var libraries = init.libraries;
74 var mangledNames = init.mangledNames;
75 var mangledGlobalNames = init.mangledGlobalNames;
76 var hasOwnProperty = Object.prototype.hasOwnProperty;
77 var length = reflectionData.length;
78 for (var i = 0; i < length; i++) {
79 var data = reflectionData[i];
80 var name = data[0];
81 var uri = data[1];
82 var metadata = data[2];
83 var globalObject = data[3];
84 var descriptor = data[4];
85 var isRoot = !!data[5];
86 var fields = descriptor && descriptor[""];
87 var classes = [];
88 var functions = [];
89 function processStatics(descriptor) {
90 for (var property in descriptor) {
91 if (!hasOwnProperty.call(descriptor, property)) continue;
92 if (property === "") continue;
93 var element = descriptor[property];
94 var firstChar = property.substring(0, 1);
95 var previousProperty;
96 if (firstChar === "+") {
97 mangledGlobalNames[previousProperty] = property.substring(1);
98 if (descriptor[property] == 1) descriptor[previousProperty].$reflectab le = 1;
99 if (element && element.length) init.interfaces[previousProperty] = ele ment;
100 } else if (firstChar === "@") {
101 property = property.substring(1);
102 $[property]["@"] = element;
103 } else if (firstChar === "*") {
104 globalObject[previousProperty].$defaultValues = element;
105 var optionalMethods = descriptor.$methodsWithOptionalArguments;
106 if (!optionalMethods) {
107 descriptor.$methodsWithOptionalArguments = optionalMethods = {}
108 }
109 optionalMethods[property] = previousProperty;
110 } else if (typeof element === "function") {
111 globalObject[previousProperty = property] = element;
112 functions.push(property);
113 init.globalFunctions[property] = element;
114 } else {
115 previousProperty = property;
116 var newDesc = {};
117 var previousProp;
118 for (var prop in element) {
119 if (!hasOwnProperty.call(element, prop)) continue;
120 firstChar = prop.substring(0, 1);
121 if (prop === "static") {
122 processStatics(init.statics[property] = element[prop]);
123 } else if (firstChar === "+") {
124 mangledNames[previousProp] = prop.substring(1);
125 if (element[prop] == 1) element[previousProp].$reflectable = 1;
126 } else if (firstChar === "@" && prop !== "@") {
127 newDesc[prop.substring(1)]["@"] = element[prop];
128 } else if (firstChar === "*") {
129 newDesc[previousProp].$defaultValues = element[prop];
130 var optionalMethods = newDesc.$methodsWithOptionalArguments;
131 if (!optionalMethods) {
132 newDesc.$methodsWithOptionalArguments = optionalMethods={}
133 }
134 optionalMethods[prop] = previousProp;
135 } else {
136 newDesc[previousProp = prop] = element[prop];
137 }
138 }
139 $$[property] = [globalObject, newDesc];
140 classes.push(property);
141 }
142 }
143 }
144 processStatics(descriptor);
145 libraries.push([name, uri, classes, functions, metadata, fields, isRoot,
146 globalObject]);
147 }
148 })([
149 ["piratebadge.dart", "piratebadge.dart", , A, {
150 main: function() {
151 }},
152 1],
153 ]);
154 // Static function getters
155 // Runtime type support
156 // getInterceptor methods
157 $.interceptorsByTag = null;
158 $.leafTags = null;
159 $.mapTypeToInterceptor = [];
160
161 init.functionAliases = {};
162 ;
163 init.metadata = [];
164 $ = null;
165 Isolate = Isolate.$finishIsolateConstructor(Isolate);
166 $ = new Isolate();
167 function convertToFastObject(properties) {
168 function MyClass() {};
169 MyClass.prototype = properties;
170 new MyClass();
171 return properties;
172 }
173 A = convertToFastObject(A);
174 B = convertToFastObject(B);
175 C = convertToFastObject(C);
176 D = convertToFastObject(D);
177 E = convertToFastObject(E);
178 F = convertToFastObject(F);
179 G = convertToFastObject(G);
180 H = convertToFastObject(H);
181 J = convertToFastObject(J);
182 K = convertToFastObject(K);
183 L = convertToFastObject(L);
184 M = convertToFastObject(M);
185 N = convertToFastObject(N);
186 O = convertToFastObject(O);
187 P = convertToFastObject(P);
188 Q = convertToFastObject(Q);
189 R = convertToFastObject(R);
190 S = convertToFastObject(S);
191 T = convertToFastObject(T);
192 U = convertToFastObject(U);
193 V = convertToFastObject(V);
194 W = convertToFastObject(W);
195 X = convertToFastObject(X);
196 Y = convertToFastObject(Y);
197 Z = convertToFastObject(Z);
198 // BEGIN invoke [main].
199 ;(function (callback) {
200 if (typeof document === "undefined") {
201 callback(null);
202 return;
203 }
204 if (document.currentScript) {
205 callback(document.currentScript);
206 return;
207 }
208
209 var scripts = document.scripts;
210 function onLoad(event) {
211 for (var i = 0; i < scripts.length; ++i) {
212 scripts[i].removeEventListener("load", onLoad, false);
213 }
214 callback(event.target);
215 }
216 for (var i = 0; i < scripts.length; ++i) {
217 scripts[i].addEventListener("load", onLoad, false);
218 }
219 })(function(currentScript) {
220 init.currentScript = currentScript;
221
222 if (typeof dartMainRunner === "function") {
223 dartMainRunner(function() { A.main(); });
224 } else {
225 A.main();
226 }
227 });
228 // END invoke [main].
229 function init() {
230 Isolate.$isolateProperties = {};
231 Isolate.$lazy = function(prototype, staticName, fieldName, getterName, lazyVal ue) {
232 var sentinelUndefined = {};
233 var sentinelInProgress = {};
234 prototype[fieldName] = sentinelUndefined;
235 prototype[getterName] = function() {
236 var result = $[fieldName];
237 try {
238 if (result === sentinelUndefined) {
239 $[fieldName] = sentinelInProgress;
240 try {
241 result = $[fieldName] = lazyValue();
242 } finally {
243 if (result === sentinelUndefined) {
244 if ($[fieldName] === sentinelInProgress) {
245 $[fieldName] = null;
246 }
247 }
248 }
249 } else {
250 if (result === sentinelInProgress)
251 H.throwCyclicInit(staticName);
252 }
253 return result;
254 } finally {
255 $[getterName] = function() {
256 return this[fieldName];
257 };
258 }
259 };
260 };
261 Isolate.$finishIsolateConstructor = function(oldIsolate) {
262 var isolateProperties = oldIsolate.$isolateProperties;
263 function Isolate() {
264 var hasOwnProperty = Object.prototype.hasOwnProperty;
265 for (var staticName in isolateProperties)
266 if (hasOwnProperty.call(isolateProperties, staticName))
267 this[staticName] = isolateProperties[staticName];
268 function ForceEfficientMap() {
269 }
270 ForceEfficientMap.prototype = this;
271 new ForceEfficientMap();
272 }
273 Isolate.prototype = oldIsolate.prototype;
274 Isolate.prototype.constructor = Isolate;
275 Isolate.$isolateProperties = isolateProperties;
276 return Isolate;
277 };
278 }
279 })()
280
281 //# sourceMappingURL=piratebadge.dart.js.map
282 //@ sourceMappingURL=piratebadge.dart.js.map
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698