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

Side by Side Diff: src/site/codelabs/darrrt/examples/1-blankbadge/piratebadge.dart.precompiled.js

Issue 35913002: Try Dart 1 hour experience first draft (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: updated image of dart editor with new directory name Created 7 years, 1 month 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", , A, {
150 main: function() {
151 }},
152 1],
153 ]);
154 // Static function getters
155 // Runtime type support
156 // getInterceptor methods
157 $.initNativeDispatchFlag = null;
158
159 init.functionAliases = {};
160 ;
161 init.metadata = [];
162 $ = null;
163 Isolate = Isolate.$finishIsolateConstructor(Isolate);
164 $ = new Isolate();
165 function convertToFastObject(properties) {
166 function MyClass() {};
167 MyClass.prototype = properties;
168 new MyClass();
169 return properties;
170 }
171 A = convertToFastObject(A);
172 B = convertToFastObject(B);
173 C = convertToFastObject(C);
174 D = convertToFastObject(D);
175 E = convertToFastObject(E);
176 F = convertToFastObject(F);
177 G = convertToFastObject(G);
178 H = convertToFastObject(H);
179 J = convertToFastObject(J);
180 K = convertToFastObject(K);
181 L = convertToFastObject(L);
182 M = convertToFastObject(M);
183 N = convertToFastObject(N);
184 O = convertToFastObject(O);
185 P = convertToFastObject(P);
186 Q = convertToFastObject(Q);
187 R = convertToFastObject(R);
188 S = convertToFastObject(S);
189 T = convertToFastObject(T);
190 U = convertToFastObject(U);
191 V = convertToFastObject(V);
192 W = convertToFastObject(W);
193 X = convertToFastObject(X);
194 Y = convertToFastObject(Y);
195 Z = convertToFastObject(Z);
196 // BEGIN invoke [main].
197 ;(function (callback) {
198 if (typeof document === "undefined") {
199 callback(null);
200 return;
201 }
202 if (document.currentScript) {
203 callback(document.currentScript);
204 return;
205 }
206
207 var scripts = document.scripts;
208 function onLoad(event) {
209 for (var i = 0; i < scripts.length; ++i) {
210 scripts[i].removeEventListener("load", onLoad, false);
211 }
212 callback(event.target);
213 }
214 for (var i = 0; i < scripts.length; ++i) {
215 scripts[i].addEventListener("load", onLoad, false);
216 }
217 })(function(currentScript) {
218 init.currentScript = currentScript;
219
220 if (typeof dartMainRunner === "function") {
221 dartMainRunner(function() { A.main(); });
222 } else {
223 A.main();
224 }
225 });
226 // END invoke [main].
227 function init() {
228 Isolate.$isolateProperties = {};
229 Isolate.$lazy = function(prototype, staticName, fieldName, getterName, lazyVal ue) {
230 var sentinelUndefined = {};
231 var sentinelInProgress = {};
232 prototype[fieldName] = sentinelUndefined;
233 prototype[getterName] = function() {
234 var result = $[fieldName];
235 try {
236 if (result === sentinelUndefined) {
237 $[fieldName] = sentinelInProgress;
238 try {
239 result = $[fieldName] = lazyValue();
240 } finally {
241 if (result === sentinelUndefined) {
242 if ($[fieldName] === sentinelInProgress) {
243 $[fieldName] = null;
244 }
245 }
246 }
247 } else {
248 if (result === sentinelInProgress)
249 H.throwCyclicInit(staticName);
250 }
251 return result;
252 } finally {
253 $[getterName] = function() {
254 return this[fieldName];
255 };
256 }
257 };
258 };
259 Isolate.$finishIsolateConstructor = function(oldIsolate) {
260 var isolateProperties = oldIsolate.$isolateProperties;
261 function Isolate() {
262 var hasOwnProperty = Object.prototype.hasOwnProperty;
263 for (var staticName in isolateProperties)
264 if (hasOwnProperty.call(isolateProperties, staticName))
265 this[staticName] = isolateProperties[staticName];
266 function ForceEfficientMap() {
267 }
268 ForceEfficientMap.prototype = this;
269 new ForceEfficientMap();
270 }
271 Isolate.prototype = oldIsolate.prototype;
272 Isolate.prototype.constructor = Isolate;
273 Isolate.$isolateProperties = isolateProperties;
274 return Isolate;
275 };
276 }
277 })()
278 function dart_precompiled($collectedClasses) {
279 var $desc;
280 return [];
281 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698