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

Side by Side Diff: comp.js

Issue 11183040: Comparison between original, modified and --disable-eval. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: --no-eval Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Isolate() {}
10 init();
11
12 var $$ = {};
13 var $ = Isolate.$isolateProperties;
14 $$.StringBufferImpl = {'': function StringBufferImpl(a, b) {
15 this._buffer = a;
16 this._length = b;
17 },
18 "super": "Object",
19 get$length: function() {
20 return this._length;
21 },
22 isEmpty$0: function() {
23 return this._length === 0;
24 },
25 add$1: function(obj) {
26 var str = $.toString(obj);
27 if (str == null || $.isEmpty(str) === true)
28 return this;
29 $.add$1(this._buffer, str);
30 this._length = $.add(this._length, $.get$length(str));
31 return this;
32 },
33 clear$0: function() {
34 this._buffer = $.ListImplementation_List(null);
35 this._length = 0;
36 return this;
37 },
38 toString$0: function() {
39 if ($.get$length(this._buffer) === 0)
40 return '';
41 if ($.get$length(this._buffer) === 1)
42 return $.index(this._buffer, 0);
43 var result = $.StringImplementation_concatAll(this._buffer);
44 $.clear(this._buffer);
45 $.add$1(this._buffer, result);
46 return result;
47 },
48 StringBufferImpl$1: function(content$) {
49 this.clear$0();
50 this.add$1(content$);
51 }
52 };
53
54 $$.ArgumentError = {'': function ArgumentError(a) {
55 this.message = a;
56 },
57 "super": "Object",
58 toString$0: function() {
59 var t1 = this.message;
60 if (!(t1 == null))
61 return 'Illegal argument(s): ' + $.S(t1);
62 return 'Illegal argument(s)';
63 }
64 };
65
66 $$.IndexOutOfRangeException = {'': function IndexOutOfRangeException(a) {
67 this._value = a;
68 },
69 "super": "Object",
70 toString$0: function() {
71 return 'IndexOutOfRangeException: ' + $.S(this._value);
72 }
73 };
74
75 $$.NullPointerException = {'': function NullPointerException(a, b) {
76 this.functionName = a;
77 this.arguments = b;
78 },
79 "super": "Object",
80 toString$0: function() {
81 var t1 = this.functionName;
82 if (t1 == null)
83 return this.get$exceptionName();
84 else
85 return $.S(this.get$exceptionName()) + ' : method: \'' + $.S(t1) + '\'\n' + 'Receiver: null\n' + 'Arguments: ' + $.S(this.arguments);
86 },
87 get$exceptionName: function() {
88 return 'NullPointerException';
89 }
90 };
91
92 $$.NoMoreElementsException = {'': function NoMoreElementsException() {
93 },
94 "super": "Object",
95 toString$0: function() {
96 return 'NoMoreElementsException';
97 }
98 };
99
100 $$.UnsupportedOperationException = {'': function UnsupportedOperationException(a ) {
101 this._message = a;
102 },
103 "super": "Object",
104 toString$0: function() {
105 return 'UnsupportedOperationException: ' + this._message;
106 }
107 };
108
109 $$.Object = {'': function Object() {
110 },
111 "super": "",
112 operator$eq$1: function(other) {
113 return this === other;
114 },
115 toString$0: function() {
116 return $.Primitives_objectToString(this);
117 }
118 };
119
120 $$.ListIterator = {'': function ListIterator(a, b) {
121 this.i = a;
122 this.list = b;
123 },
124 "super": "Object",
125 hasNext$0: function() {
126 return this.i < this.list.length;
127 },
128 next$0: function() {
129 if (this.hasNext$0() !== true)
130 throw $.$$throw($.NoMoreElementsException$());
131 var value = this.list[this.i];
132 this.i = this.i + 1;
133 return value;
134 }
135 };
136
137 $$.Closure = {'': function Closure() {
138 },
139 "super": "Object",
140 toString$0: function() {
141 return 'Closure';
142 }
143 };
144
145 $$.MetaInfo = {'': function MetaInfo(a, b, c) {
146 this._tag = a;
147 this._tags = b;
148 this._set = c;
149 },
150 "super": "Object",
151 get$_tag: function() { return this._tag; },
152 get$_set: function() { return this._set; }
153 };
154
155 $$.C = {'': function C(a, b) {
156 this.titi = a;
157 this.toto = b;
158 },
159 "super": "Object",
160 set$titi: function(v) { this.titi = v; },
161 get$toto: function() { return this.toto; },
162 foo$0: function() {
163 return 499;
164 }
165 };
166
167 $$.Maps__emitMap_anon = {'': function Maps__emitMap_anon(a, b, c) {
168 this.result_3 = a;
169 this.box_0 = b;
170 this.visiting_2 = c;
171 },
172 "super": "Closure",
173 call$2: function(k, v) {
174 var t1 = this.box_0;
175 if (t1.first_1 !== true)
176 $.add$1(this.result_3, ', ');
177 t1.first_1 = false;
178 t1 = this.result_3;
179 var t2 = this.visiting_2;
180 $.Collections__emitObject(k, t1, t2);
181 $.add$1(t1, ': ');
182 $.Collections__emitObject(v, t1, t2);
183 }
184 };
185
186 $.S = function(value) {
187 var res = $.toString(value);
188 if (!(typeof res === 'string'))
189 throw $.$$throw($.ArgumentError$(value));
190 return res;
191 };
192
193 $.Collections__emitObject = function(o, result, visiting) {
194 if (typeof o === 'object' && o !== null && (o.constructor === Array || !!o.is$ Collection))
195 if ($.Collections__containsRef(visiting, o))
196 $.add$1(result, typeof o === 'object' && o !== null && (o.constructor === Array || !!o.is$List) ? '[...]' : '{...}');
197 else
198 $.Collections__emitCollection(o, result, visiting);
199 else if (typeof o === 'object' && o !== null && !!o.is$Map)
200 if ($.Collections__containsRef(visiting, o))
201 $.add$1(result, '{...}');
202 else
203 $.Maps__emitMap(o, result, visiting);
204 else
205 $.add$1(result, o);
206 };
207
208 $.typeNameInOpera = function(obj) {
209 var name$ = $.constructorNameFallback(obj);
210 if (name$ === 'Window')
211 return 'DOMWindow';
212 return name$;
213 };
214
215 $._dynamicMetadata = function(table) {
216 $dynamicMetadata = table;
217 };
218
219 $.Maps__emitMap = function(m, result, visiting) {
220 var t1 = {};
221 $.add$1(visiting, m);
222 $.add$1(result, '{');
223 t1.first_1 = true;
224 m.forEach$1(new $.Maps__emitMap_anon(result, t1, visiting));
225 $.add$1(result, '}');
226 $.removeLast(visiting);
227 };
228
229 $._dynamicMetadata0 = function() {
230 if ($.identical(typeof($dynamicMetadata), 'undefined')) {
231 var t1 = [];
232 $._dynamicMetadata(t1);
233 }
234 return $dynamicMetadata;
235 };
236
237 $.floor = function(receiver) {
238 return Math.floor(receiver);
239 };
240
241 $.truncate = function(receiver) {
242 return receiver < 0 ? $.ceil(receiver) : $.floor(receiver);
243 };
244
245 $.toStringForNativeObject = function(obj) {
246 return 'Instance of ' + $.getTypeNameOf(obj);
247 };
248
249 $.charCodeAt = function(receiver, index) {
250 if (typeof receiver === 'string') {
251 if (index < 0)
252 throw $.$$throw($.IndexOutOfRangeException$(index));
253 if (index >= receiver.length)
254 throw $.$$throw($.IndexOutOfRangeException$(index));
255 return receiver.charCodeAt(index);
256 } else
257 return receiver.charCodeAt$1(index);
258 };
259
260 $.identical = function(a, b) {
261 return a == null ? b == null : a === b;
262 };
263
264 $.checkNull = function(object) {
265 if (object == null)
266 throw $.$$throw($.NullPointerException$(null, $.CTC0));
267 return object;
268 };
269
270 $.eqB = function(a, b) {
271 if (a == null)
272 return b == null;
273 if (b == null)
274 return false;
275 if (typeof a === "object")
276 if (!!a.operator$eq$1)
277 return $.identical(a.operator$eq$1(b), true);
278 return a === b;
279 };
280
281 $.substring$2 = function(receiver, startIndex, endIndex) {
282 $.checkNum(startIndex);
283 var length$ = receiver.length;
284 if (endIndex == null)
285 endIndex = length$;
286 $.checkNum(endIndex);
287 if (startIndex < 0)
288 throw $.$$throw($.IndexOutOfRangeException$(startIndex));
289 if ($.gtB(startIndex, endIndex))
290 throw $.$$throw($.IndexOutOfRangeException$(startIndex));
291 if ($.gtB(endIndex, length$))
292 throw $.$$throw($.IndexOutOfRangeException$(endIndex));
293 return $.substringUnchecked(receiver, startIndex, endIndex);
294 };
295
296 $.Collections__containsRef = function(c, ref) {
297 for (var t1 = $.iterator(c); t1.hasNext$0() === true;) {
298 var t2 = t1.next$0();
299 if (t2 == null ? ref == null : t2 === ref)
300 return true;
301 }
302 return false;
303 };
304
305 $.dynamicBind = function(obj, name$, methods, arguments$) {
306 var tag = $.getTypeNameOf(obj);
307 var method = methods[tag];
308 if (method == null && !($._dynamicMetadata0() == null))
309 for (var i = 0; i < $._dynamicMetadata0().length; ++i) {
310 var entry = $._dynamicMetadata0()[i];
311 if (entry.get$_set()[tag]) {
312 method = methods[entry.get$_tag()];
313 if (!(method == null))
314 break;
315 }
316 }
317 if (method == null)
318 method = methods['Object'];
319 var proto = Object.getPrototypeOf(obj);
320 if (method == null)
321 method = function () {if (Object.getPrototypeOf(this) === proto) {throw new TypeError(name$ + " is not a function");} else {return Object.prototype[name$].a pply(this, arguments);}};
322 if (!proto.hasOwnProperty(name$))
323 $.defineProperty(proto, name$, method);
324 return method.apply(obj, arguments$);
325 };
326
327 $.ArgumentError$ = function(message) {
328 return new $.ArgumentError(message);
329 };
330
331 $.C$ = function(titi, toto) {
332 return new $.C(titi, toto);
333 };
334
335 $.checkGrowable = function(list, reason) {
336 if (!!(list.fixed$length))
337 throw $.$$throw($.UnsupportedOperationException$(reason));
338 };
339
340 $.getFunctionForTypeNameOf = function() {
341 if (!$.identical(typeof(navigator), 'object'))
342 return $.typeNameInChrome;
343 var userAgent = navigator.userAgent;
344 if ($.contains(userAgent, 'Chrome') || $.contains(userAgent, 'DumpRenderTree') )
345 return $.typeNameInChrome;
346 else if ($.contains(userAgent, 'Firefox'))
347 return $.typeNameInFirefox;
348 else if ($.contains(userAgent, 'MSIE'))
349 return $.typeNameInIE;
350 else if ($.contains(userAgent, 'Opera'))
351 return $.typeNameInOpera;
352 else if ($.contains(userAgent, 'AppleWebKit'))
353 return $.typeNameInSafari;
354 else
355 return $.constructorNameFallback;
356 };
357
358 $.index = function(a, index) {
359 if (typeof a == "string" || a.constructor === Array) {
360 var key = index >>> 0;
361 if ($.identical(key, index) && key < a.length)
362 return a[key];
363 }
364 return $.index$slow(a, index);
365 };
366
367 $.stringJoinUnchecked = function(array, separator) {
368 return array.join(separator);
369 };
370
371 $.isJsArray = function(value) {
372 return !(value == null) && value.constructor === Array;
373 };
374
375 $.Collections_collectionToString = function(c) {
376 var result = $.StringBuffer_StringBuffer('');
377 $.Collections__emitCollection(c, result, $.ListImplementation_List(null));
378 return $.toString(result);
379 };
380
381 $.MetaInfo$ = function(_tag, _tags, _set) {
382 return new $.MetaInfo(_tag, _tags, _set);
383 };
384
385 $.makeA = function() {
386 return makeA();
387 };
388
389 $.id = function(x) {
390 if (x == null)
391 return x;
392 return x;
393 };
394
395 $.dynamicSetMetadata = function(inputTable) {
396 var t1 = $.buildDynamicMetadata(inputTable);
397 $._dynamicMetadata(t1);
398 };
399
400 $.buildDynamicMetadata = function(inputTable) {
401 var result = [];
402 for (var i = 0; i < inputTable.length; ++i) {
403 var tag = inputTable[i][0];
404 var array = inputTable[i];
405 var tags = array[1];
406 var set = {};
407 var tagNames = tags.split('|');
408 for (var j = 0, index = 1; j < tagNames.length; ++j) {
409 $.propertySet(set, tagNames[j], true);
410 index = j;
411 array = tagNames;
412 }
413 result.push($.MetaInfo$(tag, tags, set));
414 }
415 return result;
416 };
417
418 $.add$1 = function(receiver, value) {
419 if ($.isJsArray(receiver)) {
420 $.checkGrowable(receiver, 'add');
421 receiver.push(value);
422 return;
423 }
424 return receiver.add$1(value);
425 };
426
427 $.defineProperty = function(obj, property, value) {
428 Object.defineProperty(obj, property,
429 {value: value, enumerable: false, writable: true, configurable: true});
430 };
431
432 $.propertySet = function(object, property, value) {
433 object[property] = value;
434 };
435
436 $.substringUnchecked = function(receiver, startIndex, endIndex) {
437 return receiver.substring(startIndex, endIndex);
438 };
439
440 $.ListImplementation_List = function(length$) {
441 return $.Primitives_newList(length$);
442 };
443
444 $.dynamicFunction = function(name$) {
445 var f = Object.prototype[name$];
446 if (!(f == null) && !!f.methods)
447 return f.methods;
448 var methods = {};
449 var dartMethod = Object.getPrototypeOf($.CTC1)[name$];
450 if (!(dartMethod == null))
451 $.propertySet(methods, 'Object', dartMethod);
452 var bind = function() {return $.dynamicBind.call$4(this, name$, methods, Array .prototype.slice.call(arguments));};
453 bind.methods = methods;
454 $.defineProperty(Object.prototype, name$, bind);
455 return methods;
456 };
457
458 $.add = function(a, b) {
459 return typeof a === 'number' && typeof b === 'number' ? a + b : $.add$slow(a, b);
460 };
461
462 $.checkNumbers = function(a, b) {
463 if (typeof a === 'number')
464 if (typeof b === 'number')
465 return true;
466 else {
467 $.checkNull(b);
468 throw $.$$throw($.ArgumentError$(b));
469 }
470 return false;
471 };
472
473 $.UnsupportedOperationException$ = function(_message) {
474 return new $.UnsupportedOperationException(_message);
475 };
476
477 $.contains = function(userAgent, name$) {
478 return userAgent.indexOf(name$) !== -1;
479 };
480
481 $.get$length = function(receiver) {
482 if (typeof receiver === 'string' || $.isJsArray(receiver))
483 return receiver.length;
484 else
485 return receiver.get$length();
486 };
487
488 $.hashCodeForNativeObject = function(object) {
489 return $.Primitives_objectHashCode(object);
490 };
491
492 $.ge$slow = function(a, b) {
493 if ($.checkNumbers(a, b))
494 return a >= b;
495 return a.operator$ge$1(b);
496 };
497
498 $.geB = function(a, b) {
499 return typeof a === 'number' && typeof b === 'number' ? a >= b : $.identical($ .ge$slow(a, b), true);
500 };
501
502 $.ListIterator$ = function(list) {
503 return new $.ListIterator(0, list);
504 };
505
506 $.lt$slow = function(a, b) {
507 if ($.checkNumbers(a, b))
508 return a < b;
509 return a.operator$lt$1(b);
510 };
511
512 $.checkNum = function(value) {
513 if (!(typeof value === 'number')) {
514 $.checkNull(value);
515 throw $.$$throw($.ArgumentError$(value));
516 }
517 return value;
518 };
519
520 $.StringBufferImpl$ = function(content$) {
521 var t1 = new $.StringBufferImpl(null, null);
522 t1.StringBufferImpl$1(content$);
523 return t1;
524 };
525
526 $.Primitives_objectToString = function(object) {
527 return 'Instance of \'' + $.S($.Primitives_objectTypeName(object)) + '\'';
528 };
529
530 $.index$slow = function(a, index) {
531 if (typeof a === 'string' || $.isJsArray(a)) {
532 if (!(typeof index === 'number' && Math.floor(index) === index)) {
533 if (!(typeof index === 'number'))
534 throw $.$$throw($.ArgumentError$(index));
535 if (!$.identical($.truncate(index), index))
536 throw $.$$throw($.ArgumentError$(index));
537 }
538 if ($.ltB(index, 0) || $.geB(index, $.get$length(a)))
539 throw $.$$throw($.IndexOutOfRangeException$(index));
540 return a[index];
541 }
542 return a.operator$index$1(index);
543 };
544
545 $.substring$1 = function(receiver, startIndex) {
546 if (!(typeof receiver === 'string'))
547 return receiver.substring$1(startIndex);
548 return $.substring$2(receiver, startIndex, null);
549 };
550
551 $.typeNameInSafari = function(obj) {
552 var name$ = $.constructorNameFallback(obj);
553 if (name$ === 'Window')
554 return 'DOMWindow';
555 if (name$ === 'CanvasPixelArray')
556 return 'Uint8ClampedArray';
557 if (name$ === 'WebKitMutationObserver')
558 return 'MutationObserver';
559 return name$;
560 };
561
562 $.Collections__emitCollection = function(c, result, visiting) {
563 $.add$1(visiting, c);
564 var isList = typeof c === 'object' && c !== null && (c.constructor === Array | | !!c.is$List);
565 $.add$1(result, isList ? '[' : '{');
566 for (var t1 = $.iterator(c), first = true; t1.hasNext$0() === true;) {
567 var t2 = t1.next$0();
568 if (!first)
569 $.add$1(result, ', ');
570 $.Collections__emitObject(t2, result, visiting);
571 first = false;
572 }
573 $.add$1(result, isList ? ']' : '}');
574 $.removeLast(visiting);
575 };
576
577 $.clear = function(receiver) {
578 if (!$.isJsArray(receiver))
579 return receiver.clear$0();
580 $.set$length(receiver, 0);
581 };
582
583 $.Primitives_objectTypeName = function(object) {
584 var name$ = $.constructorNameFallback(object);
585 if ($.eqB(name$, 'Object')) {
586 var decompiled = String(object.constructor).match(/^\s*function\s*(\S*)\s*\( /)[1];
587 if (typeof decompiled === 'string')
588 name$ = decompiled;
589 }
590 return $.identical($.charCodeAt(name$, 0), 36) ? $.substring$1(name$, 1) : nam e$;
591 };
592
593 $.toString = function(value) {
594 if (typeof value == "object" && value !== null)
595 if ($.isJsArray(value))
596 return $.Collections_collectionToString(value);
597 else
598 return value.toString$0();
599 if (value === 0 && (1 / value) < 0)
600 return '-0.0';
601 if (value == null)
602 return 'null';
603 if (typeof value == "function")
604 return 'Closure';
605 return String(value);
606 };
607
608 $.typeNameInIE = function(obj) {
609 var name$ = $.constructorNameFallback(obj);
610 if (name$ === 'Window')
611 return 'DOMWindow';
612 if (name$ === 'Document') {
613 if (!!obj.xmlVersion)
614 return 'Document';
615 return 'HTMLDocument';
616 }
617 if (name$ === 'ApplicationCache')
618 return 'DOMApplicationCache';
619 if (name$ === 'CanvasPixelArray')
620 return 'Uint8ClampedArray';
621 if (name$ === 'DataTransfer')
622 return 'Clipboard';
623 if (name$ === 'DragEvent')
624 return 'MouseEvent';
625 if (name$ === 'HTMLDDElement')
626 return 'HTMLElement';
627 if (name$ === 'HTMLDTElement')
628 return 'HTMLElement';
629 if (name$ === 'HTMLTableDataCellElement')
630 return 'HTMLTableCellElement';
631 if (name$ === 'HTMLTableHeaderCellElement')
632 return 'HTMLTableCellElement';
633 if (name$ === 'HTMLPhraseElement')
634 return 'HTMLElement';
635 if (name$ === 'MSStyleCSSProperties')
636 return 'CSSStyleDeclaration';
637 if (name$ === 'MouseWheelEvent')
638 return 'WheelEvent';
639 return name$;
640 };
641
642 $.set$length = function(receiver, newLength) {
643 if ($.isJsArray(receiver)) {
644 $.checkNull(newLength);
645 if (newLength < 0)
646 throw $.$$throw($.IndexOutOfRangeException$(newLength));
647 $.checkGrowable(receiver, 'set length');
648 receiver.length = newLength;
649 } else
650 receiver.set$length(newLength);
651 return newLength;
652 };
653
654 $.ioore = function(index) {
655 throw $.$$throw($.IndexOutOfRangeException$(index));
656 };
657
658 $.typeNameInFirefox = function(obj) {
659 var name$ = $.constructorNameFallback(obj);
660 if (name$ === 'Window')
661 return 'DOMWindow';
662 if (name$ === 'Document')
663 return 'HTMLDocument';
664 if (name$ === 'XMLDocument')
665 return 'Document';
666 if (name$ === 'WorkerMessageEvent')
667 return 'MessageEvent';
668 if (name$ === 'DragEvent')
669 return 'MouseEvent';
670 if (name$ === 'DataTransfer')
671 return 'Clipboard';
672 if (name$ === 'MouseScrollEvent')
673 return 'WheelEvent';
674 if (name$ === 'OfflineResourceList')
675 return 'DOMApplicationCache';
676 return name$;
677 };
678
679 $.constructorNameFallback = function(object) {
680 if (object == null)
681 return 'Null';
682 var constructor$ = object.constructor;
683 if ($.identical(typeof(constructor$), 'function')) {
684 var name$ = constructor$.name;
685 if (typeof name$ === 'string')
686 var t1 = !$.identical(name$, '') && !$.identical(name$, 'Object') && !$.id entical(name$, 'Function.prototype');
687 else
688 t1 = false;
689 if (t1)
690 return name$;
691 }
692 var string = Object.prototype.toString.call(object);
693 return string.substring(8, string.length - 1);
694 };
695
696 $.gt$slow = function(a, b) {
697 if ($.checkNumbers(a, b))
698 return a > b;
699 return a.operator$gt$1(b);
700 };
701
702 $.toStringWrapper = function() {
703 return $.toString(this.dartException);
704 };
705
706 $.gtB = function(a, b) {
707 return typeof a === 'number' && typeof b === 'number' ? a > b : $.identical($. gt$slow(a, b), true);
708 };
709
710 $.NullPointerException$ = function(functionName, arguments$) {
711 return new $.NullPointerException(functionName, arguments$);
712 };
713
714 $.removeLast = function(receiver) {
715 if ($.isJsArray(receiver)) {
716 $.checkGrowable(receiver, 'removeLast');
717 if ($.eqB($.get$length(receiver), 0))
718 throw $.$$throw($.IndexOutOfRangeException$(-1));
719 return receiver.pop();
720 }
721 return receiver.removeLast$0();
722 };
723
724 $.NoMoreElementsException$ = function() {
725 return new $.NoMoreElementsException();
726 };
727
728 $.ltB = function(a, b) {
729 return typeof a === 'number' && typeof b === 'number' ? a < b : $.identical($. lt$slow(a, b), true);
730 };
731
732 $.Primitives_objectHashCode = function(object) {
733 var hash = object.$identityHash;
734 if (hash == null) {
735 hash = $.add($.Primitives_hashCodeSeed, 1);
736 $.Primitives_hashCodeSeed = hash;
737 object.$identityHash = hash;
738 }
739 return hash;
740 };
741
742 $.add$slow = function(a, b) {
743 if ($.checkNumbers(a, b))
744 return a + b;
745 return a.operator$add$1(b);
746 };
747
748 $.Primitives_newList = function(length$) {
749 if (length$ == null)
750 return new Array();
751 if (!(typeof length$ === 'number' && Math.floor(length$) === length$) || lengt h$ < 0)
752 throw $.$$throw($.ArgumentError$(length$));
753 var result = new Array(length$);
754 result.fixed$length = true;
755 return result;
756 };
757
758 $.main = function() {
759 var a = $.makeA();
760 var c = $.C$($.id(1), $.id(2));
761 $.id($.id(a).get$toto());
762 $.id(a).set$titi(499);
763 $.id(c).foo$0();
764 };
765
766 $.StringBuffer_StringBuffer = function(content$) {
767 return $.StringBufferImpl$(content$);
768 };
769
770 $.$$throw = function(ex) {
771 if (ex == null)
772 ex = $.CTC;
773 var jsError = new Error();
774 jsError.name = ex;
775 jsError.description = ex;
776 jsError.dartException = ex;
777 jsError.toString = $.toStringWrapper.call$0;
778 throw jsError;
779 };
780
781 $.typeNameInChrome = function(obj) {
782 var name$ = obj.constructor.name;
783 if (name$ === 'Window')
784 return 'DOMWindow';
785 if (name$ === 'CanvasPixelArray')
786 return 'Uint8ClampedArray';
787 if (name$ === 'WebKitMutationObserver')
788 return 'MutationObserver';
789 return name$;
790 };
791
792 $.isEmpty = function(receiver) {
793 if (typeof receiver === 'string' || $.isJsArray(receiver))
794 return receiver.length === 0;
795 return receiver.isEmpty$0();
796 };
797
798 $.StringImplementation_concatAll = function(strings) {
799 return $.stringJoinUnchecked($.StringImplementation__toJsStringArray(strings), '');
800 };
801
802 $.ceil = function(receiver) {
803 return Math.ceil(receiver);
804 };
805
806 $.getTypeNameOf = function(obj) {
807 if ($._getTypeNameOf == null)
808 $._getTypeNameOf = $.getFunctionForTypeNameOf();
809 return $._getTypeNameOf.call$1(obj);
810 };
811
812 $.iterator = function(receiver) {
813 if ($.isJsArray(receiver))
814 return $.ListIterator$(receiver);
815 return receiver.iterator$0();
816 };
817
818 $.StringImplementation__toJsStringArray = function(strings) {
819 if (typeof strings !== 'object' || strings === null || (strings.constructor != = Array || !!strings.immutable$list) && !strings.is$JavaScriptIndexingBehavior)
820 return $.StringImplementation__toJsStringArray$bailout(1, strings);
821 $.checkNull(strings);
822 var length$ = strings.length;
823 if ($.isJsArray(strings)) {
824 for (var i = 0; i < length$; ++i) {
825 if (i >= strings.length)
826 throw $.ioore(i);
827 var string = strings[i];
828 $.checkNull(string);
829 if (!(typeof string === 'string'))
830 throw $.$$throw($.ArgumentError$(string));
831 }
832 var array = strings;
833 } else {
834 array = $.ListImplementation_List(length$);
835 for (i = 0; i < length$; ++i) {
836 if (i >= strings.length)
837 throw $.ioore(i);
838 string = strings[i];
839 $.checkNull(string);
840 if (!(typeof string === 'string'))
841 throw $.$$throw($.ArgumentError$(string));
842 array[i] = string;
843 }
844 }
845 return array;
846 };
847
848 $.IndexOutOfRangeException$ = function(_value) {
849 return new $.IndexOutOfRangeException(_value);
850 };
851
852 $.StringImplementation__toJsStringArray$bailout = function(state0, strings) {
853 $.checkNull(strings);
854 var length$ = $.get$length(strings);
855 if ($.isJsArray(strings)) {
856 for (var i = 0; $.ltB(i, length$); ++i) {
857 var string = $.index(strings, i);
858 $.checkNull(string);
859 if (!(typeof string === 'string'))
860 throw $.$$throw($.ArgumentError$(string));
861 }
862 var array = strings;
863 } else {
864 array = $.ListImplementation_List(length$);
865 for (i = 0; $.ltB(i, length$); ++i) {
866 string = $.index(strings, i);
867 $.checkNull(string);
868 if (!(typeof string === 'string'))
869 throw $.$$throw($.ArgumentError$(string));
870 if (i >= array.length)
871 throw $.ioore(i);
872 array[i] = string;
873 }
874 }
875 return array;
876 };
877
878 $.dynamicBind.call$4 = $.dynamicBind;
879 $.dynamicBind.$name = "dynamicBind";
880 $.typeNameInOpera.call$1 = $.typeNameInOpera;
881 $.typeNameInOpera.$name = "typeNameInOpera";
882 $.typeNameInIE.call$1 = $.typeNameInIE;
883 $.typeNameInIE.$name = "typeNameInIE";
884 $.typeNameInChrome.call$1 = $.typeNameInChrome;
885 $.typeNameInChrome.$name = "typeNameInChrome";
886 $.toStringWrapper.call$0 = $.toStringWrapper;
887 $.toStringWrapper.$name = "toStringWrapper";
888 $.typeNameInSafari.call$1 = $.typeNameInSafari;
889 $.typeNameInSafari.$name = "typeNameInSafari";
890 $.typeNameInFirefox.call$1 = $.typeNameInFirefox;
891 $.typeNameInFirefox.$name = "typeNameInFirefox";
892 $.constructorNameFallback.call$1 = $.constructorNameFallback;
893 $.constructorNameFallback.$name = "constructorNameFallback";
894 Isolate.$finishClasses($$);
895 $$ = {};
896 Isolate.makeConstantList = function(list) {
897 list.immutable$list = true;
898 list.fixed$length = true;
899 return list;
900 };
901 $.CTC0 = Isolate.makeConstantList([]);
902 $.CTC2 = null;
903 $.CTC = new Isolate.$isolateProperties.NullPointerException(null, Isolate.$isola teProperties.CTC0);
904 $.CTC1 = new Isolate.$isolateProperties.Object();
905 $.Primitives_DOLLAR_CHAR_VALUE = 36;
906 $._getTypeNameOf = null;
907 $.Primitives_hashCodeSeed = 0;
908 var $ = null;
909 Isolate.$finishClasses($$);
910 $$ = {};
911 Isolate = Isolate.$finishIsolateConstructor(Isolate);
912 var $ = new Isolate();
913 $.$defineNativeClass = function(cls, desc) {
914 var fields = desc[''] || [];
915 var generateGetterSetter = function() {
916 throw 'Internal Error: no dynamic generation of getters and setters allowed';
917 };
918 for (var i = 0; i < fields.length; i++) {
919 generateGetterSetter(fields[i], desc);
920 }
921 var hasOwnProperty = Object.prototype.hasOwnProperty;
922 for (var method in desc) {
923 if (method !== '') {
924 if (hasOwnProperty.call(desc, method)) {
925 $.dynamicFunction(method)[cls] = desc[method];
926 }
927 }
928 }
929 };
930
931 (function(table) {
932 for (var key in table) {
933 $.defineProperty(Object.prototype, key, table[key]);
934 }
935 })({
936 toString$0: function() { return $.toStringForNativeObject(this); },
937 hashCode$0: function() { return $.hashCodeForNativeObject(this); }
938 });
939
940 $.$defineNativeClass('B', {
941 set$titi: function(v) { this.titi = v; },
942 get$toto: function() { return this.toto; },
943 foo$0: function() {
944 return 499;
945 }
946 });
947
948 // 1 dynamic classes.
949 // 1 classes
950 // 0 !leaf
951
952
953 //
954 // BEGIN invoke [main].
955 //
956 if (typeof document != 'undefined' && document.readyState != 'complete') {
957 document.addEventListener('readystatechange', function () {
958 if (document.readyState == 'complete') {
959 if (typeof dartMainRunner == 'function') {
960 dartMainRunner(function() { $.main(); });
961 } else {
962 $.main();
963 }
964 }
965 }, false);
966 } else {
967 if (typeof dartMainRunner == 'function') {
968 dartMainRunner(function() { $.main(); });
969 } else {
970 $.main();
971 }
972 }
973 //
974 // END invoke [main].
975 //
976
977 function init() {
978 Isolate.$isolateProperties = {};
979 Isolate.$defineClass = function(cls, constructor, prototype) {
980 constructor.prototype = prototype;
981 return constructor;
982 };
983 var supportsProto = !!{}.__proto__;
984 Isolate.$pendingClasses = {};
985 Isolate.$finishClasses = function(collectedClasses) {
986 var hasOwnProperty = Object.prototype.hasOwnProperty;
987 for (var cls in collectedClasses) {
988 if (hasOwnProperty.call(collectedClasses, cls)) {
989 var desc = collectedClasses[cls];
990 Isolate.$isolateProperties[cls] = Isolate.$defineClass(cls, desc[''], desc );
991 if (desc['super'] !== "") Isolate.$pendingClasses[cls] = desc['super'];
992 }
993 }
994 var pendingClasses = Isolate.$pendingClasses;
995 Isolate.$pendingClasses = {};
996 var finishedClasses = {};
997 function finishClass(cls) {
998 var hasOwnProperty = Object.prototype.hasOwnProperty;
999 if (hasOwnProperty.call(finishedClasses, cls)) return;
1000 finishedClasses[cls] = true;
1001 var superclass = pendingClasses[cls];
1002 if (!superclass) return;
1003 finishClass(superclass);
1004 var constructor = Isolate.$isolateProperties[cls];
1005 var superConstructor = Isolate.$isolateProperties[superclass];
1006 var prototype = constructor.prototype;
1007 if (supportsProto) {
1008 prototype.__proto__ = superConstructor.prototype;
1009 prototype.constructor = constructor;
1010 } else {
1011 function tmp() {};
1012 tmp.prototype = superConstructor.prototype;
1013 var newPrototype = new tmp();
1014 constructor.prototype = newPrototype;
1015 newPrototype.constructor = constructor;
1016 for (var member in prototype) {
1017 if (member == '' || member == 'super') continue;
1018 if (hasOwnProperty.call(prototype, member)) {
1019 newPrototype[member] = prototype[member];
1020 }
1021 }
1022 }
1023 }
1024 for (var cls in pendingClasses) finishClass(cls);
1025 };
1026 Isolate.$finishIsolateConstructor = function(oldIsolate) {
1027 var isolateProperties = oldIsolate.$isolateProperties;
1028 function Isolate() {
1029 for (var staticName in isolateProperties) {
1030 if (Object.prototype.hasOwnProperty.call(isolateProperties, staticName)) {
1031 this[staticName] = isolateProperties[staticName];
1032 }
1033 }
1034 // Use the newly created object as prototype. In Chrome this creates a
1035 // hidden class for the object and makes sure it is fast to access.
1036 function ForceEfficientMap() {}
1037 ForceEfficientMap.prototype = this;
1038 new ForceEfficientMap;
1039 }
1040 Isolate.prototype = oldIsolate.prototype;
1041 Isolate.prototype.constructor = Isolate;
1042 Isolate.$isolateProperties = isolateProperties;
1043 return Isolate;
1044 };
1045 }
1046
1047 //@ sourceMappingURL=comp.js.map
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698