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

Side by Side Diff: frog/minfrog

Issue 9146001: continued cleanup of initialization and Value (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: touchups to comments Created 8 years, 11 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
OLDNEW
1 #!/usr/bin/env node 1 #!/usr/bin/env node
2 // ********** Library dart:core ************** 2 // ********** Library dart:core **************
3 // ********** Natives dart:core ************** 3 // ********** Natives dart:core **************
4 function $throw(e) { 4 function $throw(e) {
5 // If e is not a value, we can use V8's captureStackTrace utility method. 5 // If e is not a value, we can use V8's captureStackTrace utility method.
6 // TODO(jmesserly): capture the stack trace on other JS engines. 6 // TODO(jmesserly): capture the stack trace on other JS engines.
7 if (e && (typeof e == 'object') && Error.captureStackTrace) { 7 if (e && (typeof e == 'object') && Error.captureStackTrace) {
8 // TODO(jmesserly): this will clobber the e.stack property 8 // TODO(jmesserly): this will clobber the e.stack property
9 Error.captureStackTrace(e, $throw); 9 Error.captureStackTrace(e, $throw);
10 } 10 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 Object.prototype.noSuchMethod = function(name, args) { 76 Object.prototype.noSuchMethod = function(name, args) {
77 $throw(new NoSuchMethodException(this, name, args)); 77 $throw(new NoSuchMethodException(this, name, args));
78 } 78 }
79 Object.prototype._checkExtends$0 = function() { 79 Object.prototype._checkExtends$0 = function() {
80 return this.noSuchMethod("_checkExtends", []); 80 return this.noSuchMethod("_checkExtends", []);
81 }; 81 };
82 Object.prototype._checkNonStatic$1 = function($0) { 82 Object.prototype._checkNonStatic$1 = function($0) {
83 return this.noSuchMethod("_checkNonStatic", [$0]); 83 return this.noSuchMethod("_checkNonStatic", [$0]);
84 }; 84 };
85 Object.prototype._evalConstConstructor$2 = function($0, $1) {
86 return this.noSuchMethod("_evalConstConstructor", [$0, $1]);
87 };
85 Object.prototype._get$3 = function($0, $1, $2) { 88 Object.prototype._get$3 = function($0, $1, $2) {
86 return this.noSuchMethod("_get", [$0, $1, $2]); 89 return this.noSuchMethod("_get", [$0, $1, $2]);
87 }; 90 };
88 Object.prototype._get$3$isDynamic = function($0, $1, $2, isDynamic) { 91 Object.prototype._get$3$isDynamic = function($0, $1, $2, isDynamic) {
89 return this.noSuchMethod("_get", [$0, $1, $2, isDynamic]); 92 return this.noSuchMethod("_get", [$0, $1, $2, isDynamic]);
90 }; 93 };
91 Object.prototype._get$4 = function($0, $1, $2, $3) { 94 Object.prototype._get$4 = function($0, $1, $2, $3) {
92 return this.noSuchMethod("_get", [$0, $1, $2, $3]); 95 return this.noSuchMethod("_get", [$0, $1, $2, $3]);
93 }; 96 };
94 Object.prototype._set$4 = function($0, $1, $2, $3) { 97 Object.prototype._set$4 = function($0, $1, $2, $3) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 }; 153 };
151 Object.prototype.end$0 = function() { 154 Object.prototype.end$0 = function() {
152 return this.noSuchMethod("end", []); 155 return this.noSuchMethod("end", []);
153 }; 156 };
154 Object.prototype.endsWith$1 = function($0) { 157 Object.prototype.endsWith$1 = function($0) {
155 return this.noSuchMethod("endsWith", [$0]); 158 return this.noSuchMethod("endsWith", [$0]);
156 }; 159 };
157 Object.prototype.ensureSubtypeOf$3 = function($0, $1, $2) { 160 Object.prototype.ensureSubtypeOf$3 = function($0, $1, $2) {
158 return this.noSuchMethod("ensureSubtypeOf", [$0, $1, $2]); 161 return this.noSuchMethod("ensureSubtypeOf", [$0, $1, $2]);
159 }; 162 };
163 Object.prototype.evalBody$2 = function($0, $1) {
164 return this.noSuchMethod("evalBody", [$0, $1]);
165 };
160 Object.prototype.every$1 = function($0) { 166 Object.prototype.every$1 = function($0) {
161 return this.noSuchMethod("every", [$0]); 167 return this.noSuchMethod("every", [$0]);
162 }; 168 };
163 Object.prototype.filter$1 = function($0) { 169 Object.prototype.filter$1 = function($0) {
164 return this.noSuchMethod("filter", [$0]); 170 return this.noSuchMethod("filter", [$0]);
165 }; 171 };
166 Object.prototype.findTypeByName$1 = function($0) { 172 Object.prototype.findTypeByName$1 = function($0) {
167 return this.noSuchMethod("findTypeByName", [$0]); 173 return this.noSuchMethod("findTypeByName", [$0]);
168 }; 174 };
169 Object.prototype.forEach$1 = function($0) { 175 Object.prototype.forEach$1 = function($0) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 }; 213 };
208 Object.prototype.hasNext$0 = function() { 214 Object.prototype.hasNext$0 = function() {
209 return this.noSuchMethod("hasNext", []); 215 return this.noSuchMethod("hasNext", []);
210 }; 216 };
211 Object.prototype.hashCode$0 = function() { 217 Object.prototype.hashCode$0 = function() {
212 return this.noSuchMethod("hashCode", []); 218 return this.noSuchMethod("hashCode", []);
213 }; 219 };
214 Object.prototype.indexOf$1 = function($0) { 220 Object.prototype.indexOf$1 = function($0) {
215 return this.noSuchMethod("indexOf", [$0]); 221 return this.noSuchMethod("indexOf", [$0]);
216 }; 222 };
223 Object.prototype.initFields$0 = function() {
224 return this.noSuchMethod("initFields", []);
225 };
217 Object.prototype.instanceOf$3$isTrue$forceCheck = function($0, $1, $2, isTrue, f orceCheck) { 226 Object.prototype.instanceOf$3$isTrue$forceCheck = function($0, $1, $2, isTrue, f orceCheck) {
218 return this.noSuchMethod("instanceOf", [$0, $1, $2, isTrue, forceCheck]); 227 return this.noSuchMethod("instanceOf", [$0, $1, $2, isTrue, forceCheck]);
219 }; 228 };
220 Object.prototype.instanceOf$4 = function($0, $1, $2, $3) { 229 Object.prototype.instanceOf$4 = function($0, $1, $2, $3) {
221 return this.noSuchMethod("instanceOf", [$0, $1, $2, $3]); 230 return this.noSuchMethod("instanceOf", [$0, $1, $2, $3]);
222 }; 231 };
223 Object.prototype.invoke$4 = function($0, $1, $2, $3) { 232 Object.prototype.invoke$4 = function($0, $1, $2, $3) {
224 return this.noSuchMethod("invoke", [$0, $1, $2, $3]); 233 return this.noSuchMethod("invoke", [$0, $1, $2, $3]);
225 }; 234 };
226 Object.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { 235 Object.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 }; 306 };
298 Object.prototype.startsWith$1 = function($0) { 307 Object.prototype.startsWith$1 = function($0) {
299 return this.noSuchMethod("startsWith", [$0]); 308 return this.noSuchMethod("startsWith", [$0]);
300 }; 309 };
301 Object.prototype.substring$1 = function($0) { 310 Object.prototype.substring$1 = function($0) {
302 return this.noSuchMethod("substring", [$0]); 311 return this.noSuchMethod("substring", [$0]);
303 }; 312 };
304 Object.prototype.substring$2 = function($0, $1) { 313 Object.prototype.substring$2 = function($0, $1) {
305 return this.noSuchMethod("substring", [$0, $1]); 314 return this.noSuchMethod("substring", [$0, $1]);
306 }; 315 };
307 Object.prototype.toDouble$0 = function() {
308 return this.noSuchMethod("toDouble", []);
309 };
310 Object.prototype.toInt$0 = function() {
311 return this.noSuchMethod("toInt", []);
312 };
313 Object.prototype.toRadixString$1 = function($0) { 316 Object.prototype.toRadixString$1 = function($0) {
314 return this.noSuchMethod("toRadixString", [$0]); 317 return this.noSuchMethod("toRadixString", [$0]);
315 }; 318 };
316 Object.prototype.toString$0 = function() { 319 Object.prototype.toString$0 = function() {
317 return this.toString(); 320 return this.toString();
318 }; 321 };
322 Object.prototype.unop$3 = function($0, $1, $2) {
323 return this.noSuchMethod("unop", [$0, $1, $2]);
324 };
319 Object.prototype.visit$1 = function($0) { 325 Object.prototype.visit$1 = function($0) {
320 return this.noSuchMethod("visit", [$0]); 326 return this.noSuchMethod("visit", [$0]);
321 }; 327 };
322 Object.prototype.visitBinaryExpression$1 = function($0) { 328 Object.prototype.visitBinaryExpression$1 = function($0) {
323 return this.noSuchMethod("visitBinaryExpression", [$0]); 329 return this.noSuchMethod("visitBinaryExpression", [$0]);
324 }; 330 };
325 Object.prototype.visitPostfixExpression$1 = function($0) { 331 Object.prototype.visitPostfixExpression$1 = function($0) {
326 return this.noSuchMethod("visitPostfixExpression", [$0]); 332 return this.noSuchMethod("visitPostfixExpression", [$0]);
327 }; 333 };
328 Object.prototype.visitSources$0 = function() { 334 Object.prototype.visitSources$0 = function() {
329 return this.noSuchMethod("visitSources", []); 335 return this.noSuchMethod("visitSources", []);
330 }; 336 };
331 Object.prototype.writeDefinition$2 = function($0, $1) { 337 Object.prototype.writeDefinition$2 = function($0, $1) {
332 return this.noSuchMethod("writeDefinition", [$0, $1]); 338 return this.noSuchMethod("writeDefinition", [$0, $1]);
333 }; 339 };
334 // ********** Code for Clock ************** 340 // ********** Code for Clock **************
335 function Clock() {} 341 function Clock() {}
336 Clock.now = function() { 342 Clock.now = function() {
337 return new Date().getTime(); 343 return new Date().getTime();
338 } 344 }
339 Clock.frequency = function() { 345 Clock.frequency = function() {
340 return (1000); 346 return (1000);
341 } 347 }
342 // ********** Code for IllegalAccessException ************** 348 // ********** Code for IllegalAccessException **************
343 function IllegalAccessException() { 349 function IllegalAccessException() {
344 // Initializers done 350
345 } 351 }
346 IllegalAccessException.prototype.toString = function() { 352 IllegalAccessException.prototype.toString = function() {
347 return "Attempt to modify an immutable object"; 353 return "Attempt to modify an immutable object";
348 } 354 }
349 IllegalAccessException.prototype.toString$0 = IllegalAccessException.prototype.t oString; 355 IllegalAccessException.prototype.toString$0 = IllegalAccessException.prototype.t oString;
350 // ********** Code for NoSuchMethodException ************** 356 // ********** Code for NoSuchMethodException **************
351 function NoSuchMethodException(_receiver, _functionName, _arguments) { 357 function NoSuchMethodException(_receiver, _functionName, _arguments) {
352 this._receiver = _receiver; 358 this._receiver = _receiver;
353 this._functionName = _functionName; 359 this._functionName = _functionName;
354 this._arguments = _arguments; 360 this._arguments = _arguments;
355 // Initializers done
356 } 361 }
357 NoSuchMethodException.prototype.toString = function() { 362 NoSuchMethodException.prototype.toString = function() {
358 var sb = new StringBufferImpl(""); 363 var sb = new StringBufferImpl("");
359 for (var i = (0); 364 for (var i = (0);
360 i < this._arguments.get$length(); i++) { 365 i < this._arguments.get$length(); i++) {
361 if (i > (0)) { 366 if (i > (0)) {
362 sb.add(", "); 367 sb.add(", ");
363 } 368 }
364 sb.add(this._arguments.$index(i)); 369 sb.add(this._arguments.$index(i));
365 } 370 }
366 sb.add("]"); 371 sb.add("]");
367 return ("NoSuchMethodException - receiver: '" + this._receiver + "' ") + ("fun ction name: '" + this._functionName + "' arguments: [" + sb + "]"); 372 return ("NoSuchMethodException - receiver: '" + this._receiver + "' ") + ("fun ction name: '" + this._functionName + "' arguments: [" + sb + "]");
368 } 373 }
369 NoSuchMethodException.prototype.toString$0 = NoSuchMethodException.prototype.toS tring; 374 NoSuchMethodException.prototype.toString$0 = NoSuchMethodException.prototype.toS tring;
370 // ********** Code for ClosureArgumentMismatchException ************** 375 // ********** Code for ClosureArgumentMismatchException **************
371 function ClosureArgumentMismatchException() { 376 function ClosureArgumentMismatchException() {
372 // Initializers done 377
373 } 378 }
374 ClosureArgumentMismatchException.prototype.toString = function() { 379 ClosureArgumentMismatchException.prototype.toString = function() {
375 return "Closure argument mismatch"; 380 return "Closure argument mismatch";
376 } 381 }
377 ClosureArgumentMismatchException.prototype.toString$0 = ClosureArgumentMismatchE xception.prototype.toString; 382 ClosureArgumentMismatchException.prototype.toString$0 = ClosureArgumentMismatchE xception.prototype.toString;
378 // ********** Code for ObjectNotClosureException ************** 383 // ********** Code for ObjectNotClosureException **************
379 function ObjectNotClosureException() { 384 function ObjectNotClosureException() {
380 // Initializers done 385
381 } 386 }
382 ObjectNotClosureException.prototype.toString = function() { 387 ObjectNotClosureException.prototype.toString = function() {
383 return "Object is not closure"; 388 return "Object is not closure";
384 } 389 }
385 ObjectNotClosureException.prototype.toString$0 = ObjectNotClosureException.proto type.toString; 390 ObjectNotClosureException.prototype.toString$0 = ObjectNotClosureException.proto type.toString;
386 // ********** Code for StackOverflowException ************** 391 // ********** Code for StackOverflowException **************
387 function StackOverflowException() { 392 function StackOverflowException() {
388 // Initializers done 393
389 } 394 }
390 StackOverflowException.prototype.toString = function() { 395 StackOverflowException.prototype.toString = function() {
391 return "Stack Overflow"; 396 return "Stack Overflow";
392 } 397 }
393 StackOverflowException.prototype.toString$0 = StackOverflowException.prototype.t oString; 398 StackOverflowException.prototype.toString$0 = StackOverflowException.prototype.t oString;
394 // ********** Code for BadNumberFormatException ************** 399 // ********** Code for BadNumberFormatException **************
395 function BadNumberFormatException(_s) { 400 function BadNumberFormatException(_s) {
396 this._s = _s; 401 this._s = _s;
397 // Initializers done
398 } 402 }
399 BadNumberFormatException.prototype.toString = function() { 403 BadNumberFormatException.prototype.toString = function() {
400 return ("BadNumberFormatException: '" + this._s + "'"); 404 return ("BadNumberFormatException: '" + this._s + "'");
401 } 405 }
402 BadNumberFormatException.prototype.toString$0 = BadNumberFormatException.prototy pe.toString; 406 BadNumberFormatException.prototype.toString$0 = BadNumberFormatException.prototy pe.toString;
403 // ********** Code for NullPointerException ************** 407 // ********** Code for NullPointerException **************
404 function NullPointerException() { 408 function NullPointerException() {
405 // Initializers done 409
406 } 410 }
407 NullPointerException.prototype.toString = function() { 411 NullPointerException.prototype.toString = function() {
408 return "NullPointerException"; 412 return "NullPointerException";
409 } 413 }
410 NullPointerException.prototype.toString$0 = NullPointerException.prototype.toStr ing; 414 NullPointerException.prototype.toString$0 = NullPointerException.prototype.toStr ing;
411 // ********** Code for NoMoreElementsException ************** 415 // ********** Code for NoMoreElementsException **************
412 function NoMoreElementsException() { 416 function NoMoreElementsException() {
413 // Initializers done 417
414 } 418 }
415 NoMoreElementsException.prototype.toString = function() { 419 NoMoreElementsException.prototype.toString = function() {
416 return "NoMoreElementsException"; 420 return "NoMoreElementsException";
417 } 421 }
418 NoMoreElementsException.prototype.toString$0 = NoMoreElementsException.prototype .toString; 422 NoMoreElementsException.prototype.toString$0 = NoMoreElementsException.prototype .toString;
419 // ********** Code for EmptyQueueException ************** 423 // ********** Code for EmptyQueueException **************
420 function EmptyQueueException() { 424 function EmptyQueueException() {
421 // Initializers done 425
422 } 426 }
423 EmptyQueueException.prototype.toString = function() { 427 EmptyQueueException.prototype.toString = function() {
424 return "EmptyQueueException"; 428 return "EmptyQueueException";
425 } 429 }
426 EmptyQueueException.prototype.toString$0 = EmptyQueueException.prototype.toStrin g; 430 EmptyQueueException.prototype.toString$0 = EmptyQueueException.prototype.toStrin g;
427 // ********** Code for dart_core_Function ************** 431 // ********** Code for dart_core_Function **************
428 Function.prototype.to$call$0 = function() { 432 Function.prototype.to$call$0 = function() {
429 this.call$0 = this._genStub(0); 433 this.call$0 = this._genStub(0);
430 this.to$call$0 = function() { return this.call$0; }; 434 this.to$call$0 = function() { return this.call$0; };
431 return this.call$0; 435 return this.call$0;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 ListFactory_Expression = ListFactory; 627 ListFactory_Expression = ListFactory;
624 ListFactory_K = ListFactory; 628 ListFactory_K = ListFactory;
625 ListFactory_dart_core_String = ListFactory; 629 ListFactory_dart_core_String = ListFactory;
626 ListFactory_V = ListFactory; 630 ListFactory_V = ListFactory;
627 ListFactory_Value = ListFactory; 631 ListFactory_Value = ListFactory;
628 ListFactory_int = ListFactory; 632 ListFactory_int = ListFactory;
629 // ********** Code for ListIterator ************** 633 // ********** Code for ListIterator **************
630 function ListIterator(array) { 634 function ListIterator(array) {
631 this._array = array; 635 this._array = array;
632 this._pos = (0); 636 this._pos = (0);
633 // Initializers done
634 } 637 }
635 ListIterator.prototype.hasNext = function() { 638 ListIterator.prototype.hasNext = function() {
636 return this._array.get$length() > this._pos; 639 return this._array.get$length() > this._pos;
637 } 640 }
638 ListIterator.prototype.next = function() { 641 ListIterator.prototype.next = function() {
639 if (!this.hasNext()) { 642 if (!this.hasNext()) {
640 $throw(const$7); 643 $throw(const$0005);
641 } 644 }
642 return this._array.$index(this._pos++); 645 return this._array.$index(this._pos++);
643 } 646 }
644 ListIterator.prototype.hasNext$0 = ListIterator.prototype.hasNext; 647 ListIterator.prototype.hasNext$0 = ListIterator.prototype.hasNext;
645 ListIterator.prototype.next$0 = ListIterator.prototype.next; 648 ListIterator.prototype.next$0 = ListIterator.prototype.next;
646 // ********** Code for ImmutableList ************** 649 // ********** Code for ImmutableList **************
647 /** Implements extends for Dart classes on JavaScript prototypes. */ 650 /** Implements extends for Dart classes on JavaScript prototypes. */
648 function $inherits(child, parent) { 651 function $inherits(child, parent) {
649 if (child.prototype.__proto__) { 652 if (child.prototype.__proto__) {
650 child.prototype.__proto__ = parent.prototype; 653 child.prototype.__proto__ = parent.prototype;
651 } else { 654 } else {
652 function tmp() {}; 655 function tmp() {};
653 tmp.prototype = parent.prototype; 656 tmp.prototype = parent.prototype;
654 child.prototype = new tmp(); 657 child.prototype = new tmp();
655 child.prototype.constructor = child; 658 child.prototype.constructor = child;
656 } 659 }
657 } 660 }
658 $inherits(ImmutableList, ListFactory_E); 661 $inherits(ImmutableList, ListFactory_E);
659 function ImmutableList(length) { 662 function ImmutableList(length) {
660 this._length = length; 663 this._length = length;
661 // Initializers done
662 Array.call(this, length); 664 Array.call(this, length);
663 } 665 }
664 ImmutableList.ImmutableList$from$factory = function(other) { 666 ImmutableList.ImmutableList$from$factory = function(other) {
665 var list = new ImmutableList(other.get$length()); 667 var list = new ImmutableList(other.get$length());
666 for (var i = (0); 668 for (var i = (0);
667 i < other.get$length(); i++) { 669 i < other.get$length(); i++) {
668 list._setindex(i, other.$index(i)); 670 list._setindex(i, other.$index(i));
669 } 671 }
670 return list; 672 return list;
671 } 673 }
672 ImmutableList.prototype.get$length = function() { 674 ImmutableList.prototype.get$length = function() {
673 return this._length; 675 return this._length;
674 } 676 }
675 ImmutableList.prototype.set$length = function(length) { 677 ImmutableList.prototype.set$length = function(length) {
676 $throw(const$126); 678 $throw(const$0007);
677 } 679 }
678 Object.defineProperty(ImmutableList.prototype, "length", { 680 Object.defineProperty(ImmutableList.prototype, "length", {
679 get: ImmutableList.prototype.get$length, 681 get: ImmutableList.prototype.get$length,
680 set: ImmutableList.prototype.set$length 682 set: ImmutableList.prototype.set$length
681 }); 683 });
682 ImmutableList.prototype._setindex = function(index, value) { 684 ImmutableList.prototype._setindex = function(index, value) {
683 return this[index] = value; 685 return this[index] = value;
684 } 686 }
685 ImmutableList.prototype.$setindex = function(index, value) { 687 ImmutableList.prototype.$setindex = function(index, value) {
686 $throw(const$126); 688 $throw(const$0007);
687 } 689 }
688 ImmutableList.prototype.sort = function(compare) { 690 ImmutableList.prototype.sort = function(compare) {
689 $throw(const$126); 691 $throw(const$0007);
690 } 692 }
691 ImmutableList.prototype.add = function(element) { 693 ImmutableList.prototype.add = function(element) {
692 $throw(const$126); 694 $throw(const$0007);
693 } 695 }
694 ImmutableList.prototype.addLast = function(element) { 696 ImmutableList.prototype.addLast = function(element) {
695 $throw(const$126); 697 $throw(const$0007);
696 } 698 }
697 ImmutableList.prototype.addAll = function(elements) { 699 ImmutableList.prototype.addAll = function(elements) {
698 $throw(const$126); 700 $throw(const$0007);
699 } 701 }
700 ImmutableList.prototype.clear = function() { 702 ImmutableList.prototype.clear = function() {
701 $throw(const$126); 703 $throw(const$0007);
702 } 704 }
703 ImmutableList.prototype.removeLast = function() { 705 ImmutableList.prototype.removeLast = function() {
704 $throw(const$126); 706 $throw(const$0007);
705 } 707 }
706 ImmutableList.prototype.toString = function() { 708 ImmutableList.prototype.toString = function() {
707 return ListFactory.ListFactory$from$factory(this).toString(); 709 return ListFactory.ListFactory$from$factory(this).toString();
708 } 710 }
709 ImmutableList.prototype.add$1 = ImmutableList.prototype.add; 711 ImmutableList.prototype.add$1 = ImmutableList.prototype.add;
710 ImmutableList.prototype.addAll$1 = ImmutableList.prototype.addAll; 712 ImmutableList.prototype.addAll$1 = ImmutableList.prototype.addAll;
711 ImmutableList.prototype.removeLast$0 = ImmutableList.prototype.removeLast; 713 ImmutableList.prototype.removeLast$0 = ImmutableList.prototype.removeLast;
712 ImmutableList.prototype.sort$1 = function($0) { 714 ImmutableList.prototype.sort$1 = function($0) {
713 return this.sort(to$call$2($0)); 715 return this.sort(to$call$2($0));
714 }; 716 };
715 ImmutableList.prototype.toString$0 = ImmutableList.prototype.toString; 717 ImmutableList.prototype.toString$0 = ImmutableList.prototype.toString;
716 // ********** Code for NumImplementation ************** 718 // ********** Code for NumImplementation **************
717 NumImplementation = Number; 719 NumImplementation = Number;
718 NumImplementation.prototype.isNaN = function() { 720 NumImplementation.prototype.isNaN = function() {
719 'use strict'; return isNaN(this); 721 'use strict'; return isNaN(this);
720 } 722 }
721 NumImplementation.prototype.isNegative = function() { 723 NumImplementation.prototype.isNegative = function() {
722 'use strict'; return this == 0 ? (1 / this) < 0 : this < 0; 724 'use strict'; return this == 0 ? (1 / this) < 0 : this < 0;
723 } 725 }
724 NumImplementation.prototype.hashCode = function() { 726 NumImplementation.prototype.hashCode = function() {
725 'use strict'; return this & 0x1FFFFFFF; 727 'use strict'; return this & 0x1FFFFFFF;
726 } 728 }
727 NumImplementation.prototype.toInt = function() {
728 'use strict';
729 if (isNaN(this)) $throw(new BadNumberFormatException("NaN"));
730 if ((this == Infinity) || (this == -Infinity)) {
731 $throw(new BadNumberFormatException("Infinity"));
732 }
733 var truncated = (this < 0) ? Math.ceil(this) : Math.floor(this);
734 if (truncated == -0.0) return 0;
735 return truncated;
736 }
737 NumImplementation.prototype.toDouble = function() { 729 NumImplementation.prototype.toDouble = function() {
738 'use strict'; return this + 0; 730 'use strict'; return this + 0;
739 } 731 }
740 NumImplementation.prototype.toRadixString = function(radix) { 732 NumImplementation.prototype.toRadixString = function(radix) {
741 'use strict'; return this.toString(radix) 733 'use strict'; return this.toString(radix)
742 } 734 }
743 NumImplementation.prototype.compareTo = function(other) { 735 NumImplementation.prototype.compareTo = function(other) {
744 var thisValue = this.toDouble(); 736 var thisValue = this.toDouble();
745 if (thisValue < other) { 737 if (thisValue < other) {
746 return (-1); 738 return (-1);
(...skipping 16 matching lines...) Expand all
763 return (0); 755 return (0);
764 } 756 }
765 return (1); 757 return (1);
766 } 758 }
767 else { 759 else {
768 return (-1); 760 return (-1);
769 } 761 }
770 } 762 }
771 NumImplementation.prototype.compareTo$1 = NumImplementation.prototype.compareTo; 763 NumImplementation.prototype.compareTo$1 = NumImplementation.prototype.compareTo;
772 NumImplementation.prototype.hashCode$0 = NumImplementation.prototype.hashCode; 764 NumImplementation.prototype.hashCode$0 = NumImplementation.prototype.hashCode;
773 NumImplementation.prototype.toDouble$0 = NumImplementation.prototype.toDouble;
774 NumImplementation.prototype.toInt$0 = NumImplementation.prototype.toInt;
775 NumImplementation.prototype.toRadixString$1 = NumImplementation.prototype.toRadi xString; 765 NumImplementation.prototype.toRadixString$1 = NumImplementation.prototype.toRadi xString;
776 // ********** Code for HashMapImplementation ************** 766 // ********** Code for HashMapImplementation **************
777 function HashMapImplementation() { 767 function HashMapImplementation() {
778 // Initializers done
779 this._numberOfEntries = (0); 768 this._numberOfEntries = (0);
780 this._numberOfDeleted = (0); 769 this._numberOfDeleted = (0);
781 this._loadLimit = HashMapImplementation._computeLoadLimit((8)); 770 this._loadLimit = HashMapImplementation._computeLoadLimit((8));
782 this._keys = new Array((8)); 771 this._keys = new Array((8));
783 this._values = new Array((8)); 772 this._values = new Array((8));
784 } 773 }
785 HashMapImplementation.HashMapImplementation$from$factory = function(other) { 774 HashMapImplementation.HashMapImplementation$from$factory = function(other) {
786 var result = new HashMapImplementation_K$V(); 775 var result = new HashMapImplementation_K$V();
787 other.forEach((function (key, value) { 776 other.forEach((function (key, value) {
788 result.$setindex(key, value); 777 result.$setindex(key, value);
(...skipping 17 matching lines...) Expand all
806 var insertionIndex = (-1); 795 var insertionIndex = (-1);
807 while (true) { 796 while (true) {
808 var existingKey = this._keys.$index(hash); 797 var existingKey = this._keys.$index(hash);
809 if (existingKey == null) { 798 if (existingKey == null) {
810 if (insertionIndex < (0)) return hash; 799 if (insertionIndex < (0)) return hash;
811 return insertionIndex; 800 return insertionIndex;
812 } 801 }
813 else if ($eq(existingKey, key)) { 802 else if ($eq(existingKey, key)) {
814 return hash; 803 return hash;
815 } 804 }
816 else if ((insertionIndex < (0)) && (const$2 == existingKey)) { 805 else if ((insertionIndex < (0)) && (const$0001 == existingKey)) {
817 insertionIndex = hash; 806 insertionIndex = hash;
818 } 807 }
819 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.g et$length()); 808 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.g et$length());
820 } 809 }
821 } 810 }
822 HashMapImplementation.prototype._probeForLookup = function(key) { 811 HashMapImplementation.prototype._probeForLookup = function(key) {
823 var hash = HashMapImplementation._firstProbe(key.hashCode$0(), this._keys.get$ length()); 812 var hash = HashMapImplementation._firstProbe(key.hashCode$0(), this._keys.get$ length());
824 var numberOfProbes = (1); 813 var numberOfProbes = (1);
825 var initialHash = hash; 814 var initialHash = hash;
826 while (true) { 815 while (true) {
(...skipping 22 matching lines...) Expand all
849 HashMapImplementation.prototype._grow = function(newCapacity) { 838 HashMapImplementation.prototype._grow = function(newCapacity) {
850 var capacity = this._keys.get$length(); 839 var capacity = this._keys.get$length();
851 this._loadLimit = HashMapImplementation._computeLoadLimit(newCapacity); 840 this._loadLimit = HashMapImplementation._computeLoadLimit(newCapacity);
852 var oldKeys = this._keys; 841 var oldKeys = this._keys;
853 var oldValues = this._values; 842 var oldValues = this._values;
854 this._keys = new Array(newCapacity); 843 this._keys = new Array(newCapacity);
855 this._values = new Array(newCapacity); 844 this._values = new Array(newCapacity);
856 for (var i = (0); 845 for (var i = (0);
857 i < capacity; i++) { 846 i < capacity; i++) {
858 var key = oldKeys.$index(i); 847 var key = oldKeys.$index(i);
859 if (key == null || key == const$2) { 848 if (key == null || key == const$0001) {
860 continue; 849 continue;
861 } 850 }
862 var value = oldValues.$index(i); 851 var value = oldValues.$index(i);
863 var newIndex = this._probeForAdding(key); 852 var newIndex = this._probeForAdding(key);
864 this._keys.$setindex(newIndex, key); 853 this._keys.$setindex(newIndex, key);
865 this._values.$setindex(newIndex, value); 854 this._values.$setindex(newIndex, value);
866 } 855 }
867 this._numberOfDeleted = (0); 856 this._numberOfDeleted = (0);
868 } 857 }
869 HashMapImplementation.prototype.$setindex = function(key, value) { 858 HashMapImplementation.prototype.$setindex = function(key, value) {
870 this._ensureCapacity(); 859 this._ensureCapacity();
871 var index = this._probeForAdding(key); 860 var index = this._probeForAdding(key);
872 if ((this._keys.$index(index) == null) || (this._keys.$index(index) == const$2 )) { 861 if ((this._keys.$index(index) == null) || (this._keys.$index(index) == const$0 001)) {
873 this._numberOfEntries++; 862 this._numberOfEntries++;
874 } 863 }
875 this._keys.$setindex(index, key); 864 this._keys.$setindex(index, key);
876 this._values.$setindex(index, value); 865 this._values.$setindex(index, value);
877 } 866 }
878 HashMapImplementation.prototype.$index = function(key) { 867 HashMapImplementation.prototype.$index = function(key) {
879 var index = this._probeForLookup(key); 868 var index = this._probeForLookup(key);
880 if (index < (0)) return null; 869 if (index < (0)) return null;
881 return this._values.$index(index); 870 return this._values.$index(index);
882 } 871 }
883 HashMapImplementation.prototype.putIfAbsent = function(key, ifAbsent) { 872 HashMapImplementation.prototype.putIfAbsent = function(key, ifAbsent) {
884 var index = this._probeForLookup(key); 873 var index = this._probeForLookup(key);
885 if (index >= (0)) return this._values.$index(index); 874 if (index >= (0)) return this._values.$index(index);
886 var value = ifAbsent(); 875 var value = ifAbsent();
887 this.$setindex(key, value); 876 this.$setindex(key, value);
888 return value; 877 return value;
889 } 878 }
890 HashMapImplementation.prototype.remove = function(key) { 879 HashMapImplementation.prototype.remove = function(key) {
891 var index = this._probeForLookup(key); 880 var index = this._probeForLookup(key);
892 if (index >= (0)) { 881 if (index >= (0)) {
893 this._numberOfEntries--; 882 this._numberOfEntries--;
894 var value = this._values.$index(index); 883 var value = this._values.$index(index);
895 this._values.$setindex(index); 884 this._values.$setindex(index);
896 this._keys.$setindex(index, const$2); 885 this._keys.$setindex(index, const$0001);
897 this._numberOfDeleted++; 886 this._numberOfDeleted++;
898 return value; 887 return value;
899 } 888 }
900 return null; 889 return null;
901 } 890 }
902 HashMapImplementation.prototype.isEmpty = function() { 891 HashMapImplementation.prototype.isEmpty = function() {
903 return this._numberOfEntries == (0); 892 return this._numberOfEntries == (0);
904 } 893 }
905 HashMapImplementation.prototype.get$length = function() { 894 HashMapImplementation.prototype.get$length = function() {
906 return this._numberOfEntries; 895 return this._numberOfEntries;
907 } 896 }
908 HashMapImplementation.prototype.forEach = function(f) { 897 HashMapImplementation.prototype.forEach = function(f) {
909 var length = this._keys.get$length(); 898 var length = this._keys.get$length();
910 for (var i = (0); 899 for (var i = (0);
911 i < length; i++) { 900 i < length; i++) {
912 if ((this._keys.$index(i) != null) && (this._keys.$index(i) != const$2)) { 901 if ((this._keys.$index(i) != null) && (this._keys.$index(i) != const$0001)) {
913 f(this._keys.$index(i), this._values.$index(i)); 902 f(this._keys.$index(i), this._values.$index(i));
914 } 903 }
915 } 904 }
916 } 905 }
917 HashMapImplementation.prototype.getKeys = function() { 906 HashMapImplementation.prototype.getKeys = function() {
918 var list = new Array(this.get$length()); 907 var list = new Array(this.get$length());
919 var i = (0); 908 var i = (0);
920 this.forEach(function _(key, value) { 909 this.forEach(function _(key, value) {
921 list.$setindex(i++, key); 910 list.$setindex(i++, key);
922 } 911 }
(...skipping 15 matching lines...) Expand all
938 HashMapImplementation.prototype.containsKey$1 = HashMapImplementation.prototype. containsKey; 927 HashMapImplementation.prototype.containsKey$1 = HashMapImplementation.prototype. containsKey;
939 HashMapImplementation.prototype.forEach$1 = function($0) { 928 HashMapImplementation.prototype.forEach$1 = function($0) {
940 return this.forEach(to$call$2($0)); 929 return this.forEach(to$call$2($0));
941 }; 930 };
942 HashMapImplementation.prototype.getKeys$0 = HashMapImplementation.prototype.getK eys; 931 HashMapImplementation.prototype.getKeys$0 = HashMapImplementation.prototype.getK eys;
943 HashMapImplementation.prototype.getValues$0 = HashMapImplementation.prototype.ge tValues; 932 HashMapImplementation.prototype.getValues$0 = HashMapImplementation.prototype.ge tValues;
944 HashMapImplementation.prototype.isEmpty$0 = HashMapImplementation.prototype.isEm pty; 933 HashMapImplementation.prototype.isEmpty$0 = HashMapImplementation.prototype.isEm pty;
945 // ********** Code for HashMapImplementation_E$E ************** 934 // ********** Code for HashMapImplementation_E$E **************
946 $inherits(HashMapImplementation_E$E, HashMapImplementation); 935 $inherits(HashMapImplementation_E$E, HashMapImplementation);
947 function HashMapImplementation_E$E() { 936 function HashMapImplementation_E$E() {
948 // Initializers done
949 this._numberOfEntries = (0); 937 this._numberOfEntries = (0);
950 this._numberOfDeleted = (0); 938 this._numberOfDeleted = (0);
951 this._loadLimit = HashMapImplementation._computeLoadLimit((8)); 939 this._loadLimit = HashMapImplementation._computeLoadLimit((8));
952 this._keys = new Array((8)); 940 this._keys = new Array((8));
953 this._values = new Array((8)); 941 this._values = new Array((8));
954 } 942 }
955 HashMapImplementation_E$E._computeLoadLimit = function(capacity) { 943 HashMapImplementation_E$E._computeLoadLimit = function(capacity) {
956 return $truncdiv((capacity * (3)), (4)); 944 return $truncdiv((capacity * (3)), (4));
957 } 945 }
958 HashMapImplementation_E$E._firstProbe = function(hashCode, length) { 946 HashMapImplementation_E$E._firstProbe = function(hashCode, length) {
959 return hashCode & (length - (1)); 947 return hashCode & (length - (1));
960 } 948 }
961 HashMapImplementation_E$E._nextProbe = function(currentProbe, numberOfProbes, le ngth) { 949 HashMapImplementation_E$E._nextProbe = function(currentProbe, numberOfProbes, le ngth) {
962 return (currentProbe + numberOfProbes) & (length - (1)); 950 return (currentProbe + numberOfProbes) & (length - (1));
963 } 951 }
964 HashMapImplementation_E$E.prototype._probeForAdding = function(key) { 952 HashMapImplementation_E$E.prototype._probeForAdding = function(key) {
965 var hash = HashMapImplementation._firstProbe(key.hashCode$0(), this._keys.get$ length()); 953 var hash = HashMapImplementation._firstProbe(key.hashCode$0(), this._keys.get$ length());
966 var numberOfProbes = (1); 954 var numberOfProbes = (1);
967 var initialHash = hash; 955 var initialHash = hash;
968 var insertionIndex = (-1); 956 var insertionIndex = (-1);
969 while (true) { 957 while (true) {
970 var existingKey = this._keys.$index(hash); 958 var existingKey = this._keys.$index(hash);
971 if (existingKey == null) { 959 if (existingKey == null) {
972 if (insertionIndex < (0)) return hash; 960 if (insertionIndex < (0)) return hash;
973 return insertionIndex; 961 return insertionIndex;
974 } 962 }
975 else if ($eq(existingKey, key)) { 963 else if ($eq(existingKey, key)) {
976 return hash; 964 return hash;
977 } 965 }
978 else if ((insertionIndex < (0)) && (const$2 == existingKey)) { 966 else if ((insertionIndex < (0)) && (const$0001 == existingKey)) {
979 insertionIndex = hash; 967 insertionIndex = hash;
980 } 968 }
981 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.g et$length()); 969 hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.g et$length());
982 } 970 }
983 } 971 }
984 HashMapImplementation_E$E.prototype._probeForLookup = function(key) { 972 HashMapImplementation_E$E.prototype._probeForLookup = function(key) {
985 var hash = HashMapImplementation._firstProbe(key.hashCode$0(), this._keys.get$ length()); 973 var hash = HashMapImplementation._firstProbe(key.hashCode$0(), this._keys.get$ length());
986 var numberOfProbes = (1); 974 var numberOfProbes = (1);
987 var initialHash = hash; 975 var initialHash = hash;
988 while (true) { 976 while (true) {
(...skipping 22 matching lines...) Expand all
1011 HashMapImplementation_E$E.prototype._grow = function(newCapacity) { 999 HashMapImplementation_E$E.prototype._grow = function(newCapacity) {
1012 var capacity = this._keys.get$length(); 1000 var capacity = this._keys.get$length();
1013 this._loadLimit = HashMapImplementation._computeLoadLimit(newCapacity); 1001 this._loadLimit = HashMapImplementation._computeLoadLimit(newCapacity);
1014 var oldKeys = this._keys; 1002 var oldKeys = this._keys;
1015 var oldValues = this._values; 1003 var oldValues = this._values;
1016 this._keys = new Array(newCapacity); 1004 this._keys = new Array(newCapacity);
1017 this._values = new Array(newCapacity); 1005 this._values = new Array(newCapacity);
1018 for (var i = (0); 1006 for (var i = (0);
1019 i < capacity; i++) { 1007 i < capacity; i++) {
1020 var key = oldKeys.$index(i); 1008 var key = oldKeys.$index(i);
1021 if (key == null || key == const$2) { 1009 if (key == null || key == const$0001) {
1022 continue; 1010 continue;
1023 } 1011 }
1024 var value = oldValues.$index(i); 1012 var value = oldValues.$index(i);
1025 var newIndex = this._probeForAdding(key); 1013 var newIndex = this._probeForAdding(key);
1026 this._keys.$setindex(newIndex, key); 1014 this._keys.$setindex(newIndex, key);
1027 this._values.$setindex(newIndex, value); 1015 this._values.$setindex(newIndex, value);
1028 } 1016 }
1029 this._numberOfDeleted = (0); 1017 this._numberOfDeleted = (0);
1030 } 1018 }
1031 HashMapImplementation_E$E.prototype.$setindex = function(key, value) { 1019 HashMapImplementation_E$E.prototype.$setindex = function(key, value) {
1032 this._ensureCapacity(); 1020 this._ensureCapacity();
1033 var index = this._probeForAdding(key); 1021 var index = this._probeForAdding(key);
1034 if ((this._keys.$index(index) == null) || (this._keys.$index(index) == const$2 )) { 1022 if ((this._keys.$index(index) == null) || (this._keys.$index(index) == const$0 001)) {
1035 this._numberOfEntries++; 1023 this._numberOfEntries++;
1036 } 1024 }
1037 this._keys.$setindex(index, key); 1025 this._keys.$setindex(index, key);
1038 this._values.$setindex(index, value); 1026 this._values.$setindex(index, value);
1039 } 1027 }
1040 HashMapImplementation_E$E.prototype.remove = function(key) { 1028 HashMapImplementation_E$E.prototype.remove = function(key) {
1041 var index = this._probeForLookup(key); 1029 var index = this._probeForLookup(key);
1042 if (index >= (0)) { 1030 if (index >= (0)) {
1043 this._numberOfEntries--; 1031 this._numberOfEntries--;
1044 var value = this._values.$index(index); 1032 var value = this._values.$index(index);
1045 this._values.$setindex(index); 1033 this._values.$setindex(index);
1046 this._keys.$setindex(index, const$2); 1034 this._keys.$setindex(index, const$0001);
1047 this._numberOfDeleted++; 1035 this._numberOfDeleted++;
1048 return value; 1036 return value;
1049 } 1037 }
1050 return null; 1038 return null;
1051 } 1039 }
1052 HashMapImplementation_E$E.prototype.isEmpty = function() { 1040 HashMapImplementation_E$E.prototype.isEmpty = function() {
1053 return this._numberOfEntries == (0); 1041 return this._numberOfEntries == (0);
1054 } 1042 }
1055 HashMapImplementation_E$E.prototype.forEach = function(f) { 1043 HashMapImplementation_E$E.prototype.forEach = function(f) {
1056 var length = this._keys.get$length(); 1044 var length = this._keys.get$length();
1057 for (var i = (0); 1045 for (var i = (0);
1058 i < length; i++) { 1046 i < length; i++) {
1059 if ((this._keys.$index(i) != null) && (this._keys.$index(i) != const$2)) { 1047 if ((this._keys.$index(i) != null) && (this._keys.$index(i) != const$0001)) {
1060 f(this._keys.$index(i), this._values.$index(i)); 1048 f(this._keys.$index(i), this._values.$index(i));
1061 } 1049 }
1062 } 1050 }
1063 } 1051 }
1064 HashMapImplementation_E$E.prototype.getKeys = function() { 1052 HashMapImplementation_E$E.prototype.getKeys = function() {
1065 var list = new Array(this.get$length()); 1053 var list = new Array(this.get$length());
1066 var i = (0); 1054 var i = (0);
1067 this.forEach(function _(key, value) { 1055 this.forEach(function _(key, value) {
1068 list.$setindex(i++, key); 1056 list.$setindex(i++, key);
1069 } 1057 }
1070 ); 1058 );
1071 return list; 1059 return list;
1072 } 1060 }
1073 HashMapImplementation_E$E.prototype.containsKey = function(key) { 1061 HashMapImplementation_E$E.prototype.containsKey = function(key) {
1074 return (this._probeForLookup(key) != (-1)); 1062 return (this._probeForLookup(key) != (-1));
1075 } 1063 }
1076 // ********** Code for HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePa ir_K$V ************** 1064 // ********** Code for HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePa ir_K$V **************
1077 $inherits(HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V, HashM apImplementation); 1065 $inherits(HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V, HashM apImplementation);
1078 function HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V() {} 1066 function HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V() {}
1079 // ********** Code for HashMapImplementation_K$V ************** 1067 // ********** Code for HashMapImplementation_K$V **************
1080 $inherits(HashMapImplementation_K$V, HashMapImplementation); 1068 $inherits(HashMapImplementation_K$V, HashMapImplementation);
1081 function HashMapImplementation_K$V() { 1069 function HashMapImplementation_K$V() {
1082 // Initializers done
1083 this._numberOfEntries = (0); 1070 this._numberOfEntries = (0);
1084 this._numberOfDeleted = (0); 1071 this._numberOfDeleted = (0);
1085 this._loadLimit = HashMapImplementation._computeLoadLimit((8)); 1072 this._loadLimit = HashMapImplementation._computeLoadLimit((8));
1086 this._keys = new Array((8)); 1073 this._keys = new Array((8));
1087 this._values = new Array((8)); 1074 this._values = new Array((8));
1088 } 1075 }
1089 HashMapImplementation_K$V._computeLoadLimit = function(capacity) { 1076 HashMapImplementation_K$V._computeLoadLimit = function(capacity) {
1090 return $truncdiv((capacity * (3)), (4)); 1077 return $truncdiv((capacity * (3)), (4));
1091 } 1078 }
1092 // ********** Code for HashMapImplementation_dart_core_String$Value ************ **
1093 $inherits(HashMapImplementation_dart_core_String$Value, HashMapImplementation);
1094 function HashMapImplementation_dart_core_String$Value() {}
1095 // ********** Code for HashSetImplementation ************** 1079 // ********** Code for HashSetImplementation **************
1096 function HashSetImplementation() { 1080 function HashSetImplementation() {
1097 // Initializers done
1098 this._backingMap = new HashMapImplementation_E$E(); 1081 this._backingMap = new HashMapImplementation_E$E();
1099 } 1082 }
1100 HashSetImplementation.HashSetImplementation$from$factory = function(other) { 1083 HashSetImplementation.HashSetImplementation$from$factory = function(other) {
1101 var set = new HashSetImplementation_E(); 1084 var set = new HashSetImplementation_E();
1102 for (var $$i = other.iterator(); $$i.hasNext$0(); ) { 1085 for (var $$i = other.iterator(); $$i.hasNext$0(); ) {
1103 var e = $$i.next$0(); 1086 var e = $$i.next$0();
1104 set.add(e); 1087 set.add(e);
1105 } 1088 }
1106 return set; 1089 return set;
1107 } 1090 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 return this.forEach(to$call$1($0)); 1150 return this.forEach(to$call$1($0));
1168 }; 1151 };
1169 HashSetImplementation.prototype.isEmpty$0 = HashSetImplementation.prototype.isEm pty; 1152 HashSetImplementation.prototype.isEmpty$0 = HashSetImplementation.prototype.isEm pty;
1170 HashSetImplementation.prototype.iterator$0 = HashSetImplementation.prototype.ite rator; 1153 HashSetImplementation.prototype.iterator$0 = HashSetImplementation.prototype.ite rator;
1171 HashSetImplementation.prototype.some$1 = function($0) { 1154 HashSetImplementation.prototype.some$1 = function($0) {
1172 return this.some(to$call$1($0)); 1155 return this.some(to$call$1($0));
1173 }; 1156 };
1174 // ********** Code for HashSetImplementation_E ************** 1157 // ********** Code for HashSetImplementation_E **************
1175 $inherits(HashSetImplementation_E, HashSetImplementation); 1158 $inherits(HashSetImplementation_E, HashSetImplementation);
1176 function HashSetImplementation_E() { 1159 function HashSetImplementation_E() {
1177 // Initializers done
1178 this._backingMap = new HashMapImplementation_E$E(); 1160 this._backingMap = new HashMapImplementation_E$E();
1179 } 1161 }
1180 // ********** Code for HashSetImplementation_Library ************** 1162 // ********** Code for HashSetImplementation_Library **************
1181 $inherits(HashSetImplementation_Library, HashSetImplementation); 1163 $inherits(HashSetImplementation_Library, HashSetImplementation);
1182 function HashSetImplementation_Library() {} 1164 function HashSetImplementation_Library() {}
1183 // ********** Code for HashSetImplementation_dart_core_String ************** 1165 // ********** Code for HashSetImplementation_dart_core_String **************
1184 $inherits(HashSetImplementation_dart_core_String, HashSetImplementation); 1166 $inherits(HashSetImplementation_dart_core_String, HashSetImplementation);
1185 function HashSetImplementation_dart_core_String() {} 1167 function HashSetImplementation_dart_core_String() {}
1186 // ********** Code for HashSetImplementation_Type ************** 1168 // ********** Code for HashSetImplementation_Type **************
1187 $inherits(HashSetImplementation_Type, HashSetImplementation); 1169 $inherits(HashSetImplementation_Type, HashSetImplementation);
1188 function HashSetImplementation_Type() {} 1170 function HashSetImplementation_Type() {}
1189 // ********** Code for HashSetIterator ************** 1171 // ********** Code for HashSetIterator **************
1190 function HashSetIterator(set_) { 1172 function HashSetIterator(set_) {
1173 this._entries = set_._backingMap._keys;
1191 this._nextValidIndex = (-1); 1174 this._nextValidIndex = (-1);
1192 this._entries = set_._backingMap._keys;
1193 // Initializers done
1194 this._advance(); 1175 this._advance();
1195 } 1176 }
1196 HashSetIterator.prototype.hasNext = function() { 1177 HashSetIterator.prototype.hasNext = function() {
1197 if (this._nextValidIndex >= this._entries.get$length()) return false; 1178 if (this._nextValidIndex >= this._entries.get$length()) return false;
1198 if (this._entries.$index(this._nextValidIndex) == const$2) { 1179 if (this._entries.$index(this._nextValidIndex) == const$0001) {
1199 this._advance(); 1180 this._advance();
1200 } 1181 }
1201 return this._nextValidIndex < this._entries.get$length(); 1182 return this._nextValidIndex < this._entries.get$length();
1202 } 1183 }
1203 HashSetIterator.prototype.next = function() { 1184 HashSetIterator.prototype.next = function() {
1204 if (!this.hasNext()) { 1185 if (!this.hasNext()) {
1205 $throw(const$7); 1186 $throw(const$0005);
1206 } 1187 }
1207 var res = this._entries.$index(this._nextValidIndex); 1188 var res = this._entries.$index(this._nextValidIndex);
1208 this._advance(); 1189 this._advance();
1209 return res; 1190 return res;
1210 } 1191 }
1211 HashSetIterator.prototype._advance = function() { 1192 HashSetIterator.prototype._advance = function() {
1212 var length = this._entries.get$length(); 1193 var length = this._entries.get$length();
1213 var entry; 1194 var entry;
1214 var deletedKey = const$2; 1195 var deletedKey = const$0001;
1215 do { 1196 do {
1216 if (++this._nextValidIndex >= length) break; 1197 if (++this._nextValidIndex >= length) break;
1217 entry = this._entries.$index(this._nextValidIndex); 1198 entry = this._entries.$index(this._nextValidIndex);
1218 } 1199 }
1219 while ((entry == null) || (entry == deletedKey)) 1200 while ((entry == null) || (entry == deletedKey))
1220 } 1201 }
1221 HashSetIterator.prototype.hasNext$0 = HashSetIterator.prototype.hasNext; 1202 HashSetIterator.prototype.hasNext$0 = HashSetIterator.prototype.hasNext;
1222 HashSetIterator.prototype.next$0 = HashSetIterator.prototype.next; 1203 HashSetIterator.prototype.next$0 = HashSetIterator.prototype.next;
1223 // ********** Code for HashSetIterator_E ************** 1204 // ********** Code for HashSetIterator_E **************
1224 $inherits(HashSetIterator_E, HashSetIterator); 1205 $inherits(HashSetIterator_E, HashSetIterator);
1225 function HashSetIterator_E(set_) { 1206 function HashSetIterator_E(set_) {
1226 this._nextValidIndex = (-1); 1207 this._nextValidIndex = (-1);
1227 this._entries = set_._backingMap._keys; 1208 this._entries = set_._backingMap._keys;
1228 // Initializers done
1229 this._advance(); 1209 this._advance();
1230 } 1210 }
1231 HashSetIterator_E.prototype._advance = function() { 1211 HashSetIterator_E.prototype._advance = function() {
1232 var length = this._entries.get$length(); 1212 var length = this._entries.get$length();
1233 var entry; 1213 var entry;
1234 var deletedKey = const$2; 1214 var deletedKey = const$0001;
1235 do { 1215 do {
1236 if (++this._nextValidIndex >= length) break; 1216 if (++this._nextValidIndex >= length) break;
1237 entry = this._entries.$index(this._nextValidIndex); 1217 entry = this._entries.$index(this._nextValidIndex);
1238 } 1218 }
1239 while ((entry == null) || (entry == deletedKey)) 1219 while ((entry == null) || (entry == deletedKey))
1240 } 1220 }
1241 // ********** Code for _DeletedKeySentinel ************** 1221 // ********** Code for _DeletedKeySentinel **************
1242 function _DeletedKeySentinel() { 1222 function _DeletedKeySentinel() {
1243 // Initializers done 1223
1244 } 1224 }
1245 // ********** Code for KeyValuePair ************** 1225 // ********** Code for KeyValuePair **************
1246 function KeyValuePair(key, value) { 1226 function KeyValuePair(key, value) {
1227 this.value = value;
1247 this.key = key; 1228 this.key = key;
1248 this.value = value;
1249 // Initializers done
1250 } 1229 }
1251 KeyValuePair.prototype.get$value = function() { return this.value; }; 1230 KeyValuePair.prototype.get$value = function() { return this.value; };
1252 KeyValuePair.prototype.set$value = function(value) { return this.value = value; }; 1231 KeyValuePair.prototype.set$value = function(value) { return this.value = value; };
1253 // ********** Code for KeyValuePair_K$V ************** 1232 // ********** Code for KeyValuePair_K$V **************
1254 $inherits(KeyValuePair_K$V, KeyValuePair); 1233 $inherits(KeyValuePair_K$V, KeyValuePair);
1255 function KeyValuePair_K$V(key, value) { 1234 function KeyValuePair_K$V(key, value) {
1256 this.key = key; 1235 this.key = key;
1257 this.value = value; 1236 this.value = value;
1258 // Initializers done
1259 } 1237 }
1260 // ********** Code for LinkedHashMapImplementation ************** 1238 // ********** Code for LinkedHashMapImplementation **************
1261 function LinkedHashMapImplementation() { 1239 function LinkedHashMapImplementation() {
1262 // Initializers done
1263 this._map = new HashMapImplementation(); 1240 this._map = new HashMapImplementation();
1264 this._list = new DoubleLinkedQueue_KeyValuePair_K$V(); 1241 this._list = new DoubleLinkedQueue_KeyValuePair_K$V();
1265 } 1242 }
1266 LinkedHashMapImplementation.prototype.$setindex = function(key, value) { 1243 LinkedHashMapImplementation.prototype.$setindex = function(key, value) {
1267 if (this._map.containsKey(key)) { 1244 if (this._map.containsKey(key)) {
1268 this._map.$index(key).get$element().set$value(value); 1245 this._map.$index(key).get$element().set$value(value);
1269 } 1246 }
1270 else { 1247 else {
1271 this._list.addLast(new KeyValuePair_K$V(key, value)); 1248 this._list.addLast(new KeyValuePair_K$V(key, value));
1272 this._map.$setindex(key, this._list.lastEntry()); 1249 this._map.$setindex(key, this._list.lastEntry());
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 } 1297 }
1321 LinkedHashMapImplementation.prototype.containsKey$1 = LinkedHashMapImplementatio n.prototype.containsKey; 1298 LinkedHashMapImplementation.prototype.containsKey$1 = LinkedHashMapImplementatio n.prototype.containsKey;
1322 LinkedHashMapImplementation.prototype.forEach$1 = function($0) { 1299 LinkedHashMapImplementation.prototype.forEach$1 = function($0) {
1323 return this.forEach(to$call$2($0)); 1300 return this.forEach(to$call$2($0));
1324 }; 1301 };
1325 LinkedHashMapImplementation.prototype.getKeys$0 = LinkedHashMapImplementation.pr ototype.getKeys; 1302 LinkedHashMapImplementation.prototype.getKeys$0 = LinkedHashMapImplementation.pr ototype.getKeys;
1326 LinkedHashMapImplementation.prototype.getValues$0 = LinkedHashMapImplementation. prototype.getValues; 1303 LinkedHashMapImplementation.prototype.getValues$0 = LinkedHashMapImplementation. prototype.getValues;
1327 LinkedHashMapImplementation.prototype.isEmpty$0 = LinkedHashMapImplementation.pr ototype.isEmpty; 1304 LinkedHashMapImplementation.prototype.isEmpty$0 = LinkedHashMapImplementation.pr ototype.isEmpty;
1328 // ********** Code for DoubleLinkedQueueEntry ************** 1305 // ********** Code for DoubleLinkedQueueEntry **************
1329 function DoubleLinkedQueueEntry(e) { 1306 function DoubleLinkedQueueEntry(e) {
1330 // Initializers done
1331 this._element = e; 1307 this._element = e;
1332 } 1308 }
1333 DoubleLinkedQueueEntry.prototype._link = function(p, n) { 1309 DoubleLinkedQueueEntry.prototype._link = function(p, n) {
1334 this._next = n; 1310 this._next = n;
1335 this._previous = p; 1311 this._previous = p;
1336 p._next = this; 1312 p._next = this;
1337 n._previous = this; 1313 n._previous = this;
1338 } 1314 }
1339 DoubleLinkedQueueEntry.prototype.prepend = function(e) { 1315 DoubleLinkedQueueEntry.prototype.prepend = function(e) {
1340 new DoubleLinkedQueueEntry_E(e)._link(this._previous, this); 1316 new DoubleLinkedQueueEntry_E(e)._link(this._previous, this);
(...skipping 10 matching lines...) Expand all
1351 } 1327 }
1352 DoubleLinkedQueueEntry.prototype.previousEntry = function() { 1328 DoubleLinkedQueueEntry.prototype.previousEntry = function() {
1353 return this._previous._asNonSentinelEntry(); 1329 return this._previous._asNonSentinelEntry();
1354 } 1330 }
1355 DoubleLinkedQueueEntry.prototype.get$element = function() { 1331 DoubleLinkedQueueEntry.prototype.get$element = function() {
1356 return this._element; 1332 return this._element;
1357 } 1333 }
1358 // ********** Code for DoubleLinkedQueueEntry_E ************** 1334 // ********** Code for DoubleLinkedQueueEntry_E **************
1359 $inherits(DoubleLinkedQueueEntry_E, DoubleLinkedQueueEntry); 1335 $inherits(DoubleLinkedQueueEntry_E, DoubleLinkedQueueEntry);
1360 function DoubleLinkedQueueEntry_E(e) { 1336 function DoubleLinkedQueueEntry_E(e) {
1361 // Initializers done
1362 this._element = e; 1337 this._element = e;
1363 } 1338 }
1364 DoubleLinkedQueueEntry_E.prototype._link = function(p, n) { 1339 DoubleLinkedQueueEntry_E.prototype._link = function(p, n) {
1365 this._next = n; 1340 this._next = n;
1366 this._previous = p; 1341 this._previous = p;
1367 p._next = this; 1342 p._next = this;
1368 n._previous = this; 1343 n._previous = this;
1369 } 1344 }
1370 DoubleLinkedQueueEntry_E.prototype.prepend = function(e) { 1345 DoubleLinkedQueueEntry_E.prototype.prepend = function(e) {
1371 new DoubleLinkedQueueEntry_E(e)._link(this._previous, this); 1346 new DoubleLinkedQueueEntry_E(e)._link(this._previous, this);
1372 } 1347 }
1373 DoubleLinkedQueueEntry_E.prototype.remove = function() { 1348 DoubleLinkedQueueEntry_E.prototype.remove = function() {
1374 this._previous._next = this._next; 1349 this._previous._next = this._next;
1375 this._next._previous = this._previous; 1350 this._next._previous = this._previous;
1376 this._next = null; 1351 this._next = null;
1377 this._previous = null; 1352 this._previous = null;
1378 return this._element; 1353 return this._element;
1379 } 1354 }
1380 DoubleLinkedQueueEntry_E.prototype._asNonSentinelEntry = function() { 1355 DoubleLinkedQueueEntry_E.prototype._asNonSentinelEntry = function() {
1381 return this; 1356 return this;
1382 } 1357 }
1383 DoubleLinkedQueueEntry_E.prototype.previousEntry = function() { 1358 DoubleLinkedQueueEntry_E.prototype.previousEntry = function() {
1384 return this._previous._asNonSentinelEntry(); 1359 return this._previous._asNonSentinelEntry();
1385 } 1360 }
1386 // ********** Code for DoubleLinkedQueueEntry_KeyValuePair_K$V ************** 1361 // ********** Code for DoubleLinkedQueueEntry_KeyValuePair_K$V **************
1387 $inherits(DoubleLinkedQueueEntry_KeyValuePair_K$V, DoubleLinkedQueueEntry); 1362 $inherits(DoubleLinkedQueueEntry_KeyValuePair_K$V, DoubleLinkedQueueEntry);
1388 function DoubleLinkedQueueEntry_KeyValuePair_K$V(e) { 1363 function DoubleLinkedQueueEntry_KeyValuePair_K$V(e) {
1389 // Initializers done
1390 this._element = e; 1364 this._element = e;
1391 } 1365 }
1392 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype._link = function(p, n) { 1366 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype._link = function(p, n) {
1393 this._next = n; 1367 this._next = n;
1394 this._previous = p; 1368 this._previous = p;
1395 p._next = this; 1369 p._next = this;
1396 n._previous = this; 1370 n._previous = this;
1397 } 1371 }
1398 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.prepend = function(e) { 1372 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.prepend = function(e) {
1399 new DoubleLinkedQueueEntry_KeyValuePair_K$V(e)._link(this._previous, this); 1373 new DoubleLinkedQueueEntry_KeyValuePair_K$V(e)._link(this._previous, this);
1400 } 1374 }
1401 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype._asNonSentinelEntry = function () { 1375 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype._asNonSentinelEntry = function () {
1402 return this; 1376 return this;
1403 } 1377 }
1404 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.previousEntry = function() { 1378 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.previousEntry = function() {
1405 return this._previous._asNonSentinelEntry(); 1379 return this._previous._asNonSentinelEntry();
1406 } 1380 }
1407 // ********** Code for _DoubleLinkedQueueEntrySentinel ************** 1381 // ********** Code for _DoubleLinkedQueueEntrySentinel **************
1408 $inherits(_DoubleLinkedQueueEntrySentinel, DoubleLinkedQueueEntry_E); 1382 $inherits(_DoubleLinkedQueueEntrySentinel, DoubleLinkedQueueEntry_E);
1409 function _DoubleLinkedQueueEntrySentinel() { 1383 function _DoubleLinkedQueueEntrySentinel() {
1410 // Initializers done
1411 DoubleLinkedQueueEntry_E.call(this, null); 1384 DoubleLinkedQueueEntry_E.call(this, null);
1412 this._link(this, this); 1385 this._link(this, this);
1413 } 1386 }
1414 _DoubleLinkedQueueEntrySentinel.prototype.remove = function() { 1387 _DoubleLinkedQueueEntrySentinel.prototype.remove = function() {
1415 $throw(const$1); 1388 $throw(const$0000);
1416 } 1389 }
1417 _DoubleLinkedQueueEntrySentinel.prototype._asNonSentinelEntry = function() { 1390 _DoubleLinkedQueueEntrySentinel.prototype._asNonSentinelEntry = function() {
1418 return null; 1391 return null;
1419 } 1392 }
1420 _DoubleLinkedQueueEntrySentinel.prototype.get$element = function() { 1393 _DoubleLinkedQueueEntrySentinel.prototype.get$element = function() {
1421 $throw(const$1); 1394 $throw(const$0000);
1422 } 1395 }
1423 // ********** Code for _DoubleLinkedQueueEntrySentinel_E ************** 1396 // ********** Code for _DoubleLinkedQueueEntrySentinel_E **************
1424 $inherits(_DoubleLinkedQueueEntrySentinel_E, _DoubleLinkedQueueEntrySentinel); 1397 $inherits(_DoubleLinkedQueueEntrySentinel_E, _DoubleLinkedQueueEntrySentinel);
1425 function _DoubleLinkedQueueEntrySentinel_E() { 1398 function _DoubleLinkedQueueEntrySentinel_E() {
1426 // Initializers done
1427 DoubleLinkedQueueEntry_E.call(this, null); 1399 DoubleLinkedQueueEntry_E.call(this, null);
1428 this._link(this, this); 1400 this._link(this, this);
1429 } 1401 }
1430 // ********** Code for _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V ******** ****** 1402 // ********** Code for _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V ******** ******
1431 $inherits(_DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V, _DoubleLinkedQueueEn trySentinel); 1403 $inherits(_DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V, _DoubleLinkedQueueEn trySentinel);
1432 function _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V() { 1404 function _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V() {
1433 // Initializers done
1434 DoubleLinkedQueueEntry_KeyValuePair_K$V.call(this, null); 1405 DoubleLinkedQueueEntry_KeyValuePair_K$V.call(this, null);
1435 this._link(this, this); 1406 this._link(this, this);
1436 } 1407 }
1437 // ********** Code for DoubleLinkedQueue ************** 1408 // ********** Code for DoubleLinkedQueue **************
1438 function DoubleLinkedQueue() { 1409 function DoubleLinkedQueue() {
1439 // Initializers done
1440 this._sentinel = new _DoubleLinkedQueueEntrySentinel_E(); 1410 this._sentinel = new _DoubleLinkedQueueEntrySentinel_E();
1441 } 1411 }
1442 DoubleLinkedQueue.DoubleLinkedQueue$from$factory = function(other) { 1412 DoubleLinkedQueue.DoubleLinkedQueue$from$factory = function(other) {
1443 var list = new DoubleLinkedQueue(); 1413 var list = new DoubleLinkedQueue();
1444 for (var $$i = other.iterator(); $$i.hasNext$0(); ) { 1414 for (var $$i = other.iterator(); $$i.hasNext$0(); ) {
1445 var e = $$i.next$0(); 1415 var e = $$i.next$0();
1446 list.addLast(e); 1416 list.addLast(e);
1447 } 1417 }
1448 return list; 1418 return list;
1449 } 1419 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 DoubleLinkedQueue.prototype.removeLast$0 = DoubleLinkedQueue.prototype.removeLas t; 1508 DoubleLinkedQueue.prototype.removeLast$0 = DoubleLinkedQueue.prototype.removeLas t;
1539 DoubleLinkedQueue.prototype.some$1 = function($0) { 1509 DoubleLinkedQueue.prototype.some$1 = function($0) {
1540 return this.some(to$call$1($0)); 1510 return this.some(to$call$1($0));
1541 }; 1511 };
1542 // ********** Code for DoubleLinkedQueue_E ************** 1512 // ********** Code for DoubleLinkedQueue_E **************
1543 $inherits(DoubleLinkedQueue_E, DoubleLinkedQueue); 1513 $inherits(DoubleLinkedQueue_E, DoubleLinkedQueue);
1544 function DoubleLinkedQueue_E() {} 1514 function DoubleLinkedQueue_E() {}
1545 // ********** Code for DoubleLinkedQueue_KeyValuePair_K$V ************** 1515 // ********** Code for DoubleLinkedQueue_KeyValuePair_K$V **************
1546 $inherits(DoubleLinkedQueue_KeyValuePair_K$V, DoubleLinkedQueue); 1516 $inherits(DoubleLinkedQueue_KeyValuePair_K$V, DoubleLinkedQueue);
1547 function DoubleLinkedQueue_KeyValuePair_K$V() { 1517 function DoubleLinkedQueue_KeyValuePair_K$V() {
1548 // Initializers done
1549 this._sentinel = new _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V(); 1518 this._sentinel = new _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V();
1550 } 1519 }
1551 DoubleLinkedQueue_KeyValuePair_K$V.prototype.addLast = function(value) { 1520 DoubleLinkedQueue_KeyValuePair_K$V.prototype.addLast = function(value) {
1552 this._sentinel.prepend(value); 1521 this._sentinel.prepend(value);
1553 } 1522 }
1554 DoubleLinkedQueue_KeyValuePair_K$V.prototype.lastEntry = function() { 1523 DoubleLinkedQueue_KeyValuePair_K$V.prototype.lastEntry = function() {
1555 return this._sentinel.previousEntry(); 1524 return this._sentinel.previousEntry();
1556 } 1525 }
1557 DoubleLinkedQueue_KeyValuePair_K$V.prototype.forEach = function(f) { 1526 DoubleLinkedQueue_KeyValuePair_K$V.prototype.forEach = function(f) {
1558 var entry = this._sentinel._next; 1527 var entry = this._sentinel._next;
1559 while (entry != this._sentinel) { 1528 while (entry != this._sentinel) {
1560 var nextEntry = entry._next; 1529 var nextEntry = entry._next;
1561 f(entry._element); 1530 f(entry._element);
1562 entry = nextEntry; 1531 entry = nextEntry;
1563 } 1532 }
1564 } 1533 }
1565 // ********** Code for _DoubleLinkedQueueIterator ************** 1534 // ********** Code for _DoubleLinkedQueueIterator **************
1566 function _DoubleLinkedQueueIterator(_sentinel) { 1535 function _DoubleLinkedQueueIterator(_sentinel) {
1567 this._sentinel = _sentinel; 1536 this._sentinel = _sentinel;
1568 // Initializers done
1569 this._currentEntry = this._sentinel; 1537 this._currentEntry = this._sentinel;
1570 } 1538 }
1571 _DoubleLinkedQueueIterator.prototype.hasNext = function() { 1539 _DoubleLinkedQueueIterator.prototype.hasNext = function() {
1572 return this._currentEntry._next != this._sentinel; 1540 return this._currentEntry._next != this._sentinel;
1573 } 1541 }
1574 _DoubleLinkedQueueIterator.prototype.next = function() { 1542 _DoubleLinkedQueueIterator.prototype.next = function() {
1575 if (!this.hasNext()) { 1543 if (!this.hasNext()) {
1576 $throw(const$7); 1544 $throw(const$0005);
1577 } 1545 }
1578 this._currentEntry = this._currentEntry._next; 1546 this._currentEntry = this._currentEntry._next;
1579 return this._currentEntry.get$element(); 1547 return this._currentEntry.get$element();
1580 } 1548 }
1581 _DoubleLinkedQueueIterator.prototype.hasNext$0 = _DoubleLinkedQueueIterator.prot otype.hasNext; 1549 _DoubleLinkedQueueIterator.prototype.hasNext$0 = _DoubleLinkedQueueIterator.prot otype.hasNext;
1582 _DoubleLinkedQueueIterator.prototype.next$0 = _DoubleLinkedQueueIterator.prototy pe.next; 1550 _DoubleLinkedQueueIterator.prototype.next$0 = _DoubleLinkedQueueIterator.prototy pe.next;
1583 // ********** Code for _DoubleLinkedQueueIterator_E ************** 1551 // ********** Code for _DoubleLinkedQueueIterator_E **************
1584 $inherits(_DoubleLinkedQueueIterator_E, _DoubleLinkedQueueIterator); 1552 $inherits(_DoubleLinkedQueueIterator_E, _DoubleLinkedQueueIterator);
1585 function _DoubleLinkedQueueIterator_E(_sentinel) { 1553 function _DoubleLinkedQueueIterator_E(_sentinel) {
1586 this._sentinel = _sentinel; 1554 this._sentinel = _sentinel;
1587 // Initializers done
1588 this._currentEntry = this._sentinel; 1555 this._currentEntry = this._sentinel;
1589 } 1556 }
1590 // ********** Code for StopwatchImplementation ************** 1557 // ********** Code for StopwatchImplementation **************
1591 function StopwatchImplementation() { 1558 function StopwatchImplementation() {
1592 this._start = null; 1559 this._start = null;
1593 this._stop = null; 1560 this._stop = null;
1594 // Initializers done
1595 } 1561 }
1596 StopwatchImplementation.prototype.start = function() { 1562 StopwatchImplementation.prototype.start = function() {
1597 if (this._start == null) { 1563 if (this._start == null) {
1598 this._start = Clock.now(); 1564 this._start = Clock.now();
1599 } 1565 }
1600 else { 1566 else {
1601 if (this._stop == null) { 1567 if (this._stop == null) {
1602 return; 1568 return;
1603 } 1569 }
1604 this._start = Clock.now() - (this._stop - this._start); 1570 this._start = Clock.now() - (this._stop - this._start);
(...skipping 16 matching lines...) Expand all
1621 } 1587 }
1622 StopwatchImplementation.prototype.elapsedInMs = function() { 1588 StopwatchImplementation.prototype.elapsedInMs = function() {
1623 return $truncdiv((this.elapsed() * (1000)), this.frequency()); 1589 return $truncdiv((this.elapsed() * (1000)), this.frequency());
1624 } 1590 }
1625 StopwatchImplementation.prototype.frequency = function() { 1591 StopwatchImplementation.prototype.frequency = function() {
1626 return Clock.frequency(); 1592 return Clock.frequency();
1627 } 1593 }
1628 StopwatchImplementation.prototype.start$0 = StopwatchImplementation.prototype.st art; 1594 StopwatchImplementation.prototype.start$0 = StopwatchImplementation.prototype.st art;
1629 // ********** Code for StringBufferImpl ************** 1595 // ********** Code for StringBufferImpl **************
1630 function StringBufferImpl(content) { 1596 function StringBufferImpl(content) {
1631 // Initializers done
1632 this.clear(); 1597 this.clear();
1633 this.add(content); 1598 this.add(content);
1634 } 1599 }
1635 StringBufferImpl.prototype.get$length = function() { 1600 StringBufferImpl.prototype.get$length = function() {
1636 return this._length; 1601 return this._length;
1637 } 1602 }
1638 StringBufferImpl.prototype.isEmpty = function() { 1603 StringBufferImpl.prototype.isEmpty = function() {
1639 return this._length == (0); 1604 return this._length == (0);
1640 } 1605 }
1641 StringBufferImpl.prototype.add = function(obj) { 1606 StringBufferImpl.prototype.add = function(obj) {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1796 var e = $$i.next$0(); 1761 var e = $$i.next$0();
1797 if (f(e)) destination.add(e); 1762 if (f(e)) destination.add(e);
1798 } 1763 }
1799 return destination; 1764 return destination;
1800 } 1765 }
1801 // ********** Code for _Worker ************** 1766 // ********** Code for _Worker **************
1802 // ********** Code for _ArgumentMismatchException ************** 1767 // ********** Code for _ArgumentMismatchException **************
1803 $inherits(_ArgumentMismatchException, ClosureArgumentMismatchException); 1768 $inherits(_ArgumentMismatchException, ClosureArgumentMismatchException);
1804 function _ArgumentMismatchException(_message) { 1769 function _ArgumentMismatchException(_message) {
1805 this._dart_coreimpl_message = _message; 1770 this._dart_coreimpl_message = _message;
1806 // Initializers done
1807 ClosureArgumentMismatchException.call(this); 1771 ClosureArgumentMismatchException.call(this);
1808 } 1772 }
1809 _ArgumentMismatchException.prototype.toString = function() { 1773 _ArgumentMismatchException.prototype.toString = function() {
1810 return ("Closure argument mismatch: " + this._dart_coreimpl_message); 1774 return ("Closure argument mismatch: " + this._dart_coreimpl_message);
1811 } 1775 }
1812 _ArgumentMismatchException.prototype.toString$0 = _ArgumentMismatchException.pro totype.toString; 1776 _ArgumentMismatchException.prototype.toString$0 = _ArgumentMismatchException.pro totype.toString;
1813 // ********** Code for _FunctionImplementation ************** 1777 // ********** Code for _FunctionImplementation **************
1814 _FunctionImplementation = Function; 1778 _FunctionImplementation = Function;
1815 _FunctionImplementation.prototype._genStub = function(argsLength, names) { 1779 _FunctionImplementation.prototype._genStub = function(argsLength, names) {
1816 // Fast path #1: if no named arguments and arg count matches 1780 // Fast path #1: if no named arguments and arg count matches
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1873 // Note: using Function instead of 'eval' to get a clean scope. 1837 // Note: using Function instead of 'eval' to get a clean scope.
1874 // TODO(jmesserly): evaluate the performance of these stubs. 1838 // TODO(jmesserly): evaluate the performance of these stubs.
1875 var f = 'function(' + a.join(',') + '){return $f(' + p.join(',') + ');}'; 1839 var f = 'function(' + a.join(',') + '){return $f(' + p.join(',') + ');}';
1876 return new Function('$f', 'return ' + f + '').call(null, this); 1840 return new Function('$f', 'return ' + f + '').call(null, this);
1877 1841
1878 } 1842 }
1879 // ********** Code for top level ************** 1843 // ********** Code for top level **************
1880 // ********** Library node ************** 1844 // ********** Library node **************
1881 // ********** Code for Process ************** 1845 // ********** Code for Process **************
1882 function Process(_process) { 1846 function Process(_process) {
1883 this.SIGHUP = "SIGHUP" 1847 this.SIGSYS = "SIGSYS";
1884 this.SIGINT = "SIGINT" 1848 this.SIGALRM = "SIGALRM";
1885 this.SIGQUIT = "SIGQUIT" 1849 this.SIGXCPU = "SIGXCPU";
1886 this.SIGILL = "SIGILL" 1850 this.SIGTSTP = "SIGTSTP";
1887 this.SIGTRAP = "SIGTRAP" 1851 this.SIGSEGV = "SIGSEGV";
1888 this.SIGABRT = "SIGABRT" 1852 this.SIGQUIT = "SIGQUIT";
1889 this.SIGEMT = "SIGEMT" 1853 this.SIGABRT = "SIGABRT";
1890 this.SIGFPE = "SIGFPE" 1854 this.SIGKILL = "SIGKILL";
1891 this.SIGKILL = "SIGKILL" 1855 this.SIGHUP = "SIGHUP";
1892 this.SIGBUS = "SIGBUS" 1856 this.SIGUSR2 = "SIGUSR2";
1893 this.SIGSEGV = "SIGSEGV" 1857 this.SIGXFSZ = "SIGXFSZ";
1894 this.SIGSYS = "SIGSYS" 1858 this.SIGCONT = "SIGCONT";
1895 this.SIGPIPE = "SIGPIPE" 1859 this.SIGTTOU = "SIGTTOU";
1896 this.SIGALRM = "SIGALRM" 1860 this.SIGINT = "SIGINT";
1897 this.SIGTERM = "SIGTERM" 1861 this.SIGURG = "SIGURG";
1898 this.SIGURG = "SIGURG" 1862 this.SIGFPE = "SIGFPE";
1899 this.SIGSTOP = "SIGSTOP" 1863 this.SIGUSR1 = "SIGUSR1";
1900 this.SIGTSTP = "SIGTSTP" 1864 this.SIGEMT = "SIGEMT";
1901 this.SIGCONT = "SIGCONT" 1865 this.SIGPIPE = "SIGPIPE";
1902 this.SIGCHLD = "SIGCHLD" 1866 this.SIGTTIN = "SIGTTIN";
1903 this.SIGTTIN = "SIGTTIN" 1867 this.SIGTERM = "SIGTERM";
1904 this.SIGTTOU = "SIGTTOU"
1905 this.SIGIO = "SIGIO"
1906 this.SIGXCPU = "SIGXCPU"
1907 this.SIGXFSZ = "SIGXFSZ"
1908 this.SIGVTALRM = "SIGVTALRM"
1909 this.SIGPROF = "SIGPROF"
1910 this.SIGWINCH = "SIGWINCH"
1911 this.SIGINFO = "SIGINFO"
1912 this.SIGUSR1 = "SIGUSR1"
1913 this.SIGUSR2 = "SIGUSR2"
1914 this._process = _process; 1868 this._process = _process;
1915 // Initializers done 1869 this.SIGBUS = "SIGBUS";
1870 this.SIGPROF = "SIGPROF";
1871 this.SIGSTOP = "SIGSTOP";
1872 this.SIGCHLD = "SIGCHLD";
1873 this.SIGILL = "SIGILL";
1874 this.SIGTRAP = "SIGTRAP";
1875 this.SIGINFO = "SIGINFO";
1876 this.SIGIO = "SIGIO";
1877 this.SIGVTALRM = "SIGVTALRM";
1878 this.SIGWINCH = "SIGWINCH";
1916 } 1879 }
1917 Process.prototype.get$argv = function() { 1880 Process.prototype.get$argv = function() {
1918 return this._process.argv; 1881 return this._process.argv;
1919 } 1882 }
1920 Process.prototype.set$argv = function(value) { 1883 Process.prototype.set$argv = function(value) {
1921 this._process.argv = value; 1884 this._process.argv = value;
1922 } 1885 }
1923 Process.prototype.get$env = function() { 1886 Process.prototype.get$env = function() {
1924 return new EnvMap(this._process); 1887 return new EnvMap(this._process);
1925 } 1888 }
1926 Process.prototype.exit = function(code) { 1889 Process.prototype.exit = function(code) {
1927 this._process.exit(code); 1890 this._process.exit(code);
1928 } 1891 }
1929 // ********** Code for EnvMap ************** 1892 // ********** Code for EnvMap **************
1930 function EnvMap(_process) { 1893 function EnvMap(_process) {
1931 this._process = _process; 1894 this._process = _process;
1932 // Initializers done
1933 } 1895 }
1934 EnvMap.prototype.$index = function(key) { 1896 EnvMap.prototype.$index = function(key) {
1935 return this._process.env[key]; 1897 return this._process.env[key];
1936 } 1898 }
1937 // ********** Code for ReadableStream ************** 1899 // ********** Code for ReadableStream **************
1938 // ********** Code for WritableStream ************** 1900 // ********** Code for WritableStream **************
1939 Object.prototype.$typeNameOf = function() { 1901 Object.prototype.$typeNameOf = function() {
1940 if ((typeof(window) != 'undefined' && window.constructor.name == 'DOMWindow') 1902 if ((typeof(window) != 'undefined' && window.constructor.name == 'DOMWindow')
1941 || typeof(process) != 'undefined') { // fast-path for Chrome and Node 1903 || typeof(process) != 'undefined') { // fast-path for Chrome and Node
1942 return this.constructor.name; 1904 return this.constructor.name;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 if (lastSlash == (-1)) { 2019 if (lastSlash == (-1)) {
2058 return path; 2020 return path;
2059 } 2021 }
2060 else { 2022 else {
2061 return path.substring(lastSlash + (1)); 2023 return path.substring(lastSlash + (1));
2062 } 2024 }
2063 } 2025 }
2064 // ********** Library file_system_node ************** 2026 // ********** Library file_system_node **************
2065 // ********** Code for NodeFileSystem ************** 2027 // ********** Code for NodeFileSystem **************
2066 function NodeFileSystem() { 2028 function NodeFileSystem() {
2067 // Initializers done 2029
2068 } 2030 }
2069 NodeFileSystem.prototype.writeString = function(outfile, text) { 2031 NodeFileSystem.prototype.writeString = function(outfile, text) {
2070 fs.writeFileSync(outfile, text); 2032 fs.writeFileSync(outfile, text);
2071 } 2033 }
2072 NodeFileSystem.prototype.readAll = function(filename) { 2034 NodeFileSystem.prototype.readAll = function(filename) {
2073 return fs.readFileSync(filename, "utf8"); 2035 return fs.readFileSync(filename, "utf8");
2074 } 2036 }
2075 NodeFileSystem.prototype.fileExists = function(filename) { 2037 NodeFileSystem.prototype.fileExists = function(filename) {
2076 return path.existsSync(filename); 2038 return path.existsSync(filename);
2077 } 2039 }
2078 // ********** Code for top level ************** 2040 // ********** Code for top level **************
2079 // ********** Library lang ************** 2041 // ********** Library lang **************
2080 // ********** Code for CodeWriter ************** 2042 // ********** Code for CodeWriter **************
2081 function CodeWriter() { 2043 function CodeWriter() {
2082 this._indentation = (0) 2044 this._indentation = (0);
2083 this._pendingIndent = false 2045 this.writeComments = true;
2084 this.writeComments = true 2046 this._pendingIndent = false;
2085 this._buf = new StringBufferImpl(""); 2047 this._buf = new StringBufferImpl("");
2086 // Initializers done
2087 } 2048 }
2088 CodeWriter.prototype.get$text = function() { 2049 CodeWriter.prototype.get$text = function() {
2089 return this._buf.toString(); 2050 return this._buf.toString();
2090 } 2051 }
2091 CodeWriter.prototype._indent = function() { 2052 CodeWriter.prototype._indent = function() {
2092 this._pendingIndent = false; 2053 this._pendingIndent = false;
2093 for (var i = (0); 2054 for (var i = (0);
2094 i < this._indentation; i++) { 2055 i < this._indentation; i++) {
2095 this._buf.add(" "); 2056 this._buf.add(" ");
2096 } 2057 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2130 this._indentation--; 2091 this._indentation--;
2131 this.writeln(text); 2092 this.writeln(text);
2132 } 2093 }
2133 CodeWriter.prototype.nextBlock = function(text) { 2094 CodeWriter.prototype.nextBlock = function(text) {
2134 this._indentation--; 2095 this._indentation--;
2135 this.writeln(text); 2096 this.writeln(text);
2136 this._indentation++; 2097 this._indentation++;
2137 } 2098 }
2138 // ********** Code for CoreJs ************** 2099 // ********** Code for CoreJs **************
2139 function CoreJs() { 2100 function CoreJs() {
2140 this.useThrow = false 2101 this.useAssert = false;
2141 this.useAssert = false 2102 this.useIsolates = false;
2142 this.useNotNullBool = false 2103 this._generatedTypeNameOf = false;
2143 this.useIndex = false
2144 this.useSetIndex = false
2145 this.useWrap0 = false
2146 this.useWrap1 = false
2147 this.useIsolates = false
2148 this._generatedTypeNameOf = false
2149 this._generatedDynamicProto = false
2150 this._generatedInherits = false
2151 this._usedOperators = new HashMapImplementation(); 2104 this._usedOperators = new HashMapImplementation();
2105 this._generatedInherits = false;
2106 this.useNotNullBool = false;
2152 this.writer = new CodeWriter(); 2107 this.writer = new CodeWriter();
2153 // Initializers done 2108 this.useWrap0 = false;
2109 this.useThrow = false;
2110 this._generatedDynamicProto = false;
2111 this.useWrap1 = false;
2112 this.useSetIndex = false;
2113 this.useIndex = false;
2154 } 2114 }
2155 CoreJs.prototype.useOperator = function(name) { 2115 CoreJs.prototype.useOperator = function(name) {
2156 if (this._usedOperators.$index(name) != null) return; 2116 if (this._usedOperators.$index(name) != null) return;
2157 var code; 2117 var code;
2158 switch (name) { 2118 switch (name) {
2159 case ":ne": 2119 case ":ne":
2160 2120
2161 code = "function $ne(x, y) {\n if (x == null) return y != null;\n return (typeof(x) == 'number' && typeof(y) == 'number') ||\n (typeof(x) == 'bo olean' && typeof(y) == 'boolean') ||\n (typeof(x) == 'string' && typeof( y) == 'string')\n ? x != y : !x.$eq(y);\n}"; 2121 code = "function $ne(x, y) {\n if (x == null) return y != null;\n return (typeof(x) == 'number' && typeof(y) == 'number') ||\n (typeof(x) == 'bo olean' && typeof(y) == 'boolean') ||\n (typeof(x) == 'string' && typeof( y) == 'string')\n ? x != y : !x.$eq(y);\n}";
2162 break; 2122 break;
2163 2123
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
2259 if ($globals.world.dom != null) { 2219 if ($globals.world.dom != null) {
2260 this.ensureTypeNameOf(); 2220 this.ensureTypeNameOf();
2261 w.writeln("Object.prototype.get$typeName = Object.prototype.$typeNameOf;"); 2221 w.writeln("Object.prototype.get$typeName = Object.prototype.$typeNameOf;");
2262 } 2222 }
2263 } 2223 }
2264 CoreJs.prototype.generate$1 = CoreJs.prototype.generate; 2224 CoreJs.prototype.generate$1 = CoreJs.prototype.generate;
2265 // ********** Code for Element ************** 2225 // ********** Code for Element **************
2266 function Element(name, _enclosingElement) { 2226 function Element(name, _enclosingElement) {
2267 this.name = name; 2227 this.name = name;
2268 this._enclosingElement = _enclosingElement; 2228 this._enclosingElement = _enclosingElement;
2269 // Initializers done
2270 this._jsname = $globals.world.toJsIdentifier(this.name); 2229 this._jsname = $globals.world.toJsIdentifier(this.name);
2271 } 2230 }
2272 Element.prototype.get$name = function() { return this.name; }; 2231 Element.prototype.get$name = function() { return this.name; };
2273 Element.prototype.set$name = function(value) { return this.name = value; }; 2232 Element.prototype.set$name = function(value) { return this.name = value; };
2274 Element.prototype.get$_jsname = function() { return this._jsname; }; 2233 Element.prototype.get$_jsname = function() { return this._jsname; };
2275 Element.prototype.set$_jsname = function(value) { return this._jsname = value; } ; 2234 Element.prototype.set$_jsname = function(value) { return this._jsname = value; } ;
2276 Element.prototype.get$library = function() { 2235 Element.prototype.get$library = function() {
2277 return null; 2236 return null;
2278 } 2237 }
2279 Element.prototype.get$span = function() { 2238 Element.prototype.get$span = function() {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
2363 } 2322 }
2364 else { 2323 else {
2365 $globals.world.internalError("unknown type reference", node.span); 2324 $globals.world.internalError("unknown type reference", node.span);
2366 } 2325 }
2367 return node.type; 2326 return node.type;
2368 } 2327 }
2369 Element.prototype.hashCode$0 = Element.prototype.hashCode; 2328 Element.prototype.hashCode$0 = Element.prototype.hashCode;
2370 Element.prototype.resolve$0 = Element.prototype.resolve; 2329 Element.prototype.resolve$0 = Element.prototype.resolve;
2371 // ********** Code for WorldGenerator ************** 2330 // ********** Code for WorldGenerator **************
2372 function WorldGenerator(main, writer) { 2331 function WorldGenerator(main, writer) {
2373 this.hasStatics = false
2374 this.main = main; 2332 this.main = main;
2333 this.hasStatics = false;
2334 this.corejs = new CoreJs();
2335 this.globals = new HashMapImplementation();
2375 this.writer = writer; 2336 this.writer = writer;
2376 this.globals = new HashMapImplementation();
2377 this.corejs = new CoreJs();
2378 // Initializers done
2379 } 2337 }
2380 WorldGenerator.prototype.run = function() { 2338 WorldGenerator.prototype.run = function() {
2381 var metaGen = new MethodGenerator(this.main, null); 2339 var metaGen = new MethodGenerator(this.main, null);
2382 var mainTarget = new Value.type$ctor(this.main.declaringType, this.main.get$sp an()); 2340 var mainTarget = new Value.type$ctor(this.main.declaringType, this.main.get$sp an());
2383 var mainCall = this.main.invoke(metaGen, null, mainTarget, Arguments.get$EMPTY (), false); 2341 var mainCall = this.main.invoke(metaGen, null, mainTarget, Arguments.get$EMPTY (), false);
2384 this.main.declaringType.markUsed(); 2342 this.main.declaringType.markUsed();
2385 if ($globals.options.compileAll) { 2343 if ($globals.options.compileAll) {
2386 this.markLibrariesUsed([$globals.world.coreimpl, $globals.world.corelib, thi s.main.declaringType.get$library()]); 2344 this.markLibrariesUsed([$globals.world.coreimpl, $globals.world.corelib, thi s.main.declaringType.get$library()]);
2387 } 2345 }
2388 $globals.world.numImplType.markUsed(); 2346 $globals.world.numImplType.markUsed();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
2463 if (ret == null) { 2421 if (ret == null) {
2464 ret = new GlobalValue(exp.get$type(), exp.get$code(), field.isFinal, field, null, exp, exp.span, dependencies); 2422 ret = new GlobalValue(exp.get$type(), exp.get$code(), field.isFinal, field, null, exp, exp.span, dependencies);
2465 this.globals.$setindex(key, ret); 2423 this.globals.$setindex(key, ret);
2466 } 2424 }
2467 return ret; 2425 return ret;
2468 } 2426 }
2469 WorldGenerator.prototype.globalForConst = function(exp, dependencies) { 2427 WorldGenerator.prototype.globalForConst = function(exp, dependencies) {
2470 var key = exp.get$type().get$jsname() + ":" + exp.get$code(); 2428 var key = exp.get$type().get$jsname() + ":" + exp.get$code();
2471 var ret = this.globals.$index(key); 2429 var ret = this.globals.$index(key);
2472 if (ret == null) { 2430 if (ret == null) {
2473 var name = ("const$" + this.globals.get$length()); 2431 var ns = this.globals.get$length().toString();
2432 while (ns.get$length() < (4)) ns = "0" + ns;
2433 var name = ("const$" + ns);
2474 ret = new GlobalValue(exp.get$type(), name, true, null, name, exp, exp.span, dependencies); 2434 ret = new GlobalValue(exp.get$type(), name, true, null, name, exp, exp.span, dependencies);
2475 this.globals.$setindex(key, ret); 2435 this.globals.$setindex(key, ret);
2476 } 2436 }
2477 return ret; 2437 return ret;
2478 } 2438 }
2479 WorldGenerator.prototype.writeTypes = function(lib) { 2439 WorldGenerator.prototype.writeTypes = function(lib) {
2480 if (lib.isWritten) return; 2440 if (lib.isWritten) return;
2481 lib.isWritten = true; 2441 lib.isWritten = true;
2482 var $$list = lib.imports; 2442 var $$list = lib.imports;
2483 for (var $$i = 0;$$i < $$list.get$length(); $$i++) { 2443 for (var $$i = 0;$$i < $$list.get$length(); $$i++) {
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
2904 if (x.get$span() == null) return (1); 2864 if (x.get$span() == null) return (1);
2905 if (y.get$span() == null) return (-1); 2865 if (y.get$span() == null) return (-1);
2906 return x.get$name().compareTo$1(y.get$name()); 2866 return x.get$name().compareTo$1(y.get$name());
2907 } 2867 }
2908 WorldGenerator.prototype.get$_compareMembers = function() { 2868 WorldGenerator.prototype.get$_compareMembers = function() {
2909 return this._compareMembers.bind(this); 2869 return this._compareMembers.bind(this);
2910 } 2870 }
2911 // ********** Code for BlockScope ************** 2871 // ********** Code for BlockScope **************
2912 function BlockScope(enclosingMethod, parent, reentrant) { 2872 function BlockScope(enclosingMethod, parent, reentrant) {
2913 this.enclosingMethod = enclosingMethod; 2873 this.enclosingMethod = enclosingMethod;
2874 this._vars = new HashMapImplementation();
2914 this.parent = parent; 2875 this.parent = parent;
2915 this.reentrant = reentrant; 2876 this.reentrant = reentrant;
2916 this._vars = new HashMapImplementation();
2917 this._jsNames = new HashSetImplementation(); 2877 this._jsNames = new HashSetImplementation();
2918 // Initializers done
2919 if (this.get$isMethodScope()) { 2878 if (this.get$isMethodScope()) {
2920 this._closedOver = new HashSetImplementation(); 2879 this._closedOver = new HashSetImplementation();
2921 } 2880 }
2922 else { 2881 else {
2923 this.reentrant = reentrant || this.parent.reentrant; 2882 this.reentrant = reentrant || this.parent.reentrant;
2924 } 2883 }
2925 } 2884 }
2926 BlockScope.prototype.get$enclosingMethod = function() { return this.enclosingMet hod; }; 2885 BlockScope.prototype.get$enclosingMethod = function() { return this.enclosingMet hod; };
2927 BlockScope.prototype.set$enclosingMethod = function(value) { return this.enclosi ngMethod = value; }; 2886 BlockScope.prototype.set$enclosingMethod = function(value) { return this.enclosi ngMethod = value; };
2928 BlockScope.prototype.get$parent = function() { return this.parent; }; 2887 BlockScope.prototype.get$parent = function() { return this.parent; };
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
3000 } 2959 }
3001 BlockScope.prototype.getRethrow = function() { 2960 BlockScope.prototype.getRethrow = function() {
3002 var scope = this; 2961 var scope = this;
3003 while (scope.get$rethrow() == null && scope.get$parent() != null) { 2962 while (scope.get$rethrow() == null && scope.get$parent() != null) {
3004 scope = scope.get$parent(); 2963 scope = scope.get$parent();
3005 } 2964 }
3006 return scope.get$rethrow(); 2965 return scope.get$rethrow();
3007 } 2966 }
3008 // ********** Code for MethodGenerator ************** 2967 // ********** Code for MethodGenerator **************
3009 function MethodGenerator(method, enclosingMethod) { 2968 function MethodGenerator(method, enclosingMethod) {
2969 this.enclosingMethod = enclosingMethod;
2970 this.needsThis = false;
3010 this.method = method; 2971 this.method = method;
3011 this.enclosingMethod = enclosingMethod;
3012 this.writer = new CodeWriter(); 2972 this.writer = new CodeWriter();
3013 this.needsThis = false;
3014 // Initializers done
3015 if (this.enclosingMethod != null) { 2973 if (this.enclosingMethod != null) {
3016 this._scope = new BlockScope(this, this.enclosingMethod._scope, false); 2974 this._scope = new BlockScope(this, this.enclosingMethod._scope, false);
3017 this.captures = new HashSetImplementation(); 2975 this.captures = new HashSetImplementation();
3018 } 2976 }
3019 else { 2977 else {
3020 this._scope = new BlockScope(this, null, false); 2978 this._scope = new BlockScope(this, null, false);
3021 } 2979 }
3022 this._usedTemps = new HashSetImplementation(); 2980 this._usedTemps = new HashSetImplementation();
3023 this._freeTemps = []; 2981 this._freeTemps = [];
3024 } 2982 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
3067 this._freeTemps.add(value.get$code()); 3025 this._freeTemps.add(value.get$code());
3068 } 3026 }
3069 else { 3027 else {
3070 $globals.world.internalError(("tried to free unused value or non-temp \"" + value.get$code() + "\"")); 3028 $globals.world.internalError(("tried to free unused value or non-temp \"" + value.get$code() + "\""));
3071 } 3029 }
3072 } 3030 }
3073 MethodGenerator.prototype.run = function() { 3031 MethodGenerator.prototype.run = function() {
3074 if (this.method.isGenerated) return; 3032 if (this.method.isGenerated) return;
3075 this.method.isGenerated = true; 3033 this.method.isGenerated = true;
3076 this.method.generator = this; 3034 this.method.generator = this;
3077 this.writeBody(); 3035 var thisObject;
3036 if (this.method.get$isConstructor()) {
3037 thisObject = new ObjectValue(false, this.method.declaringType, this.method.g et$span());
3038 thisObject.initFields$0();
3039 }
3040 else {
3041 thisObject = new Value(this.method.declaringType, "this", null, true);
3042 }
3043 var values = [];
3044 var $$list = this.method.get$parameters();
3045 for (var $$i = 0;$$i < $$list.get$length(); $$i++) {
3046 var p = $$list.$index($$i);
3047 values.add$1(new Value(p.get$type(), p.get$name(), null, true));
3048 }
3049 var args = new Arguments(null, values);
3050 this.evalBody(thisObject, args);
3078 if (this.method.get$definition().get$nativeBody() != null) { 3051 if (this.method.get$definition().get$nativeBody() != null) {
3079 this.writer = new CodeWriter(); 3052 this.writer = new CodeWriter();
3080 if ($eq(this.method.get$definition().get$nativeBody(), "")) { 3053 if ($eq(this.method.get$definition().get$nativeBody(), "")) {
3081 this.method.generator = null; 3054 this.method.generator = null;
3082 } 3055 }
3083 else { 3056 else {
3084 this._paramCode = map(this.method.get$parameters(), (function (p) { 3057 this._paramCode = map(this.method.get$parameters(), (function (p) {
3085 return p.get$name(); 3058 return p.get$name();
3086 }) 3059 })
3087 ); 3060 );
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
3203 else { 3176 else {
3204 start = meth.declaringType.get$jsname() + ".prototype."; 3177 start = meth.declaringType.get$jsname() + ".prototype.";
3205 } 3178 }
3206 optNames.addAll$1(optValues); 3179 optNames.addAll$1(optValues);
3207 var optional = "['" + Strings.join(optNames, "', '") + "']"; 3180 var optional = "['" + Strings.join(optNames, "', '") + "']";
3208 defWriter.writeln(("" + start + meth.get$jsname() + ".$optional = " + op tional)); 3181 defWriter.writeln(("" + start + meth.get$jsname() + ".$optional = " + op tional));
3209 } 3182 }
3210 } 3183 }
3211 } 3184 }
3212 } 3185 }
3213 MethodGenerator.prototype.writeBody = function() { 3186 MethodGenerator.prototype._initField = function(newObject, name, value, span) {
3214 var initializers = null; 3187 var field = this.method.declaringType.getMember(name);
3215 var initializedFields = null; 3188 if (field == null) {
3216 var allMembers = null; 3189 $globals.world.error("bad initializer - no matching field", span);
3217 if (this.method.get$isConstructor()) { 3190 }
3218 initializers = []; 3191 if (!field.get$isField()) {
3219 initializedFields = new HashSetImplementation(); 3192 $globals.world.error(("\"this." + name + "\" does not refer to a field"), sp an);
3220 allMembers = $globals.world.gen._orderValues(this.method.declaringType.getAl lMembers()); 3193 }
3221 for (var $$i = allMembers.iterator$0(); $$i.hasNext$0(); ) { 3194 return newObject.setField(field, value, true);
3222 var f = $$i.next$0(); 3195 }
3223 if (f.get$isField() && !f.get$isStatic()) { 3196 MethodGenerator.prototype.evalBody = function(newObject, args) {
3224 var cv = f.computeValue$0(); 3197 var fieldsSet = false;
3225 if (cv != null) { 3198 if (this.method.get$isNative() && this.method.get$isConstructor() && (newObjec t instanceof ObjectValue)) {
3226 initializers.add$1(("this." + f.get$jsname() + " = " + cv.get$code())) ; 3199 newObject.get$dynamic().set$seenNativeInitializer(true);
3227 initializedFields.add$1(f.get$name()); 3200 }
3228 } 3201 this._paramCode = [];
3202 for (var i = (0);
3203 i < this.method.get$parameters().get$length(); i++) {
3204 var p = this.method.get$parameters().$index(i);
3205 var currentArg = null;
3206 if (i < args.get$bareCount()) {
3207 currentArg = args.values.$index(i);
3208 }
3209 else {
3210 currentArg = args.getValue(p.get$name());
3211 if (currentArg == null) {
3212 p.genValue$2(this.method, this.method.generator);
3213 currentArg = p.get$value();
3229 } 3214 }
3230 } 3215 }
3231 } 3216 if (p.get$isInitializer()) {
3232 this._paramCode = []; 3217 this._paramCode.add(p.get$name());
3233 var $$list = this.method.get$parameters(); 3218 fieldsSet = true;
3234 for (var $$i = 0;$$i < $$list.get$length(); $$i++) { 3219 this._initField(newObject, p.get$name(), currentArg, p.get$definition().ge t$span());
3235 var p = $$list.$index($$i);
3236 if (initializers != null && p.get$isInitializer()) {
3237 var field = this.method.declaringType.getMember(p.get$name());
3238 if (field == null) {
3239 $globals.world.error("bad this parameter - no matching field", p.get$def inition().get$span());
3240 }
3241 if (!field.get$isField()) {
3242 $globals.world.error(("\"this." + p.get$name() + "\" does not refer to a field"), p.get$definition().get$span());
3243 }
3244 var paramValue = new Value(field.get$returnType(), p.get$name(), p.get$def inition().get$span(), false);
3245 this._paramCode.add(paramValue.get$code());
3246 initializers.add$1(("this." + field.get$jsname() + " = " + paramValue.get$ code() + ";"));
3247 initializedFields.add$1(p.get$name());
3248 } 3220 }
3249 else { 3221 else {
3250 var paramValue = this._scope.declareParameter(p); 3222 var paramValue = this._scope.declareParameter(p);
3251 this._paramCode.add(paramValue.get$code()); 3223 this._paramCode.add(paramValue.get$code());
3224 if (newObject != null && newObject.get$isConst()) {
3225 this._scope._vars.$setindex(p.get$name(), currentArg);
3226 }
3252 } 3227 }
3253 } 3228 }
3254 var body = this.method.get$definition().get$body();
3255 if (body == null && !this.method.get$isConstructor() && !this.method.get$isNat ive()) {
3256 $globals.world.error(("unexpected empty body for " + this.method.name), this .method.get$definition().get$span());
3257 }
3258 var initializerCall = null; 3229 var initializerCall = null;
3259 var declaredInitializers = this.method.get$definition().get$initializers(); 3230 var declaredInitializers = this.method.get$definition().get$initializers();
3260 if (initializers != null) { 3231 if (declaredInitializers != null) {
3261 for (var $$i = initializers.iterator$0(); $$i.hasNext$0(); ) { 3232 for (var $$i = declaredInitializers.iterator$0(); $$i.hasNext$0(); ) {
3262 var i = $$i.next$0(); 3233 var init = $$i.next$0();
3263 this.writer.writeln(i); 3234 if ((init instanceof CallExpression)) {
3264 } 3235 if (initializerCall != null) {
3265 if (declaredInitializers != null) { 3236 $globals.world.error("only one initializer redirecting call is allowed ", init.get$span());
3266 for (var $$i = declaredInitializers.iterator$0(); $$i.hasNext$0(); ) {
3267 var init = $$i.next$0();
3268 if ((init instanceof CallExpression)) {
3269 if (initializerCall != null) {
3270 $globals.world.error("only one initializer redirecting call is allow ed", init.get$span());
3271 }
3272 initializerCall = init;
3273 } 3237 }
3274 else if ((init instanceof BinaryExpression) && TokenKind.kindFromAssign( init.get$op().get$kind()) == (0)) { 3238 initializerCall = init;
3275 var left = init.get$x(); 3239 }
3276 if (!((left instanceof DotExpression) && (left.get$self() instanceof T hisExpression) || (left instanceof VarExpression))) { 3240 else if ((init instanceof BinaryExpression) && TokenKind.kindFromAssign(in it.get$op().get$kind()) == (0)) {
3277 $globals.world.error("invalid left side of initializer", left.get$sp an()); 3241 var left = init.get$x();
3278 continue; 3242 if (!((left instanceof DotExpression) && (left.get$self() instanceof Thi sExpression) || (left instanceof VarExpression))) {
3279 } 3243 $globals.world.error("invalid left side of initializer", left.get$span ());
3280 var f = this.method.declaringType.getMember(left.get$name().get$name() ); 3244 continue;
3281 if (f == null) {
3282 $globals.world.error("bad initializer - no matching field", left.get $span());
3283 continue;
3284 }
3285 else if (!f.get$isField()) {
3286 $globals.world.error(("\"" + left.get$name().get$name() + "\" does n ot refer to a field"), left.get$span());
3287 continue;
3288 }
3289 initializedFields.add$1(f.get$name());
3290 this.writer.writeln(("this." + f.get$jsname() + " = " + this.visitValu e(init.get$y()).get$code() + ";"));
3291 } 3245 }
3292 else { 3246 var initValue = this.visitValue(init.get$y());
3293 $globals.world.error("invalid initializer", init.get$span()); 3247 fieldsSet = true;
3294 } 3248 this._initField(newObject, left.get$name().get$name(), initValue, left.g et$span());
3249 }
3250 else {
3251 $globals.world.error("invalid initializer", init.get$span());
3295 } 3252 }
3296 } 3253 }
3297 this.writer.comment("// Initializers done");
3298 } 3254 }
3299 if (this.method.get$isConstructor() && initializerCall == null && !this.method .get$isNative()) { 3255 if (this.method.get$isConstructor() && initializerCall == null && !this.method .get$isNative()) {
3300 var parentType = this.method.declaringType.get$parent(); 3256 var parentType = this.method.declaringType.get$parent();
3301 if (parentType != null && !parentType.get$isObject()) { 3257 if (parentType != null && !parentType.get$isObject()) {
3302 initializerCall = new CallExpression(new SuperExpression(this.method.get$s pan()), [], this.method.get$span()); 3258 initializerCall = new CallExpression(new SuperExpression(this.method.get$s pan()), [], this.method.get$span());
3303 } 3259 }
3304 } 3260 }
3305 if (initializerCall != null) { 3261 if (this.method.get$isConstructor() && (newObject instanceof ObjectValue)) {
3306 var target = this._writeInitializerCall(initializerCall); 3262 var fields = newObject.get$dynamic().get$fields();
3307 if (!target.get$isSuper()) { 3263 var $$list = fields.getKeys$0();
3308 if (initializers.get$length() > (0)) { 3264 for (var $$i = fields.getKeys$0().iterator$0(); $$i.hasNext$0(); ) {
3309 var $$list = this.method.get$parameters(); 3265 var field = $$i.next$0();
3310 for (var $$i = 0;$$i < $$list.get$length(); $$i++) { 3266 var value = fields.$index(field);
3311 var p = $$list.$index($$i); 3267 if (value != null) {
3312 if (p.get$isInitializer()) { 3268 this.writer.writeln(("this." + field.get$jsname() + " = " + value.get$co de() + ";"));
3313 $globals.world.error("no initialization allowed on redirecting const ructors", p.get$definition().get$span());
3314 break;
3315 }
3316 }
3317 }
3318 if (declaredInitializers != null && declaredInitializers.get$length() > (1 )) {
3319 var init = $eq(declaredInitializers.$index((0)), initializerCall) ? decl aredInitializers.$index((1)) : declaredInitializers.$index((0));
3320 $globals.world.error("no initialization allowed on redirecting construct ors", init.get$span());
3321 }
3322 initializedFields = null;
3323 }
3324 }
3325 if (initializedFields != null) {
3326 for (var $$i = allMembers.iterator$0(); $$i.hasNext$0(); ) {
3327 var member = $$i.next$0();
3328 if (member.get$isField() && member.get$isFinal() && !member.get$isStatic() && !this.method.get$isNative() && !initializedFields.contains$1(member.get$name ())) {
3329 $globals.world.error(("Field \"" + member.get$name() + "\" is final and was not initialized"), this.method.get$definition().get$span());
3330 } 3269 }
3331 } 3270 }
3332 } 3271 }
3333 this.visitStatementsInBlock(body); 3272 if (initializerCall != null) {
3273 this.evalInitializerCall(newObject, initializerCall, fieldsSet);
3274 }
3275 if (this.method.get$isConstructor() && newObject != null && newObject.get$isCo nst()) {
3276 newObject.validateInitialized(this.method.get$span());
3277 }
3278 else if (this.method.get$isConstructor()) {
3279 var fields = newObject.get$dynamic().get$fields();
3280 var $$list = fields.getKeys$0();
3281 for (var $$i = fields.getKeys$0().iterator$0(); $$i.hasNext$0(); ) {
3282 var field = $$i.next$0();
3283 var value = fields.$index(field);
3284 if (value == null && field.get$isFinal() && $eq(field.get$declaringType(), this.method.declaringType) && !newObject.get$dynamic().get$seenNativeInitialize r()) {
3285 $globals.world.error(("uninitialized final field \"" + field.get$name() + "\""), field.get$span(), this.method.get$span());
3286 }
3287 }
3288 }
3289 var body = this.method.get$definition().get$body();
3290 if (body == null) {
3291 if (!this.method.get$isConstructor() && !this.method.get$isNative()) {
3292 $globals.world.error(("unexpected empty body for " + this.method.name), th is.method.get$definition().get$span());
3293 }
3294 }
3295 else {
3296 this.visitStatementsInBlock(body);
3297 }
3334 } 3298 }
3335 MethodGenerator.prototype._writeInitializerCall = function(node) { 3299 MethodGenerator.prototype.evalInitializerCall = function(newObject, node, fields Set) {
3336 var contructorName = ""; 3300 var contructorName = "";
3337 var targetExp = node.target; 3301 var targetExp = node.target;
3338 if ((targetExp instanceof DotExpression)) { 3302 if ((targetExp instanceof DotExpression)) {
3339 var dot = targetExp; 3303 var dot = targetExp;
3340 targetExp = dot.self; 3304 targetExp = dot.self;
3341 contructorName = dot.name.name; 3305 contructorName = dot.name.name;
3342 } 3306 }
3307 var targetType = null;
3343 var target = null; 3308 var target = null;
3344 if ((targetExp instanceof SuperExpression)) { 3309 if ((targetExp instanceof SuperExpression)) {
3310 targetType = this.method.declaringType.get$parent();
3345 target = this._makeSuperValue(targetExp); 3311 target = this._makeSuperValue(targetExp);
3346 } 3312 }
3347 else if ((targetExp instanceof ThisExpression)) { 3313 else if ((targetExp instanceof ThisExpression)) {
3314 targetType = this.method.declaringType;
3348 target = this._makeThisValue(targetExp); 3315 target = this._makeThisValue(targetExp);
3316 if (fieldsSet) {
3317 $globals.world.error("no initialization allowed with redirecting construct or", node.span);
3318 }
3349 } 3319 }
3350 else { 3320 else {
3351 $globals.world.error("bad call in initializers", node.span); 3321 $globals.world.error("bad call in initializers", node.span);
3352 } 3322 }
3353 target.set$allowDynamic(false); 3323 target.set$allowDynamic(false);
3354 var m = target.get$type().getConstructor$1(contructorName); 3324 var m = targetType.getConstructor(contructorName);
3355 if (m == null) { 3325 if (m == null) {
3356 $globals.world.error(("no matching constructor for " + target.get$type().get $name()), node.span); 3326 $globals.world.error(("no matching constructor for " + targetType.name), nod e.span);
3357 } 3327 }
3358 this.method.set$initDelegate(m); 3328 this.method.set$initDelegate(m);
3359 var other = m; 3329 var other = m;
3360 while (other != null) { 3330 while (other != null) {
3361 if ($eq(other, this.method)) { 3331 if ($eq(other, this.method)) {
3362 $globals.world.error("initialization cycle", node.span); 3332 $globals.world.error("initialization cycle", node.span);
3363 break; 3333 break;
3364 } 3334 }
3365 other = other.get$initDelegate(); 3335 other = other.get$initDelegate();
3366 } 3336 }
3337 var newArgs = this._makeArgs(node.arguments);
3367 $globals.world.gen.genMethod(m); 3338 $globals.world.gen.genMethod(m);
3368 var value = m.invoke$4(this, node, target, this._makeArgs(node.arguments)); 3339 m._evalConstConstructor$2(newObject, newArgs);
3369 if ($ne(target.get$type(), $globals.world.objectType)) { 3340 if (!newObject.isConst) {
3370 this.writer.writeln(("" + value.get$code() + ";")); 3341 var value = m.invoke$4(this, node, target, newArgs);
3342 if ($ne(target.get$type(), $globals.world.objectType)) {
3343 this.writer.writeln(("" + value.get$code() + ";"));
3344 }
3371 } 3345 }
3372 return target;
3373 } 3346 }
3374 MethodGenerator.prototype._makeArgs = function(arguments) { 3347 MethodGenerator.prototype._makeArgs = function(arguments) {
3375 var args = []; 3348 var args = [];
3376 var seenLabel = false; 3349 var seenLabel = false;
3377 for (var $$i = 0;$$i < arguments.get$length(); $$i++) { 3350 for (var $$i = 0;$$i < arguments.get$length(); $$i++) {
3378 var arg = arguments.$index($$i); 3351 var arg = arguments.$index($$i);
3379 if (arg.get$label() != null) { 3352 if (arg.get$label() != null) {
3380 seenLabel = true; 3353 seenLabel = true;
3381 } 3354 }
3382 else if (seenLabel) { 3355 else if (seenLabel) {
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
4081 if (value.get$type().get$isNum()) { 4054 if (value.get$type().get$isNum()) {
4082 return new Value(value.get$type(), ("" + node.op + value.get$code()), no de.span, true); 4055 return new Value(value.get$type(), ("" + node.op + value.get$code()), no de.span, true);
4083 } 4056 }
4084 else { 4057 else {
4085 var kind = ((16) == node.op.kind ? (42) : (43)); 4058 var kind = ((16) == node.op.kind ? (42) : (43));
4086 var operand = new LiteralExpression(Value.fromInt((1), node.span), node. span); 4059 var operand = new LiteralExpression(Value.fromInt((1), node.span), node. span);
4087 var assignValue = this._visitAssign(kind, node.self, operand, node, to$c all$1(null), false); 4060 var assignValue = this._visitAssign(kind, node.self, operand, node, to$c all$1(null), false);
4088 return new Value(assignValue.get$type(), ("(" + assignValue.get$code() + ")"), node.span, true); 4061 return new Value(assignValue.get$type(), ("(" + assignValue.get$code() + ")"), node.span, true);
4089 } 4062 }
4090 4063
4091 case (19):
4092
4093 if (value.get$type().get$isBool() && value.get$isConst()) {
4094 var newVal = !value.get$actualValue();
4095 return Value.fromBool(newVal, node.span);
4096 }
4097 else {
4098 var newVal = value.convertTo$2(this, $globals.world.nonNullBool);
4099 return new Value(newVal.get$type(), ("!" + newVal.get$code()), node.span , true);
4100 }
4101
4102 case (42):
4103
4104 return value.convertTo$2(this, $globals.world.numType);
4105
4106 case (43):
4107 case (18):
4108
4109 if (node.op.kind == (18)) {
4110 return value.invoke$4(this, ":bit_not", node, Arguments.get$EMPTY());
4111 }
4112 else if (node.op.kind == (43)) {
4113 return value.invoke$4(this, ":negate", node, Arguments.get$EMPTY());
4114 }
4115 else {
4116 $globals.world.internalError(("unimplemented: unary " + node.op), node.s pan);
4117 }
4118 $throw(new FallThroughError());
4119
4120 default:
4121
4122 $globals.world.internalError(("unimplemented: " + node.op), node.span);
4123
4124 } 4064 }
4065 return value.unop$3(node.op.kind, this, node);
4125 } 4066 }
4126 MethodGenerator.prototype.visitDeclaredIdentifier = function(node) { 4067 MethodGenerator.prototype.visitDeclaredIdentifier = function(node) {
4127 $globals.world.error("Expected expression", node.span); 4068 $globals.world.error("Expected expression", node.span);
4128 } 4069 }
4129 MethodGenerator.prototype.visitAwaitExpression = function(node) { 4070 MethodGenerator.prototype.visitAwaitExpression = function(node) {
4130 $globals.world.internalError("Await expressions should have been eliminated be fore code generation", node.span); 4071 $globals.world.internalError("Await expressions should have been eliminated be fore code generation", node.span);
4131 } 4072 }
4132 MethodGenerator.prototype.visitPostfixExpression = function(node, isVoid) { 4073 MethodGenerator.prototype.visitPostfixExpression = function(node, isVoid) {
4133 var $this = this; // closure support 4074 var $this = this; // closure support
4134 var value = this.visitValue(node.body); 4075 var value = this.visitValue(node.body);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
4329 if (this._expressionNeedsParens(item)) { 4270 if (this._expressionNeedsParens(item)) {
4330 code = ("(" + code + ")"); 4271 code = ("(" + code + ")");
4331 } 4272 }
4332 if ($eq(items.get$length(), (0)) || ($ne(code, "''") && $ne(code, "\"\""))) { 4273 if ($eq(items.get$length(), (0)) || ($ne(code, "''") && $ne(code, "\"\""))) {
4333 items.add$1(code); 4274 items.add$1(code);
4334 } 4275 }
4335 } 4276 }
4336 return new Value($globals.world.stringType, ("(" + Strings.join(items, " + ") + ")"), node.span, true); 4277 return new Value($globals.world.stringType, ("(" + Strings.join(items, " + ") + ")"), node.span, true);
4337 } 4278 }
4338 MethodGenerator.prototype._checkNonStatic$1 = MethodGenerator.prototype._checkNo nStatic; 4279 MethodGenerator.prototype._checkNonStatic$1 = MethodGenerator.prototype._checkNo nStatic;
4280 MethodGenerator.prototype.evalBody$2 = MethodGenerator.prototype.evalBody;
4339 MethodGenerator.prototype.visitBinaryExpression$1 = function($0) { 4281 MethodGenerator.prototype.visitBinaryExpression$1 = function($0) {
4340 return this.visitBinaryExpression($0, false); 4282 return this.visitBinaryExpression($0, false);
4341 }; 4283 };
4342 MethodGenerator.prototype.visitPostfixExpression$1 = function($0) { 4284 MethodGenerator.prototype.visitPostfixExpression$1 = function($0) {
4343 return this.visitPostfixExpression($0, false); 4285 return this.visitPostfixExpression($0, false);
4344 }; 4286 };
4345 MethodGenerator.prototype.writeDefinition$2 = MethodGenerator.prototype.writeDef inition; 4287 MethodGenerator.prototype.writeDefinition$2 = MethodGenerator.prototype.writeDef inition;
4346 // ********** Code for Arguments ************** 4288 // ********** Code for Arguments **************
4347 function Arguments(nodes, values) { 4289 function Arguments(nodes, values) {
4348 this.nodes = nodes; 4290 this.nodes = nodes;
4349 this.values = values; 4291 this.values = values;
4350 // Initializers done
4351 } 4292 }
4352 Arguments.Arguments$bare$factory = function(arity) { 4293 Arguments.Arguments$bare$factory = function(arity) {
4353 var values = []; 4294 var values = [];
4354 for (var i = (0); 4295 for (var i = (0);
4355 i < arity; i++) { 4296 i < arity; i++) {
4356 values.add$1(new Value($globals.world.varType, ("$" + i), null, false)); 4297 values.add$1(new Value($globals.world.varType, ("$" + i), null, false));
4357 } 4298 }
4358 return new Arguments(null, values); 4299 return new Arguments(null, values);
4359 } 4300 }
4360 Arguments.get$EMPTY = function() { 4301 Arguments.get$EMPTY = function() {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
4436 var name = this.getName(i); 4377 var name = this.getName(i);
4437 if (name == null) name = ("$" + i); 4378 if (name == null) name = ("$" + i);
4438 result.add$1(new Value($globals.world.varType, name, null, false)); 4379 result.add$1(new Value($globals.world.varType, name, null, false));
4439 } 4380 }
4440 return new Arguments(this.nodes, result); 4381 return new Arguments(this.nodes, result);
4441 } 4382 }
4442 // ********** Code for LibraryImport ************** 4383 // ********** Code for LibraryImport **************
4443 function LibraryImport(library, prefix) { 4384 function LibraryImport(library, prefix) {
4444 this.library = library; 4385 this.library = library;
4445 this.prefix = prefix; 4386 this.prefix = prefix;
4446 // Initializers done
4447 } 4387 }
4448 LibraryImport.prototype.get$prefix = function() { return this.prefix; }; 4388 LibraryImport.prototype.get$prefix = function() { return this.prefix; };
4449 LibraryImport.prototype.set$prefix = function(value) { return this.prefix = valu e; }; 4389 LibraryImport.prototype.set$prefix = function(value) { return this.prefix = valu e; };
4450 LibraryImport.prototype.get$library = function() { return this.library; }; 4390 LibraryImport.prototype.get$library = function() { return this.library; };
4451 LibraryImport.prototype.set$library = function(value) { return this.library = va lue; }; 4391 LibraryImport.prototype.set$library = function(value) { return this.library = va lue; };
4452 // ********** Code for Library ************** 4392 // ********** Code for Library **************
4453 $inherits(Library, Element); 4393 $inherits(Library, Element);
4454 function Library(baseSource) { 4394 function Library(baseSource) {
4455 this.isWritten = false
4456 this.baseSource = baseSource; 4395 this.baseSource = baseSource;
4457 // Initializers done 4396 this.isWritten = false;
4458 Element.call(this, null, null); 4397 Element.call(this, null, null);
4459 this.sourceDir = dirname(this.baseSource.filename); 4398 this.sourceDir = dirname(this.baseSource.filename);
4460 this.topType = new DefinedType(null, this, null, true); 4399 this.topType = new DefinedType(null, this, null, true);
4461 this.types = _map(["", this.topType]); 4400 this.types = _map(["", this.topType]);
4462 this.imports = []; 4401 this.imports = [];
4463 this.natives = []; 4402 this.natives = [];
4464 this.sources = []; 4403 this.sources = [];
4465 this._privateMembers = new HashMapImplementation(); 4404 this._privateMembers = new HashMapImplementation();
4466 } 4405 }
4467 Library.prototype.get$baseSource = function() { return this.baseSource; }; 4406 Library.prototype.get$baseSource = function() { return this.baseSource; };
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
4701 Library.prototype.$eq = function(other) { 4640 Library.prototype.$eq = function(other) {
4702 return (other instanceof Library) && $eq(other.get$baseSource().get$filename() , this.baseSource.filename); 4641 return (other instanceof Library) && $eq(other.get$baseSource().get$filename() , this.baseSource.filename);
4703 } 4642 }
4704 Library.prototype.findTypeByName$1 = Library.prototype.findTypeByName; 4643 Library.prototype.findTypeByName$1 = Library.prototype.findTypeByName;
4705 Library.prototype.hashCode$0 = Library.prototype.hashCode; 4644 Library.prototype.hashCode$0 = Library.prototype.hashCode;
4706 Library.prototype.resolve$0 = Library.prototype.resolve; 4645 Library.prototype.resolve$0 = Library.prototype.resolve;
4707 Library.prototype.toString$0 = Library.prototype.toString; 4646 Library.prototype.toString$0 = Library.prototype.toString;
4708 Library.prototype.visitSources$0 = Library.prototype.visitSources; 4647 Library.prototype.visitSources$0 = Library.prototype.visitSources;
4709 // ********** Code for _LibraryVisitor ************** 4648 // ********** Code for _LibraryVisitor **************
4710 function _LibraryVisitor(library) { 4649 function _LibraryVisitor(library) {
4711 this.seenImport = false
4712 this.seenSource = false
4713 this.seenResource = false
4714 this.isTop = true
4715 this.library = library; 4650 this.library = library;
4716 // Initializers done 4651 this.isTop = true;
4652 this.seenSource = false;
4653 this.seenResource = false;
4654 this.seenImport = false;
4717 this.currentType = this.library.topType; 4655 this.currentType = this.library.topType;
4718 this.sources = []; 4656 this.sources = [];
4719 } 4657 }
4720 _LibraryVisitor.prototype.get$library = function() { return this.library; }; 4658 _LibraryVisitor.prototype.get$library = function() { return this.library; };
4721 _LibraryVisitor.prototype.get$isTop = function() { return this.isTop; }; 4659 _LibraryVisitor.prototype.get$isTop = function() { return this.isTop; };
4722 _LibraryVisitor.prototype.set$isTop = function(value) { return this.isTop = valu e; }; 4660 _LibraryVisitor.prototype.set$isTop = function(value) { return this.isTop = valu e; };
4723 _LibraryVisitor.prototype.addSourceFromName = function(name, span) { 4661 _LibraryVisitor.prototype.addSourceFromName = function(name, span) {
4724 var filename = this.library.makeFullPath(name); 4662 var filename = this.library.makeFullPath(name);
4725 if ($eq(filename, this.library.baseSource.filename)) { 4663 if ($eq(filename, this.library.baseSource.filename)) {
4726 $globals.world.error("library can not source itself", span); 4664 $globals.world.error("library can not source itself", span);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
4893 _LibraryVisitor.prototype.visitFunctionDefinition = function(node) { 4831 _LibraryVisitor.prototype.visitFunctionDefinition = function(node) {
4894 this.currentType.addMethod(node.name.name, node); 4832 this.currentType.addMethod(node.name.name, node);
4895 } 4833 }
4896 _LibraryVisitor.prototype.visitFunctionTypeDefinition = function(node) { 4834 _LibraryVisitor.prototype.visitFunctionTypeDefinition = function(node) {
4897 var type = this.library.addType(node.func.name.name, node, false); 4835 var type = this.library.addType(node.func.name.name, node, false);
4898 type.addMethod$2(":call", node.func); 4836 type.addMethod$2(":call", node.func);
4899 } 4837 }
4900 _LibraryVisitor.prototype.addSource$1 = _LibraryVisitor.prototype.addSource; 4838 _LibraryVisitor.prototype.addSource$1 = _LibraryVisitor.prototype.addSource;
4901 // ********** Code for Parameter ************** 4839 // ********** Code for Parameter **************
4902 function Parameter(definition, method) { 4840 function Parameter(definition, method) {
4903 this.isInitializer = false 4841 this.method = method;
4904 this.definition = definition; 4842 this.definition = definition;
4905 this.method = method; 4843 this.isInitializer = false;
4906 // Initializers done
4907 } 4844 }
4908 Parameter.prototype.get$definition = function() { return this.definition; }; 4845 Parameter.prototype.get$definition = function() { return this.definition; };
4909 Parameter.prototype.set$definition = function(value) { return this.definition = value; }; 4846 Parameter.prototype.set$definition = function(value) { return this.definition = value; };
4910 Parameter.prototype.get$method = function() { return this.method; }; 4847 Parameter.prototype.get$method = function() { return this.method; };
4911 Parameter.prototype.set$method = function(value) { return this.method = value; } ; 4848 Parameter.prototype.set$method = function(value) { return this.method = value; } ;
4912 Parameter.prototype.get$name = function() { return this.name; }; 4849 Parameter.prototype.get$name = function() { return this.name; };
4913 Parameter.prototype.set$name = function(value) { return this.name = value; }; 4850 Parameter.prototype.set$name = function(value) { return this.name = value; };
4914 Parameter.prototype.get$type = function() { return this.type; }; 4851 Parameter.prototype.get$type = function() { return this.type; };
4915 Parameter.prototype.set$type = function(value) { return this.type = value; }; 4852 Parameter.prototype.set$type = function(value) { return this.type = value; };
4916 Parameter.prototype.get$isInitializer = function() { return this.isInitializer; }; 4853 Parameter.prototype.get$isInitializer = function() { return this.isInitializer; };
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
4961 } 4898 }
4962 Parameter.prototype.get$isOptional = function() { 4899 Parameter.prototype.get$isOptional = function() {
4963 return this.definition != null && this.definition.value != null; 4900 return this.definition != null && this.definition.value != null;
4964 } 4901 }
4965 Parameter.prototype.copyWithNewType$2 = Parameter.prototype.copyWithNewType; 4902 Parameter.prototype.copyWithNewType$2 = Parameter.prototype.copyWithNewType;
4966 Parameter.prototype.genValue$2 = Parameter.prototype.genValue; 4903 Parameter.prototype.genValue$2 = Parameter.prototype.genValue;
4967 Parameter.prototype.resolve$0 = Parameter.prototype.resolve; 4904 Parameter.prototype.resolve$0 = Parameter.prototype.resolve;
4968 // ********** Code for Member ************** 4905 // ********** Code for Member **************
4969 $inherits(Member, Element); 4906 $inherits(Member, Element);
4970 function Member(name, declaringType) { 4907 function Member(name, declaringType) {
4971 this._providePropertySyntax = false
4972 this._provideFieldSyntax = false
4973 this.isGenerated = false; 4908 this.isGenerated = false;
4974 this.declaringType = declaringType; 4909 this.declaringType = declaringType;
4975 // Initializers done 4910 this._provideFieldSyntax = false;
4911 this._providePropertySyntax = false;
4976 Element.call(this, name, declaringType); 4912 Element.call(this, name, declaringType);
4977 } 4913 }
4978 Member.prototype.get$declaringType = function() { return this.declaringType; }; 4914 Member.prototype.get$declaringType = function() { return this.declaringType; };
4979 Member.prototype.get$isGenerated = function() { return this.isGenerated; }; 4915 Member.prototype.get$isGenerated = function() { return this.isGenerated; };
4980 Member.prototype.set$isGenerated = function(value) { return this.isGenerated = v alue; }; 4916 Member.prototype.set$isGenerated = function(value) { return this.isGenerated = v alue; };
4981 Member.prototype.get$generator = function() { return this.generator; }; 4917 Member.prototype.get$generator = function() { return this.generator; };
4982 Member.prototype.set$generator = function(value) { return this.generator = value ; }; 4918 Member.prototype.set$generator = function(value) { return this.generator = value ; };
4983 Member.prototype.get$library = function() { 4919 Member.prototype.get$library = function() {
4984 return this.declaringType.get$library(); 4920 return this.declaringType.get$library();
4985 } 4921 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
5104 return this.invoke($0, $1, $2, $3, false); 5040 return this.invoke($0, $1, $2, $3, false);
5105 }; 5041 };
5106 Member.prototype.invoke$4$isDynamic = Member.prototype.invoke; 5042 Member.prototype.invoke$4$isDynamic = Member.prototype.invoke;
5107 Member.prototype.invoke$5 = Member.prototype.invoke; 5043 Member.prototype.invoke$5 = Member.prototype.invoke;
5108 Member.prototype.provideFieldSyntax$0 = Member.prototype.provideFieldSyntax; 5044 Member.prototype.provideFieldSyntax$0 = Member.prototype.provideFieldSyntax;
5109 Member.prototype.providePropertySyntax$0 = Member.prototype.providePropertySynta x; 5045 Member.prototype.providePropertySyntax$0 = Member.prototype.providePropertySynta x;
5110 // ********** Code for TypeMember ************** 5046 // ********** Code for TypeMember **************
5111 $inherits(TypeMember, Member); 5047 $inherits(TypeMember, Member);
5112 function TypeMember(type) { 5048 function TypeMember(type) {
5113 this.type = type; 5049 this.type = type;
5114 // Initializers done
5115 Member.call(this, type.name, type.library.topType); 5050 Member.call(this, type.name, type.library.topType);
5116 } 5051 }
5117 TypeMember.prototype.get$type = function() { return this.type; }; 5052 TypeMember.prototype.get$type = function() { return this.type; };
5118 TypeMember.prototype.get$span = function() { 5053 TypeMember.prototype.get$span = function() {
5119 return this.type.definition.span; 5054 return this.type.definition.span;
5120 } 5055 }
5121 TypeMember.prototype.get$isStatic = function() { 5056 TypeMember.prototype.get$isStatic = function() {
5122 return true; 5057 return true;
5123 } 5058 }
5124 TypeMember.prototype.get$returnType = function() { 5059 TypeMember.prototype.get$returnType = function() {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
5157 TypeMember.prototype._set$5 = TypeMember.prototype._set; 5092 TypeMember.prototype._set$5 = TypeMember.prototype._set;
5158 TypeMember.prototype.canInvoke$2 = TypeMember.prototype.canInvoke; 5093 TypeMember.prototype.canInvoke$2 = TypeMember.prototype.canInvoke;
5159 TypeMember.prototype.invoke$4 = function($0, $1, $2, $3) { 5094 TypeMember.prototype.invoke$4 = function($0, $1, $2, $3) {
5160 return this.invoke($0, $1, $2, $3, false); 5095 return this.invoke($0, $1, $2, $3, false);
5161 }; 5096 };
5162 TypeMember.prototype.invoke$4$isDynamic = TypeMember.prototype.invoke; 5097 TypeMember.prototype.invoke$4$isDynamic = TypeMember.prototype.invoke;
5163 TypeMember.prototype.invoke$5 = TypeMember.prototype.invoke; 5098 TypeMember.prototype.invoke$5 = TypeMember.prototype.invoke;
5164 // ********** Code for FieldMember ************** 5099 // ********** Code for FieldMember **************
5165 $inherits(FieldMember, Member); 5100 $inherits(FieldMember, Member);
5166 function FieldMember(name, declaringType, definition, value) { 5101 function FieldMember(name, declaringType, definition, value) {
5167 this._computing = false 5102 this.isNative = false;
5168 this.definition = definition; 5103 this.definition = definition;
5104 this._computing = false;
5169 this.value = value; 5105 this.value = value;
5170 this.isNative = false;
5171 // Initializers done
5172 Member.call(this, name, declaringType); 5106 Member.call(this, name, declaringType);
5173 } 5107 }
5174 FieldMember.prototype.get$definition = function() { return this.definition; }; 5108 FieldMember.prototype.get$definition = function() { return this.definition; };
5175 FieldMember.prototype.get$value = function() { return this.value; }; 5109 FieldMember.prototype.get$value = function() { return this.value; };
5176 FieldMember.prototype.get$type = function() { return this.type; }; 5110 FieldMember.prototype.get$type = function() { return this.type; };
5177 FieldMember.prototype.set$type = function(value) { return this.type = value; }; 5111 FieldMember.prototype.set$type = function(value) { return this.type = value; };
5178 FieldMember.prototype.get$isStatic = function() { return this.isStatic; }; 5112 FieldMember.prototype.get$isStatic = function() { return this.isStatic; };
5179 FieldMember.prototype.set$isStatic = function(value) { return this.isStatic = va lue; }; 5113 FieldMember.prototype.set$isStatic = function(value) { return this.isStatic = va lue; };
5180 FieldMember.prototype.get$isFinal = function() { return this.isFinal; }; 5114 FieldMember.prototype.get$isFinal = function() { return this.isFinal; };
5181 FieldMember.prototype.set$isFinal = function(value) { return this.isFinal = valu e; }; 5115 FieldMember.prototype.set$isFinal = function(value) { return this.isFinal = valu e; };
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
5259 this._computedValue = this.value.visit(finalGen); 5193 this._computedValue = this.value.visit(finalGen);
5260 if (!this._computedValue.get$isConst()) { 5194 if (!this._computedValue.get$isConst()) {
5261 if (this.isStatic) { 5195 if (this.isStatic) {
5262 $globals.world.error("non constant static field must be initialized in f unctions", this.value.span); 5196 $globals.world.error("non constant static field must be initialized in f unctions", this.value.span);
5263 } 5197 }
5264 else { 5198 else {
5265 $globals.world.error("non constant field must be initialized in construc tor", this.value.span); 5199 $globals.world.error("non constant field must be initialized in construc tor", this.value.span);
5266 } 5200 }
5267 } 5201 }
5268 if (this.isStatic) { 5202 if (this.isStatic) {
5269 this._computedValue = $globals.world.gen.globalForStaticField(this, this._ computedValue, [this._computedValue]); 5203 if (this.isFinal && this._computedValue.get$isConst()) {
5204 ;
5205 }
5206 else {
5207 this._computedValue = $globals.world.gen.globalForStaticField(this, this ._computedValue, [this._computedValue]);
5208 }
5270 } 5209 }
5271 this._computing = false; 5210 this._computing = false;
5272 } 5211 }
5273 return this._computedValue; 5212 return this._computedValue;
5274 } 5213 }
5275 FieldMember.prototype._get = function(context, node, target, isDynamic) { 5214 FieldMember.prototype._get = function(context, node, target, isDynamic) {
5276 if (this.isNative && this.get$returnType() != null) { 5215 if (this.isNative && this.get$returnType() != null) {
5277 this.get$returnType().markUsed(); 5216 this.get$returnType().markUsed();
5278 if ((this.get$returnType() instanceof DefinedType)) { 5217 if ((this.get$returnType() instanceof DefinedType)) {
5279 var defaultType = this.get$returnType().get$genericType().defaultType; 5218 var defaultType = this.get$returnType().get$genericType().defaultType;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
5324 }; 5263 };
5325 FieldMember.prototype._set$4$isDynamic = FieldMember.prototype._set; 5264 FieldMember.prototype._set$4$isDynamic = FieldMember.prototype._set;
5326 FieldMember.prototype._set$5 = FieldMember.prototype._set; 5265 FieldMember.prototype._set$5 = FieldMember.prototype._set;
5327 FieldMember.prototype.computeValue$0 = FieldMember.prototype.computeValue; 5266 FieldMember.prototype.computeValue$0 = FieldMember.prototype.computeValue;
5328 FieldMember.prototype.provideFieldSyntax$0 = FieldMember.prototype.provideFieldS yntax; 5267 FieldMember.prototype.provideFieldSyntax$0 = FieldMember.prototype.provideFieldS yntax;
5329 FieldMember.prototype.providePropertySyntax$0 = FieldMember.prototype.providePro pertySyntax; 5268 FieldMember.prototype.providePropertySyntax$0 = FieldMember.prototype.providePro pertySyntax;
5330 FieldMember.prototype.resolve$0 = FieldMember.prototype.resolve; 5269 FieldMember.prototype.resolve$0 = FieldMember.prototype.resolve;
5331 // ********** Code for PropertyMember ************** 5270 // ********** Code for PropertyMember **************
5332 $inherits(PropertyMember, Member); 5271 $inherits(PropertyMember, Member);
5333 function PropertyMember(name, declaringType) { 5272 function PropertyMember(name, declaringType) {
5334 // Initializers done
5335 Member.call(this, name, declaringType); 5273 Member.call(this, name, declaringType);
5336 } 5274 }
5337 PropertyMember.prototype.get$getter = function() { return this.getter; }; 5275 PropertyMember.prototype.get$getter = function() { return this.getter; };
5338 PropertyMember.prototype.set$getter = function(value) { return this.getter = val ue; }; 5276 PropertyMember.prototype.set$getter = function(value) { return this.getter = val ue; };
5339 PropertyMember.prototype.get$setter = function() { return this.setter; }; 5277 PropertyMember.prototype.get$setter = function() { return this.setter; };
5340 PropertyMember.prototype.set$setter = function(value) { return this.setter = val ue; }; 5278 PropertyMember.prototype.set$setter = function(value) { return this.setter = val ue; };
5341 PropertyMember.prototype.get$span = function() { 5279 PropertyMember.prototype.get$span = function() {
5342 return this.getter != null ? this.getter.get$span() : null; 5280 return this.getter != null ? this.getter.get$span() : null;
5343 } 5281 }
5344 PropertyMember.prototype.get$canGet = function() { 5282 PropertyMember.prototype.get$canGet = function() {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
5440 }; 5378 };
5441 PropertyMember.prototype._set$4$isDynamic = PropertyMember.prototype._set; 5379 PropertyMember.prototype._set$4$isDynamic = PropertyMember.prototype._set;
5442 PropertyMember.prototype._set$5 = PropertyMember.prototype._set; 5380 PropertyMember.prototype._set$5 = PropertyMember.prototype._set;
5443 PropertyMember.prototype.provideFieldSyntax$0 = PropertyMember.prototype.provide FieldSyntax; 5381 PropertyMember.prototype.provideFieldSyntax$0 = PropertyMember.prototype.provide FieldSyntax;
5444 PropertyMember.prototype.providePropertySyntax$0 = PropertyMember.prototype.prov idePropertySyntax; 5382 PropertyMember.prototype.providePropertySyntax$0 = PropertyMember.prototype.prov idePropertySyntax;
5445 PropertyMember.prototype.resolve$0 = PropertyMember.prototype.resolve; 5383 PropertyMember.prototype.resolve$0 = PropertyMember.prototype.resolve;
5446 // ********** Code for ConcreteMember ************** 5384 // ********** Code for ConcreteMember **************
5447 $inherits(ConcreteMember, Member); 5385 $inherits(ConcreteMember, Member);
5448 function ConcreteMember(name, declaringType, baseMember) { 5386 function ConcreteMember(name, declaringType, baseMember) {
5449 this.baseMember = baseMember; 5387 this.baseMember = baseMember;
5450 // Initializers done
5451 Member.call(this, name, declaringType); 5388 Member.call(this, name, declaringType);
5452 this.parameters = []; 5389 this.parameters = [];
5453 this.returnType = this.baseMember.get$returnType().resolveTypeParams(declaring Type); 5390 this.returnType = this.baseMember.get$returnType().resolveTypeParams(declaring Type);
5454 var $$list = this.baseMember.get$parameters(); 5391 var $$list = this.baseMember.get$parameters();
5455 for (var $$i = 0;$$i < $$list.get$length(); $$i++) { 5392 for (var $$i = 0;$$i < $$list.get$length(); $$i++) {
5456 var p = $$list.$index($$i); 5393 var p = $$list.$index($$i);
5457 var newType = p.get$type().resolveTypeParams$1(declaringType); 5394 var newType = p.get$type().resolveTypeParams$1(declaringType);
5458 if ($ne(newType, p.get$type())) { 5395 if ($ne(newType, p.get$type())) {
5459 this.parameters.add(p.copyWithNewType$2(this, newType)); 5396 this.parameters.add(p.copyWithNewType$2(this, newType));
5460 } 5397 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
5547 return this.baseMember.override(other); 5484 return this.baseMember.override(other);
5548 } 5485 }
5549 ConcreteMember.prototype._get = function(context, node, target, isDynamic) { 5486 ConcreteMember.prototype._get = function(context, node, target, isDynamic) {
5550 var ret = this.baseMember._get(context, node, target, isDynamic); 5487 var ret = this.baseMember._get(context, node, target, isDynamic);
5551 return new Value(this.get$inferredResult(), ret.get$code(), node.span, true); 5488 return new Value(this.get$inferredResult(), ret.get$code(), node.span, true);
5552 } 5489 }
5553 ConcreteMember.prototype._set = function(context, node, target, value, isDynamic ) { 5490 ConcreteMember.prototype._set = function(context, node, target, value, isDynamic ) {
5554 var ret = this.baseMember._set(context, node, target, value, isDynamic); 5491 var ret = this.baseMember._set(context, node, target, value, isDynamic);
5555 return new Value(this.returnType, ret.get$code(), node.span, true); 5492 return new Value(this.returnType, ret.get$code(), node.span, true);
5556 } 5493 }
5494 ConcreteMember.prototype._evalConstConstructor = function(newObject, args) {
5495 return this.baseMember.get$dynamic()._evalConstConstructor$2(newObject, args);
5496 }
5557 ConcreteMember.prototype.invoke = function(context, node, target, args, isDynami c) { 5497 ConcreteMember.prototype.invoke = function(context, node, target, args, isDynami c) {
5558 var ret = this.baseMember.invoke(context, node, target, args, isDynamic); 5498 var ret = this.baseMember.invoke(context, node, target, args, isDynamic);
5559 var code = ret.get$code(); 5499 var code = ret.get$code();
5560 if (this.get$isConstructor()) { 5500 if (this.get$isConstructor()) {
5561 code = code.replaceFirst$2(this.declaringType.get$genericType().get$jsname() , this.declaringType.get$jsname()); 5501 code = code.replaceFirst$2(this.declaringType.get$genericType().get$jsname() , this.declaringType.get$jsname());
5562 } 5502 }
5563 if ((this.baseMember instanceof MethodMember)) { 5503 if ((this.baseMember instanceof MethodMember)) {
5564 this.declaringType.genMethod(this); 5504 this.declaringType.genMethod(this);
5565 } 5505 }
5566 return new Value(this.get$inferredResult(), code, node.span, true); 5506 return new Value(this.get$inferredResult(), code, node.span, true);
5567 } 5507 }
5508 ConcreteMember.prototype._evalConstConstructor$2 = ConcreteMember.prototype._eva lConstConstructor;
5568 ConcreteMember.prototype._get$3 = function($0, $1, $2) { 5509 ConcreteMember.prototype._get$3 = function($0, $1, $2) {
5569 return this._get($0, $1, $2, false); 5510 return this._get($0, $1, $2, false);
5570 }; 5511 };
5571 ConcreteMember.prototype._get$3$isDynamic = ConcreteMember.prototype._get; 5512 ConcreteMember.prototype._get$3$isDynamic = ConcreteMember.prototype._get;
5572 ConcreteMember.prototype._get$4 = ConcreteMember.prototype._get; 5513 ConcreteMember.prototype._get$4 = ConcreteMember.prototype._get;
5573 ConcreteMember.prototype._set$4 = function($0, $1, $2, $3) { 5514 ConcreteMember.prototype._set$4 = function($0, $1, $2, $3) {
5574 return this._set($0, $1, $2, $3, false); 5515 return this._set($0, $1, $2, $3, false);
5575 }; 5516 };
5576 ConcreteMember.prototype._set$4$isDynamic = ConcreteMember.prototype._set; 5517 ConcreteMember.prototype._set$4$isDynamic = ConcreteMember.prototype._set;
5577 ConcreteMember.prototype._set$5 = ConcreteMember.prototype._set; 5518 ConcreteMember.prototype._set$5 = ConcreteMember.prototype._set;
5578 ConcreteMember.prototype.canInvoke$2 = ConcreteMember.prototype.canInvoke; 5519 ConcreteMember.prototype.canInvoke$2 = ConcreteMember.prototype.canInvoke;
5579 ConcreteMember.prototype.computeValue$0 = ConcreteMember.prototype.computeValue; 5520 ConcreteMember.prototype.computeValue$0 = ConcreteMember.prototype.computeValue;
5580 ConcreteMember.prototype.invoke$4 = function($0, $1, $2, $3) { 5521 ConcreteMember.prototype.invoke$4 = function($0, $1, $2, $3) {
5581 return this.invoke($0, $1, $2, $3, false); 5522 return this.invoke($0, $1, $2, $3, false);
5582 }; 5523 };
5583 ConcreteMember.prototype.invoke$4$isDynamic = ConcreteMember.prototype.invoke; 5524 ConcreteMember.prototype.invoke$4$isDynamic = ConcreteMember.prototype.invoke;
5584 ConcreteMember.prototype.invoke$5 = ConcreteMember.prototype.invoke; 5525 ConcreteMember.prototype.invoke$5 = ConcreteMember.prototype.invoke;
5585 ConcreteMember.prototype.provideFieldSyntax$0 = ConcreteMember.prototype.provide FieldSyntax; 5526 ConcreteMember.prototype.provideFieldSyntax$0 = ConcreteMember.prototype.provide FieldSyntax;
5586 ConcreteMember.prototype.providePropertySyntax$0 = ConcreteMember.prototype.prov idePropertySyntax; 5527 ConcreteMember.prototype.providePropertySyntax$0 = ConcreteMember.prototype.prov idePropertySyntax;
5587 // ********** Code for MethodMember ************** 5528 // ********** Code for MethodMember **************
5588 $inherits(MethodMember, Member); 5529 $inherits(MethodMember, Member);
5589 function MethodMember(name, declaringType, definition) { 5530 function MethodMember(name, declaringType, definition) {
5590 this.isStatic = false 5531 this.isLambda = false;
5591 this.isAbstract = false 5532 this._provideOptionalParamInfo = false;
5592 this.isConst = false 5533 this.isFactory = false;
5593 this.isFactory = false
5594 this.isLambda = false
5595 this._provideOptionalParamInfo = false
5596 this.definition = definition; 5534 this.definition = definition;
5597 // Initializers done 5535 this.isConst = false;
5536 this.isAbstract = false;
5537 this.isStatic = false;
5598 Member.call(this, name, declaringType); 5538 Member.call(this, name, declaringType);
5599 } 5539 }
5600 MethodMember.prototype.get$definition = function() { return this.definition; }; 5540 MethodMember.prototype.get$definition = function() { return this.definition; };
5601 MethodMember.prototype.set$definition = function(value) { return this.definition = value; }; 5541 MethodMember.prototype.set$definition = function(value) { return this.definition = value; };
5602 MethodMember.prototype.get$returnType = function() { return this.returnType; }; 5542 MethodMember.prototype.get$returnType = function() { return this.returnType; };
5603 MethodMember.prototype.set$returnType = function(value) { return this.returnType = value; }; 5543 MethodMember.prototype.set$returnType = function(value) { return this.returnType = value; };
5604 MethodMember.prototype.get$parameters = function() { return this.parameters; }; 5544 MethodMember.prototype.get$parameters = function() { return this.parameters; };
5605 MethodMember.prototype.set$parameters = function(value) { return this.parameters = value; }; 5545 MethodMember.prototype.set$parameters = function(value) { return this.parameters = value; };
5606 MethodMember.prototype.get$isStatic = function() { return this.isStatic; }; 5546 MethodMember.prototype.get$isStatic = function() { return this.isStatic; };
5607 MethodMember.prototype.set$isStatic = function(value) { return this.isStatic = v alue; }; 5547 MethodMember.prototype.set$isStatic = function(value) { return this.isStatic = v alue; };
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
5873 } 5813 }
5874 if (this.isFactory) { 5814 if (this.isFactory) {
5875 return new Value(target.get$type(), ("" + this.get$generatedFactoryName() + "(" + argsString + ")"), node != null ? node.span : null, true); 5815 return new Value(target.get$type(), ("" + this.get$generatedFactoryName() + "(" + argsString + ")"), node != null ? node.span : null, true);
5876 } 5816 }
5877 if (this.isStatic) { 5817 if (this.isStatic) {
5878 if (this.declaringType.get$isTop()) { 5818 if (this.declaringType.get$isTop()) {
5879 return new Value(this.get$inferredResult(), ("" + this.get$jsname() + "(" + argsString + ")"), node != null ? node.span : null, true); 5819 return new Value(this.get$inferredResult(), ("" + this.get$jsname() + "(" + argsString + ")"), node != null ? node.span : null, true);
5880 } 5820 }
5881 return new Value(this.get$inferredResult(), ("" + this.declaringType.get$jsn ame() + "." + this.get$jsname() + "(" + argsString + ")"), node.span, true); 5821 return new Value(this.get$inferredResult(), ("" + this.declaringType.get$jsn ame() + "." + this.get$jsname() + "(" + argsString + ")"), node.span, true);
5882 } 5822 }
5883 var code = ("" + target.get$code() + "." + this.get$jsname() + "(" + argsStrin g + ")");
5884 if (this.name == "get:typeName" && this.declaringType.get$library().get$isDom( )) { 5823 if (this.name == "get:typeName" && this.declaringType.get$library().get$isDom( )) {
5885 $globals.world.gen.corejs.ensureTypeNameOf(); 5824 $globals.world.gen.corejs.ensureTypeNameOf();
5886 } 5825 }
5826 var code = ("" + target.get$code() + "." + this.get$jsname() + "(" + argsStrin g + ")");
5887 return new Value(this.get$inferredResult(), code, node.span, true); 5827 return new Value(this.get$inferredResult(), code, node.span, true);
5888 } 5828 }
5889 MethodMember.prototype._invokeConstructor = function(context, node, target, args , argsString) { 5829 MethodMember.prototype._invokeConstructor = function(context, node, target, args , argsString) {
5890 this.declaringType.markUsed(); 5830 this.declaringType.markUsed();
5891 var ctor = this.get$constructorName(); 5831 var ctor = this.get$constructorName();
5892 if (ctor != "") ctor = ("." + ctor + "$ctor"); 5832 if (ctor != "") ctor = ("." + ctor + "$ctor");
5833 var span = node != null ? node.span : target.span;
5893 if (!target.isType) { 5834 if (!target.isType) {
5894 var code = ("" + this.declaringType.get$nativeName() + ctor + ".call(" + arg sString + ")"); 5835 var code = ("" + this.declaringType.get$nativeName() + ctor + ".call(" + arg sString + ")");
5895 return new Value(target.get$type(), code, node.span, true); 5836 return new Value(target.get$type(), code, span, true);
5896 } 5837 }
5897 else { 5838 else {
5898 var code = ("new " + this.declaringType.get$nativeName() + ctor + "(" + args String + ")");
5899 if (this.isConst && (node instanceof NewExpression) && node.get$dynamic().ge t$isConst()) { 5839 if (this.isConst && (node instanceof NewExpression) && node.get$dynamic().ge t$isConst()) {
5900 return this._invokeConstConstructor(node, code, target, args); 5840 if (this.get$isNative() || this.declaringType.name == "JSSyntaxRegExp") {
5841 var code = ("new " + this.declaringType.get$nativeName() + ctor + "(" + argsString + ")");
5842 return $globals.world.gen.globalForConst(new Value(target.get$type(), co de, span, true), [args.values]);
5843 }
5844 var newType = this.declaringType;
5845 var newObject = new ObjectValue(true, newType, span);
5846 newObject.initFields$0();
5847 this._evalConstConstructor(newObject, args);
5848 return $globals.world.gen.globalForConst(newObject, [args.values]);
5901 } 5849 }
5902 else { 5850 else {
5903 var span = node != null ? node.span : target.span; 5851 var code = ("new " + this.declaringType.get$nativeName() + ctor + "(" + ar gsString + ")");
5904 return new Value(target.get$type(), code, span, true); 5852 return new Value(target.get$type(), code, span, true);
5905 } 5853 }
5906 } 5854 }
5907 } 5855 }
5908 MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar gs) { 5856 MethodMember.prototype._evalConstConstructor = function(newObject, args) {
5909 var fields = new HashMapImplementation(); 5857 this.declaringType.markUsed();
5910 for (var i = (0); 5858 var generator = new MethodGenerator(this, null);
5911 i < this.parameters.get$length(); i++) { 5859 generator.evalBody$2(newObject, args);
5912 var param = this.parameters.$index(i);
5913 if (param.get$isInitializer()) {
5914 var value = null;
5915 if (i < args.get$length()) {
5916 value = args.values.$index(i);
5917 }
5918 else {
5919 value = args.getValue(param.get$name());
5920 if (value == null) {
5921 value = param.get$value();
5922 }
5923 }
5924 fields.$setindex(param.get$name(), value.get$constValue());
5925 }
5926 }
5927 if (this.definition.initializers != null) {
5928 this.generator._pushBlock(false);
5929 for (var j = (0);
5930 j < this.definition.formals.get$length(); j++) {
5931 var name = this.definition.formals.$index(j).get$name().get$name();
5932 var value = null;
5933 if (j < args.get$length()) {
5934 value = args.values.$index(j);
5935 }
5936 else {
5937 value = args.getValue(this.parameters.$index(j).get$name());
5938 if (value == null) {
5939 value = this.parameters.$index(j).get$value();
5940 }
5941 }
5942 this.generator._scope._vars.$setindex(name, value);
5943 }
5944 var $$list = this.definition.initializers;
5945 for (var $$i = 0;$$i < $$list.get$length(); $$i++) {
5946 var init = $$list.$index($$i);
5947 if ((init instanceof CallExpression)) {
5948 var delegateArgs = this.generator._makeArgs(init.get$arguments());
5949 var value = this.initDelegate.invoke(this.generator, node, target, deleg ateArgs, false);
5950 if ((init.get$target() instanceof ThisExpression)) {
5951 return value;
5952 }
5953 else {
5954 value = value.get$constValue();
5955 var $list0 = value.get$fields().getKeys$0();
5956 for (var $i0 = value.get$fields().getKeys$0().iterator$0(); $i0.hasNex t$0(); ) {
5957 var fname = $i0.next$0();
5958 fields.$setindex(fname, value.get$fields().$index(fname));
5959 }
5960 }
5961 }
5962 else {
5963 var assign = init;
5964 var x = assign.x;
5965 var fname = x.get$name().get$name();
5966 var val = this.generator.visitValue(assign.y);
5967 if (!val.get$isConst()) {
5968 $globals.world.error("invalid non-const initializer in const construct or", assign.y.span);
5969 }
5970 fields.$setindex(fname, val);
5971 }
5972 }
5973 this.generator._popBlock();
5974 }
5975 var $$list = this.declaringType.get$members().getValues();
5976 for (var $$i = this.declaringType.get$members().getValues().iterator$0(); $$i. hasNext$0(); ) {
5977 var f = $$i.next$0();
5978 if ((f instanceof FieldMember) && !f.get$isStatic() && !fields.containsKey(f .get$name())) {
5979 if (!f.get$isFinal()) {
5980 $globals.world.error(("const class \"" + this.declaringType.name + "\" h as non-final ") + ("field \"" + f.get$name() + "\""), f.get$span());
5981 }
5982 if (f.get$value() != null) {
5983 fields.$setindex(f.get$name(), f.computeValue$0());
5984 }
5985 }
5986 }
5987 return $globals.world.gen.globalForConst(new ObjectValue(fields, true, target. get$type(), code, node.span), args.values);
5988 } 5860 }
5989 MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar gsCode, isDynamic) { 5861 MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar gsCode, isDynamic) {
5990 var allConst = target.get$isConst() && args.values.every((function (arg) {
5991 return arg.get$isConst();
5992 })
5993 );
5994 if (this.declaringType.get$isNum()) { 5862 if (this.declaringType.get$isNum()) {
5995 if (!allConst) { 5863 var code;
5996 var code; 5864 if (this.name == ":negate") {
5997 if (this.name == ":negate") { 5865 code = ("-" + target.get$code());
5998 code = ("-" + target.get$code()); 5866 }
5999 } 5867 else if (this.name == ":bit_not") {
6000 else if (this.name == ":bit_not") { 5868 code = ("~" + target.get$code());
6001 code = ("~" + target.get$code()); 5869 }
6002 } 5870 else if (this.name == ":truncdiv" || this.name == ":mod") {
6003 else if (this.name == ":truncdiv" || this.name == ":mod") { 5871 $globals.world.gen.corejs.useOperator(this.name);
6004 $globals.world.gen.corejs.useOperator(this.name); 5872 code = ("" + this.get$jsname() + "(" + target.get$code() + ", " + argsCode .$index((0)) + ")");
6005 code = ("" + this.get$jsname() + "(" + target.get$code() + ", " + argsCo de.$index((0)) + ")");
6006 }
6007 else {
6008 var op = TokenKind.rawOperatorFromMethod(this.name);
6009 code = ("" + target.get$code() + " " + op + " " + argsCode.$index((0)));
6010 }
6011 return new Value(this.get$inferredResult(), code, node.span, true);
6012 } 5873 }
6013 else { 5874 else {
6014 var value; 5875 var op = TokenKind.rawOperatorFromMethod(this.name);
6015 var val0, val1, ival0, ival1; 5876 code = ("" + target.get$code() + " " + op + " " + argsCode.$index((0)));
6016 val0 = target.get$dynamic().get$actualValue();
6017 ival0 = val0.toInt();
6018 if (args.values.get$length() > (0)) {
6019 val1 = args.values.$index((0)).get$dynamic().get$actualValue();
6020 ival1 = val1.toInt();
6021 }
6022 switch (this.name) {
6023 case ":negate":
6024
6025 value = -val0;
6026 break;
6027
6028 case ":add":
6029
6030 value = val0 + val1;
6031 break;
6032
6033 case ":sub":
6034
6035 value = val0 - val1;
6036 break;
6037
6038 case ":mul":
6039
6040 value = val0 * val1;
6041 break;
6042
6043 case ":div":
6044
6045 value = val0 / val1;
6046 break;
6047
6048 case ":truncdiv":
6049
6050 value = $truncdiv(val0, val1);
6051 break;
6052
6053 case ":mod":
6054
6055 value = $mod(val0, val1);
6056 break;
6057
6058 case ":eq":
6059
6060 value = val0 == val1;
6061 break;
6062
6063 case ":lt":
6064
6065 value = val0 < val1;
6066 break;
6067
6068 case ":gt":
6069
6070 value = val0 > val1;
6071 break;
6072
6073 case ":lte":
6074
6075 value = val0 <= val1;
6076 break;
6077
6078 case ":gte":
6079
6080 value = val0 >= val1;
6081 break;
6082
6083 case ":ne":
6084
6085 value = val0 != val1;
6086 break;
6087
6088 case ":bit_not":
6089
6090 value = (~ival0).toDouble();
6091 break;
6092
6093 case ":bit_or":
6094
6095 value = (ival0 | ival1).toDouble();
6096 break;
6097
6098 case ":bit_xor":
6099
6100 value = (ival0 ^ ival1).toDouble();
6101 break;
6102
6103 case ":bit_and":
6104
6105 value = (ival0 & ival1).toDouble();
6106 break;
6107
6108 case ":shl":
6109
6110 value = (ival0 << ival1).toDouble();
6111 break;
6112
6113 case ":sar":
6114
6115 value = (ival0 >> ival1).toDouble();
6116 break;
6117
6118 case ":shr":
6119
6120 value = (ival0 >>> ival1).toDouble();
6121 break;
6122
6123 }
6124 if (this.get$inferredResult().get$isInt()) {
6125 return Value.fromInt(value.toInt$0(), node.span);
6126 }
6127 else if (this.get$inferredResult().get$isDouble()) {
6128 return Value.fromDouble(value.toDouble$0(), node.span);
6129 }
6130 else if (this.get$inferredResult().get$isNum()) {
6131 return Value.fromDouble(value.toDouble$0(), node.span);
6132 }
6133 else if (this.get$inferredResult().get$isBool()) {
6134 return Value.fromBool(value, node.span);
6135 }
6136 else {
6137 $globals.world.internalError(("unsupported const result type \"" + this. get$inferredResult().name + "\""), node.span);
6138 }
6139 } 5877 }
5878 return new Value(this.get$inferredResult(), code, node.span, true);
6140 } 5879 }
6141 else if (this.declaringType.get$isString()) { 5880 else if (this.declaringType.get$isString()) {
6142 if (this.name == ":index") { 5881 if (this.name == ":index") {
6143 return new Value(this.declaringType, ("" + target.get$code() + "[" + argsC ode.$index((0)) + "]"), node.span, true); 5882 return new Value(this.declaringType, ("" + target.get$code() + "[" + argsC ode.$index((0)) + "]"), node.span, true);
6144 } 5883 }
6145 else if (this.name == ":add") { 5884 else if (this.name == ":add") {
6146 if (allConst) {
6147 var value = target.get$dynamic().get$actualValue() + args.values.$index( (0)).get$dynamic().get$actualValue();
6148 return Value.fromString(value, node.span);
6149 }
6150 return new Value(this.declaringType, ("" + target.get$code() + " + " + arg sCode.$index((0))), node.span, true); 5885 return new Value(this.declaringType, ("" + target.get$code() + " + " + arg sCode.$index((0))), node.span, true);
6151 } 5886 }
6152 } 5887 }
6153 else if (this.declaringType.get$isNative()) { 5888 else if (this.declaringType.get$isNative()) {
6154 if (this.name == ":index") { 5889 if (this.name == ":index") {
6155 return new Value(this.returnType, ("" + target.get$code() + "[" + argsCode .$index((0)) + "]"), node.span, true); 5890 return new Value(this.returnType, ("" + target.get$code() + "[" + argsCode .$index((0)) + "]"), node.span, true);
6156 } 5891 }
6157 else if (this.name == ":setindex") { 5892 else if (this.name == ":setindex") {
6158 return new Value(this.returnType, ("" + target.get$code() + "[" + argsCode .$index((0)) + "] = " + argsCode.$index((1))), node.span, true); 5893 return new Value(this.returnType, ("" + target.get$code() + "[" + argsCode .$index((0)) + "] = " + argsCode.$index((1))), node.span, true);
6159 } 5894 }
6160 } 5895 }
6161 if (this.name == ":eq" || this.name == ":ne") { 5896 if (this.name == ":eq" || this.name == ":ne") {
6162 var op = this.name == ":eq" ? "==" : "!="; 5897 var op = this.name == ":eq" ? "==" : "!=";
6163 if (this.name == ":ne") { 5898 if (this.name == ":ne") {
6164 target.invoke(context, ":eq", node, args, isDynamic); 5899 target.invoke(context, ":eq", node, args, isDynamic);
6165 } 5900 }
6166 if (allConst) {
6167 var val0 = target.get$dynamic().get$actualValue();
6168 var val1 = args.values.$index((0)).get$dynamic().get$actualValue();
6169 var newVal = this.name == ":eq" ? $eq(val0, val1) : $ne(val0, val1);
6170 return Value.fromBool(newVal, node.span);
6171 }
6172 if ($eq(argsCode.$index((0)), "null")) { 5901 if ($eq(argsCode.$index((0)), "null")) {
6173 return new Value(this.get$inferredResult(), ("" + target.get$code() + " " + op + " null"), node.span, true); 5902 return new Value(this.get$inferredResult(), ("" + target.get$code() + " " + op + " null"), node.span, true);
6174 } 5903 }
6175 else if (target.get$type().get$isNum() || target.get$type().get$isString()) { 5904 else if (target.get$type().get$isNum() || target.get$type().get$isString()) {
6176 return new Value(this.get$inferredResult(), ("" + target.get$code() + " " + op + " " + argsCode.$index((0))), node.span, true); 5905 return new Value(this.get$inferredResult(), ("" + target.get$code() + " " + op + " " + argsCode.$index((0))), node.span, true);
6177 } 5906 }
6178 $globals.world.gen.corejs.useOperator(this.name); 5907 $globals.world.gen.corejs.useOperator(this.name);
6179 return new Value(this.get$inferredResult(), ("" + this.get$jsname() + "(" + target.get$code() + ", " + argsCode.$index((0)) + ")"), node.span, true); 5908 return new Value(this.get$inferredResult(), ("" + this.get$jsname() + "(" + target.get$code() + ", " + argsCode.$index((0)) + ")"), node.span, true);
6180 } 5909 }
6181 if (this.get$isCallMethod()) { 5910 if (this.get$isCallMethod()) {
(...skipping 21 matching lines...) Expand all
6203 if ($eq(mod.get$kind(), (84))) { 5932 if ($eq(mod.get$kind(), (84))) {
6204 if (this.isStatic) { 5933 if (this.isStatic) {
6205 $globals.world.error("duplicate static modifier", mod.get$span()); 5934 $globals.world.error("duplicate static modifier", mod.get$span());
6206 } 5935 }
6207 this.isStatic = true; 5936 this.isStatic = true;
6208 } 5937 }
6209 else if (this.get$isConstructor() && $eq(mod.get$kind(), (91))) { 5938 else if (this.get$isConstructor() && $eq(mod.get$kind(), (91))) {
6210 if (this.isConst) { 5939 if (this.isConst) {
6211 $globals.world.error("duplicate const modifier", mod.get$span()); 5940 $globals.world.error("duplicate const modifier", mod.get$span());
6212 } 5941 }
5942 if (this.isFactory) {
5943 $globals.world.error("const factory not allowed", mod.get$span());
5944 }
6213 this.isConst = true; 5945 this.isConst = true;
6214 } 5946 }
6215 else if ($eq(mod.get$kind(), (73))) { 5947 else if ($eq(mod.get$kind(), (73))) {
6216 if (this.isFactory) { 5948 if (this.isFactory) {
6217 $globals.world.error("duplicate factory modifier", mod.get$span()); 5949 $globals.world.error("duplicate factory modifier", mod.get$span());
6218 } 5950 }
5951 if (this.isConst) {
5952 $globals.world.error("const factory not allowed", mod.get$span());
5953 }
5954 if (this.isStatic) {
5955 $globals.world.error("static factory not allowed", mod.get$span());
5956 }
6219 this.isFactory = true; 5957 this.isFactory = true;
6220 } 5958 }
6221 else if ($eq(mod.get$kind(), (71))) { 5959 else if ($eq(mod.get$kind(), (71))) {
6222 if (this.isAbstract) { 5960 if (this.isAbstract) {
6223 if (this.declaringType.get$isClass()) { 5961 if (this.declaringType.get$isClass()) {
6224 $globals.world.error("duplicate abstract modifier", mod.get$span()); 5962 $globals.world.error("duplicate abstract modifier", mod.get$span());
6225 } 5963 }
6226 else if (!this.get$isCallMethod()) { 5964 else if (!this.get$isCallMethod()) {
6227 $globals.world.error("abstract modifier not allowed on interface mem bers", mod.get$span()); 5965 $globals.world.error("abstract modifier not allowed on interface mem bers", mod.get$span());
6228 } 5966 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
6271 this.get$library()._addMember(this); 6009 this.get$library()._addMember(this);
6272 } 6010 }
6273 } 6011 }
6274 MethodMember.prototype.resolveType = function(node, typeErrors) { 6012 MethodMember.prototype.resolveType = function(node, typeErrors) {
6275 var t = Element.prototype.resolveType.call(this, node, typeErrors); 6013 var t = Element.prototype.resolveType.call(this, node, typeErrors);
6276 if (this.isStatic && !this.isFactory && (t instanceof ParameterType)) { 6014 if (this.isStatic && !this.isFactory && (t instanceof ParameterType)) {
6277 $globals.world.error("using type parameter in static context.", node.span); 6015 $globals.world.error("using type parameter in static context.", node.span);
6278 } 6016 }
6279 return t; 6017 return t;
6280 } 6018 }
6019 MethodMember.prototype._evalConstConstructor$2 = MethodMember.prototype._evalCon stConstructor;
6281 MethodMember.prototype._get$3 = function($0, $1, $2) { 6020 MethodMember.prototype._get$3 = function($0, $1, $2) {
6282 return this._get($0, $1, $2, false); 6021 return this._get($0, $1, $2, false);
6283 }; 6022 };
6284 MethodMember.prototype._get$3$isDynamic = MethodMember.prototype._get; 6023 MethodMember.prototype._get$3$isDynamic = MethodMember.prototype._get;
6285 MethodMember.prototype._get$4 = MethodMember.prototype._get; 6024 MethodMember.prototype._get$4 = MethodMember.prototype._get;
6286 MethodMember.prototype._set$4 = function($0, $1, $2, $3) { 6025 MethodMember.prototype._set$4 = function($0, $1, $2, $3) {
6287 return this._set($0, $1, $2, $3, false); 6026 return this._set($0, $1, $2, $3, false);
6288 }; 6027 };
6289 MethodMember.prototype._set$4$isDynamic = MethodMember.prototype._set; 6028 MethodMember.prototype._set$4$isDynamic = MethodMember.prototype._set;
6290 MethodMember.prototype._set$5 = MethodMember.prototype._set; 6029 MethodMember.prototype._set$5 = MethodMember.prototype._set;
6291 MethodMember.prototype.canInvoke$2 = MethodMember.prototype.canInvoke; 6030 MethodMember.prototype.canInvoke$2 = MethodMember.prototype.canInvoke;
6292 MethodMember.prototype.invoke$4 = function($0, $1, $2, $3) { 6031 MethodMember.prototype.invoke$4 = function($0, $1, $2, $3) {
6293 return this.invoke($0, $1, $2, $3, false); 6032 return this.invoke($0, $1, $2, $3, false);
6294 }; 6033 };
6295 MethodMember.prototype.invoke$4$isDynamic = MethodMember.prototype.invoke; 6034 MethodMember.prototype.invoke$4$isDynamic = MethodMember.prototype.invoke;
6296 MethodMember.prototype.invoke$5 = MethodMember.prototype.invoke; 6035 MethodMember.prototype.invoke$5 = MethodMember.prototype.invoke;
6297 MethodMember.prototype.namesInOrder$1 = MethodMember.prototype.namesInOrder; 6036 MethodMember.prototype.namesInOrder$1 = MethodMember.prototype.namesInOrder;
6298 MethodMember.prototype.provideFieldSyntax$0 = MethodMember.prototype.provideFiel dSyntax; 6037 MethodMember.prototype.provideFieldSyntax$0 = MethodMember.prototype.provideFiel dSyntax;
6299 MethodMember.prototype.providePropertySyntax$0 = MethodMember.prototype.provideP ropertySyntax; 6038 MethodMember.prototype.providePropertySyntax$0 = MethodMember.prototype.provideP ropertySyntax;
6300 MethodMember.prototype.resolve$0 = MethodMember.prototype.resolve; 6039 MethodMember.prototype.resolve$0 = MethodMember.prototype.resolve;
6301 // ********** Code for MemberSet ************** 6040 // ********** Code for MemberSet **************
6302 function MemberSet(member, isVar) { 6041 function MemberSet(member, isVar) {
6042 this.jsname = member.get$jsname();
6303 this.name = member.name; 6043 this.name = member.name;
6044 this.isVar = isVar;
6304 this.members = [member]; 6045 this.members = [member];
6305 this.jsname = member.get$jsname();
6306 this.isVar = isVar;
6307 // Initializers done
6308 } 6046 }
6309 MemberSet.prototype.get$name = function() { return this.name; }; 6047 MemberSet.prototype.get$name = function() { return this.name; };
6310 MemberSet.prototype.get$members = function() { return this.members; }; 6048 MemberSet.prototype.get$members = function() { return this.members; };
6311 MemberSet.prototype.get$jsname = function() { return this.jsname; }; 6049 MemberSet.prototype.get$jsname = function() { return this.jsname; };
6312 MemberSet.prototype.get$isVar = function() { return this.isVar; }; 6050 MemberSet.prototype.get$isVar = function() { return this.isVar; };
6313 MemberSet.prototype.toString = function() { 6051 MemberSet.prototype.toString = function() {
6314 return ("" + this.name + ":" + this.members.get$length()); 6052 return ("" + this.name + ":" + this.members.get$length());
6315 } 6053 }
6316 MemberSet.prototype.get$containsMethods = function() { 6054 MemberSet.prototype.get$containsMethods = function() {
6317 return this.members.some((function (m) { 6055 return this.members.some((function (m) {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
6550 MemberSet.prototype.canInvoke$2 = MemberSet.prototype.canInvoke; 6288 MemberSet.prototype.canInvoke$2 = MemberSet.prototype.canInvoke;
6551 MemberSet.prototype.invoke$4 = function($0, $1, $2, $3) { 6289 MemberSet.prototype.invoke$4 = function($0, $1, $2, $3) {
6552 return this.invoke($0, $1, $2, $3, false); 6290 return this.invoke($0, $1, $2, $3, false);
6553 }; 6291 };
6554 MemberSet.prototype.invoke$4$isDynamic = MemberSet.prototype.invoke; 6292 MemberSet.prototype.invoke$4$isDynamic = MemberSet.prototype.invoke;
6555 MemberSet.prototype.invoke$5 = MemberSet.prototype.invoke; 6293 MemberSet.prototype.invoke$5 = MemberSet.prototype.invoke;
6556 MemberSet.prototype.toString$0 = MemberSet.prototype.toString; 6294 MemberSet.prototype.toString$0 = MemberSet.prototype.toString;
6557 // ********** Code for FactoryMap ************** 6295 // ********** Code for FactoryMap **************
6558 function FactoryMap() { 6296 function FactoryMap() {
6559 this.factories = new HashMapImplementation(); 6297 this.factories = new HashMapImplementation();
6560 // Initializers done
6561 } 6298 }
6562 FactoryMap.prototype.getFactoriesFor = function(typeName) { 6299 FactoryMap.prototype.getFactoriesFor = function(typeName) {
6563 var ret = this.factories.$index(typeName); 6300 var ret = this.factories.$index(typeName);
6564 if (ret == null) { 6301 if (ret == null) {
6565 ret = new HashMapImplementation(); 6302 ret = new HashMapImplementation();
6566 this.factories.$setindex(typeName, ret); 6303 this.factories.$setindex(typeName, ret);
6567 } 6304 }
6568 return ret; 6305 return ret;
6569 } 6306 }
6570 FactoryMap.prototype.addFactory = function(typeName, name, member) { 6307 FactoryMap.prototype.addFactory = function(typeName, name, member) {
(...skipping 10 matching lines...) Expand all
6581 ); 6318 );
6582 }) 6319 })
6583 ); 6320 );
6584 } 6321 }
6585 FactoryMap.prototype.forEach$1 = function($0) { 6322 FactoryMap.prototype.forEach$1 = function($0) {
6586 return this.forEach(to$call$1($0)); 6323 return this.forEach(to$call$1($0));
6587 }; 6324 };
6588 FactoryMap.prototype.getFactory$2 = FactoryMap.prototype.getFactory; 6325 FactoryMap.prototype.getFactory$2 = FactoryMap.prototype.getFactory;
6589 // ********** Code for Token ************** 6326 // ********** Code for Token **************
6590 function Token(kind, source, start, end) { 6327 function Token(kind, source, start, end) {
6328 this.end = end;
6591 this.kind = kind; 6329 this.kind = kind;
6330 this.start = start;
6592 this.source = source; 6331 this.source = source;
6593 this.start = start;
6594 this.end = end;
6595 // Initializers done
6596 } 6332 }
6597 Token.prototype.get$kind = function() { return this.kind; }; 6333 Token.prototype.get$kind = function() { return this.kind; };
6598 Token.prototype.get$end = function() { return this.end; }; 6334 Token.prototype.get$end = function() { return this.end; };
6599 Token.prototype.get$start = function() { return this.start; }; 6335 Token.prototype.get$start = function() { return this.start; };
6600 Token.prototype.get$text = function() { 6336 Token.prototype.get$text = function() {
6601 return this.source.get$text().substring(this.start, this.end); 6337 return this.source.get$text().substring(this.start, this.end);
6602 } 6338 }
6603 Token.prototype.toString = function() { 6339 Token.prototype.toString = function() {
6604 var kindText = TokenKind.kindToString(this.kind); 6340 var kindText = TokenKind.kindToString(this.kind);
6605 var actualText = this.get$text(); 6341 var actualText = this.get$text();
(...skipping 14 matching lines...) Expand all
6620 return this.end.call$0(); 6356 return this.end.call$0();
6621 }; 6357 };
6622 Token.prototype.start$0 = function() { 6358 Token.prototype.start$0 = function() {
6623 return this.start.call$0(); 6359 return this.start.call$0();
6624 }; 6360 };
6625 Token.prototype.toString$0 = Token.prototype.toString; 6361 Token.prototype.toString$0 = Token.prototype.toString;
6626 // ********** Code for LiteralToken ************** 6362 // ********** Code for LiteralToken **************
6627 $inherits(LiteralToken, Token); 6363 $inherits(LiteralToken, Token);
6628 function LiteralToken(kind, source, start, end, value) { 6364 function LiteralToken(kind, source, start, end, value) {
6629 this.value = value; 6365 this.value = value;
6630 // Initializers done
6631 Token.call(this, kind, source, start, end); 6366 Token.call(this, kind, source, start, end);
6632 } 6367 }
6633 LiteralToken.prototype.get$value = function() { return this.value; }; 6368 LiteralToken.prototype.get$value = function() { return this.value; };
6634 LiteralToken.prototype.set$value = function(value) { return this.value = value; }; 6369 LiteralToken.prototype.set$value = function(value) { return this.value = value; };
6635 // ********** Code for ErrorToken ************** 6370 // ********** Code for ErrorToken **************
6636 $inherits(ErrorToken, Token); 6371 $inherits(ErrorToken, Token);
6637 function ErrorToken(kind, source, start, end, message) { 6372 function ErrorToken(kind, source, start, end, message) {
6638 this.message = message; 6373 this.message = message;
6639 // Initializers done
6640 Token.call(this, kind, source, start, end); 6374 Token.call(this, kind, source, start, end);
6641 } 6375 }
6642 ErrorToken.prototype.get$message = function() { return this.message; }; 6376 ErrorToken.prototype.get$message = function() { return this.message; };
6643 ErrorToken.prototype.set$message = function(value) { return this.message = value ; }; 6377 ErrorToken.prototype.set$message = function(value) { return this.message = value ; };
6644 // ********** Code for SourceFile ************** 6378 // ********** Code for SourceFile **************
6645 function SourceFile(filename, _text) { 6379 function SourceFile(filename, _text) {
6380 this._text = _text;
6646 this.filename = filename; 6381 this.filename = filename;
6647 this._text = _text;
6648 // Initializers done
6649 } 6382 }
6650 SourceFile.prototype.get$filename = function() { return this.filename; }; 6383 SourceFile.prototype.get$filename = function() { return this.filename; };
6651 SourceFile.prototype.get$orderInLibrary = function() { return this.orderInLibrar y; }; 6384 SourceFile.prototype.get$orderInLibrary = function() { return this.orderInLibrar y; };
6652 SourceFile.prototype.set$orderInLibrary = function(value) { return this.orderInL ibrary = value; }; 6385 SourceFile.prototype.set$orderInLibrary = function(value) { return this.orderInL ibrary = value; };
6653 SourceFile.prototype.get$text = function() { 6386 SourceFile.prototype.get$text = function() {
6654 return this._text; 6387 return this._text;
6655 } 6388 }
6656 SourceFile.prototype.get$lineStarts = function() { 6389 SourceFile.prototype.get$lineStarts = function() {
6657 if (this._lineStarts == null) { 6390 if (this._lineStarts == null) {
6658 var starts = [(0)]; 6391 var starts = [(0)];
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
6723 } 6456 }
6724 } 6457 }
6725 SourceFile.prototype.compareTo$1 = SourceFile.prototype.compareTo; 6458 SourceFile.prototype.compareTo$1 = SourceFile.prototype.compareTo;
6726 SourceFile.prototype.getColumn$2 = SourceFile.prototype.getColumn; 6459 SourceFile.prototype.getColumn$2 = SourceFile.prototype.getColumn;
6727 SourceFile.prototype.getLine$1 = SourceFile.prototype.getLine; 6460 SourceFile.prototype.getLine$1 = SourceFile.prototype.getLine;
6728 // ********** Code for SourceSpan ************** 6461 // ********** Code for SourceSpan **************
6729 function SourceSpan(file, start, end) { 6462 function SourceSpan(file, start, end) {
6730 this.file = file; 6463 this.file = file;
6731 this.start = start; 6464 this.start = start;
6732 this.end = end; 6465 this.end = end;
6733 // Initializers done
6734 } 6466 }
6735 SourceSpan.prototype.get$file = function() { return this.file; }; 6467 SourceSpan.prototype.get$file = function() { return this.file; };
6736 SourceSpan.prototype.get$start = function() { return this.start; }; 6468 SourceSpan.prototype.get$start = function() { return this.start; };
6737 SourceSpan.prototype.get$end = function() { return this.end; }; 6469 SourceSpan.prototype.get$end = function() { return this.end; };
6738 SourceSpan.prototype.get$text = function() { 6470 SourceSpan.prototype.get$text = function() {
6739 return this.file.get$text().substring(this.start, this.end); 6471 return this.file.get$text().substring(this.start, this.end);
6740 } 6472 }
6741 SourceSpan.prototype.toMessageString = function(message) { 6473 SourceSpan.prototype.toMessageString = function(message) {
6742 return this.file.getLocationMessage(message, this.start, this.end, true); 6474 return this.file.getLocationMessage(message, this.start, this.end, true);
6743 } 6475 }
(...skipping 11 matching lines...) Expand all
6755 } 6487 }
6756 SourceSpan.prototype.compareTo$1 = SourceSpan.prototype.compareTo; 6488 SourceSpan.prototype.compareTo$1 = SourceSpan.prototype.compareTo;
6757 SourceSpan.prototype.end$0 = function() { 6489 SourceSpan.prototype.end$0 = function() {
6758 return this.end.call$0(); 6490 return this.end.call$0();
6759 }; 6491 };
6760 SourceSpan.prototype.start$0 = function() { 6492 SourceSpan.prototype.start$0 = function() {
6761 return this.start.call$0(); 6493 return this.start.call$0();
6762 }; 6494 };
6763 // ********** Code for InterpStack ************** 6495 // ********** Code for InterpStack **************
6764 function InterpStack(previous, quote, isMultiline) { 6496 function InterpStack(previous, quote, isMultiline) {
6765 this.previous = previous;
6766 this.quote = quote; 6497 this.quote = quote;
6767 this.isMultiline = isMultiline; 6498 this.isMultiline = isMultiline;
6768 this.depth = (-1); 6499 this.depth = (-1);
6769 // Initializers done 6500 this.previous = previous;
6770 } 6501 }
6771 InterpStack.prototype.get$previous = function() { return this.previous; }; 6502 InterpStack.prototype.get$previous = function() { return this.previous; };
6772 InterpStack.prototype.set$previous = function(value) { return this.previous = va lue; }; 6503 InterpStack.prototype.set$previous = function(value) { return this.previous = va lue; };
6773 InterpStack.prototype.get$quote = function() { return this.quote; }; 6504 InterpStack.prototype.get$quote = function() { return this.quote; };
6774 InterpStack.prototype.get$isMultiline = function() { return this.isMultiline; }; 6505 InterpStack.prototype.get$isMultiline = function() { return this.isMultiline; };
6775 InterpStack.prototype.get$depth = function() { return this.depth; }; 6506 InterpStack.prototype.get$depth = function() { return this.depth; };
6776 InterpStack.prototype.set$depth = function(value) { return this.depth = value; } ; 6507 InterpStack.prototype.set$depth = function(value) { return this.depth = value; } ;
6777 InterpStack.prototype.pop = function() { 6508 InterpStack.prototype.pop = function() {
6778 return this.previous; 6509 return this.previous;
6779 } 6510 }
6780 InterpStack.push = function(stack, quote, isMultiline) { 6511 InterpStack.push = function(stack, quote, isMultiline) {
6781 var newStack = new InterpStack(stack, quote, isMultiline); 6512 var newStack = new InterpStack(stack, quote, isMultiline);
6782 if (stack != null) newStack.set$previous(stack); 6513 if (stack != null) newStack.set$previous(stack);
6783 return newStack; 6514 return newStack;
6784 } 6515 }
6785 InterpStack.prototype.next$0 = function() { 6516 InterpStack.prototype.next$0 = function() {
6786 return this.next(); 6517 return this.next();
6787 }; 6518 };
6788 // ********** Code for TokenizerHelpers ************** 6519 // ********** Code for TokenizerHelpers **************
6789 function TokenizerHelpers() { 6520 function TokenizerHelpers() {
6790 // Initializers done 6521
6791 } 6522 }
6792 TokenizerHelpers.isIdentifierStart = function(c) { 6523 TokenizerHelpers.isIdentifierStart = function(c) {
6793 return ((c >= (97) && c <= (122)) || (c >= (65) && c <= (90)) || c == (95)); 6524 return ((c >= (97) && c <= (122)) || (c >= (65) && c <= (90)) || c == (95));
6794 } 6525 }
6795 TokenizerHelpers.isDigit = function(c) { 6526 TokenizerHelpers.isDigit = function(c) {
6796 return (c >= (48) && c <= (57)); 6527 return (c >= (48) && c <= (57));
6797 } 6528 }
6798 TokenizerHelpers.isIdentifierPart = function(c) { 6529 TokenizerHelpers.isIdentifierPart = function(c) {
6799 return (TokenizerHelpers.isIdentifierStart(c) || TokenizerHelpers.isDigit(c) | | c == (36)); 6530 return (TokenizerHelpers.isIdentifierStart(c) || TokenizerHelpers.isDigit(c) | | c == (36));
6800 } 6531 }
6801 TokenizerHelpers.isInterpIdentifierPart = function(c) { 6532 TokenizerHelpers.isInterpIdentifierPart = function(c) {
6802 return (TokenizerHelpers.isIdentifierStart(c) || TokenizerHelpers.isDigit(c)); 6533 return (TokenizerHelpers.isIdentifierStart(c) || TokenizerHelpers.isDigit(c));
6803 } 6534 }
6804 // ********** Code for TokenizerBase ************** 6535 // ********** Code for TokenizerBase **************
6805 $inherits(TokenizerBase, TokenizerHelpers); 6536 $inherits(TokenizerBase, TokenizerHelpers);
6806 function TokenizerBase(_source, _skipWhitespace, index) { 6537 function TokenizerBase(_source, _skipWhitespace, index) {
6538 this._lang_index = index;
6539 this._skipWhitespace = _skipWhitespace;
6807 this._source = _source; 6540 this._source = _source;
6808 this._skipWhitespace = _skipWhitespace;
6809 this._lang_index = index;
6810 // Initializers done
6811 TokenizerHelpers.call(this); 6541 TokenizerHelpers.call(this);
6812 this._text = this._source.get$text(); 6542 this._text = this._source.get$text();
6813 } 6543 }
6814 TokenizerBase.prototype._nextChar = function() { 6544 TokenizerBase.prototype._nextChar = function() {
6815 if (this._lang_index < this._text.length) { 6545 if (this._lang_index < this._text.length) {
6816 return this._text.charCodeAt(this._lang_index++); 6546 return this._text.charCodeAt(this._lang_index++);
6817 } 6547 }
6818 else { 6548 else {
6819 return (0); 6549 return (0);
6820 } 6550 }
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
7242 return this._finishToken((70)); 6972 return this._finishToken((70));
7243 } 6973 }
7244 else { 6974 else {
7245 return this._finishToken(kind); 6975 return this._finishToken(kind);
7246 } 6976 }
7247 } 6977 }
7248 TokenizerBase.prototype.next$0 = TokenizerBase.prototype.next; 6978 TokenizerBase.prototype.next$0 = TokenizerBase.prototype.next;
7249 // ********** Code for Tokenizer ************** 6979 // ********** Code for Tokenizer **************
7250 $inherits(Tokenizer, TokenizerBase); 6980 $inherits(Tokenizer, TokenizerBase);
7251 function Tokenizer(source, skipWhitespace, index) { 6981 function Tokenizer(source, skipWhitespace, index) {
7252 // Initializers done
7253 TokenizerBase.call(this, source, skipWhitespace, index); 6982 TokenizerBase.call(this, source, skipWhitespace, index);
7254 } 6983 }
7255 Tokenizer.prototype.next = function() { 6984 Tokenizer.prototype.next = function() {
7256 this._startIndex = this._lang_index; 6985 this._startIndex = this._lang_index;
7257 if (this._interpStack != null && this._interpStack.depth == (0)) { 6986 if (this._interpStack != null && this._interpStack.depth == (0)) {
7258 var istack = this._interpStack; 6987 var istack = this._interpStack;
7259 this._interpStack = this._interpStack.pop(); 6988 this._interpStack = this._interpStack.pop();
7260 if (istack.get$isMultiline()) { 6989 if (istack.get$isMultiline()) {
7261 return this.finishMultilineString(istack.get$quote()); 6990 return this.finishMultilineString(istack.get$quote());
7262 } 6991 }
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
8595 } 8324 }
8596 TokenKind.kindFromAssign = function(kind) { 8325 TokenKind.kindFromAssign = function(kind) {
8597 if (kind == (20)) return (0); 8326 if (kind == (20)) return (0);
8598 if (kind > (20) && kind <= (32)) { 8327 if (kind > (20) && kind <= (32)) {
8599 return kind + (15); 8328 return kind + (15);
8600 } 8329 }
8601 return (-1); 8330 return (-1);
8602 } 8331 }
8603 // ********** Code for Parser ************** 8332 // ********** Code for Parser **************
8604 function Parser(source, diet, throwOnIncomplete, optionalSemicolons, startOffset ) { 8333 function Parser(source, diet, throwOnIncomplete, optionalSemicolons, startOffset ) {
8605 this._inhibitLambda = false 8334 this.throwOnIncomplete = throwOnIncomplete;
8606 this._afterParensIndex = (0)
8607 this._recover = false
8608 this.source = source; 8335 this.source = source;
8336 this.optionalSemicolons = optionalSemicolons;
8337 this._recover = false;
8338 this._inhibitLambda = false;
8609 this.diet = diet; 8339 this.diet = diet;
8610 this.throwOnIncomplete = throwOnIncomplete; 8340 this._afterParensIndex = (0);
8611 this.optionalSemicolons = optionalSemicolons;
8612 // Initializers done
8613 this.tokenizer = new Tokenizer(this.source, true, startOffset); 8341 this.tokenizer = new Tokenizer(this.source, true, startOffset);
8614 this._peekToken = this.tokenizer.next(); 8342 this._peekToken = this.tokenizer.next();
8615 this._afterParens = []; 8343 this._afterParens = [];
8616 } 8344 }
8617 Parser.prototype.get$enableAwait = function() { 8345 Parser.prototype.get$enableAwait = function() {
8618 return $globals.experimentalAwaitPhase != null; 8346 return $globals.experimentalAwaitPhase != null;
8619 } 8347 }
8620 Parser.prototype.isPrematureEndOfFile = function() { 8348 Parser.prototype.isPrematureEndOfFile = function() {
8621 if (this.throwOnIncomplete && this._maybeEat((1))) { 8349 if (this.throwOnIncomplete && this._maybeEat((1))) {
8622 $throw(new IncompleteSourceException(this._previousToken)); 8350 $throw(new IncompleteSourceException(this._previousToken));
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
9426 if (!this._maybeEat((3))) { 9154 if (!this._maybeEat((3))) {
9427 do { 9155 do {
9428 args.add$1(this.argument()); 9156 args.add$1(this.argument());
9429 } 9157 }
9430 while (this._maybeEat((11))) 9158 while (this._maybeEat((11)))
9431 this._eat((3)); 9159 this._eat((3));
9432 } 9160 }
9433 this._inhibitLambda = saved; 9161 this._inhibitLambda = saved;
9434 return args; 9162 return args;
9435 } 9163 }
9436 Parser.prototype.get$arguments = function() {
9437 return this.arguments.bind(this);
9438 }
9439 Parser.prototype.finishPostfixExpression = function(expr) { 9164 Parser.prototype.finishPostfixExpression = function(expr) {
9440 switch (this._peek()) { 9165 switch (this._peek()) {
9441 case (2): 9166 case (2):
9442 9167
9443 return this.finishCallOrLambdaExpression(expr); 9168 return this.finishCallOrLambdaExpression(expr);
9444 9169
9445 case (4): 9170 case (4):
9446 9171
9447 this._eat((4)); 9172 this._eat((4));
9448 var index = this.expression(); 9173 var index = this.expression();
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
10104 } 9829 }
10105 else { 9830 else {
10106 this._errorExpected("label"); 9831 this._errorExpected("label");
10107 return null; 9832 return null;
10108 } 9833 }
10109 } 9834 }
10110 Parser.prototype.block$0 = Parser.prototype.block; 9835 Parser.prototype.block$0 = Parser.prototype.block;
10111 // ********** Code for IncompleteSourceException ************** 9836 // ********** Code for IncompleteSourceException **************
10112 function IncompleteSourceException(token) { 9837 function IncompleteSourceException(token) {
10113 this.token = token; 9838 this.token = token;
10114 // Initializers done
10115 } 9839 }
10116 IncompleteSourceException.prototype.toString = function() { 9840 IncompleteSourceException.prototype.toString = function() {
10117 if (this.token.get$span() == null) return ("Unexpected " + this.token); 9841 if (this.token.get$span() == null) return ("Unexpected " + this.token);
10118 return this.token.get$span().toMessageString(("Unexpected " + this.token)); 9842 return this.token.get$span().toMessageString(("Unexpected " + this.token));
10119 } 9843 }
10120 IncompleteSourceException.prototype.toString$0 = IncompleteSourceException.proto type.toString; 9844 IncompleteSourceException.prototype.toString$0 = IncompleteSourceException.proto type.toString;
10121 // ********** Code for DivertedTokenSource ************** 9845 // ********** Code for DivertedTokenSource **************
10122 function DivertedTokenSource(tokens, parser, previousTokenizer) { 9846 function DivertedTokenSource(tokens, parser, previousTokenizer) {
10123 this._lang_pos = (0) 9847 this.parser = parser;
9848 this._lang_pos = (0);
10124 this.tokens = tokens; 9849 this.tokens = tokens;
10125 this.parser = parser;
10126 this.previousTokenizer = previousTokenizer; 9850 this.previousTokenizer = previousTokenizer;
10127 // Initializers done
10128 } 9851 }
10129 DivertedTokenSource.prototype.next = function() { 9852 DivertedTokenSource.prototype.next = function() {
10130 var token = this.tokens.$index(this._lang_pos); 9853 var token = this.tokens.$index(this._lang_pos);
10131 ++this._lang_pos; 9854 ++this._lang_pos;
10132 if (this._lang_pos == this.tokens.get$length()) { 9855 if (this._lang_pos == this.tokens.get$length()) {
10133 this.parser.tokenizer = this.previousTokenizer; 9856 this.parser.tokenizer = this.previousTokenizer;
10134 } 9857 }
10135 return token; 9858 return token;
10136 } 9859 }
10137 DivertedTokenSource.prototype.next$0 = DivertedTokenSource.prototype.next; 9860 DivertedTokenSource.prototype.next$0 = DivertedTokenSource.prototype.next;
10138 // ********** Code for Node ************** 9861 // ********** Code for Node **************
10139 function Node(span) { 9862 function Node(span) {
10140 this.span = span; 9863 this.span = span;
10141 // Initializers done
10142 } 9864 }
10143 Node.prototype.get$span = function() { return this.span; }; 9865 Node.prototype.get$span = function() { return this.span; };
10144 Node.prototype.set$span = function(value) { return this.span = value; }; 9866 Node.prototype.set$span = function(value) { return this.span = value; };
10145 Node.prototype.visit$1 = Node.prototype.visit; 9867 Node.prototype.visit$1 = Node.prototype.visit;
10146 // ********** Code for Statement ************** 9868 // ********** Code for Statement **************
10147 $inherits(Statement, Node); 9869 $inherits(Statement, Node);
10148 function Statement(span) { 9870 function Statement(span) {
10149 // Initializers done
10150 Node.call(this, span); 9871 Node.call(this, span);
10151 } 9872 }
10152 // ********** Code for Definition ************** 9873 // ********** Code for Definition **************
10153 $inherits(Definition, Statement); 9874 $inherits(Definition, Statement);
10154 function Definition(span) { 9875 function Definition(span) {
10155 // Initializers done
10156 Statement.call(this, span); 9876 Statement.call(this, span);
10157 } 9877 }
10158 Definition.prototype.get$typeParameters = function() { 9878 Definition.prototype.get$typeParameters = function() {
10159 return null; 9879 return null;
10160 } 9880 }
10161 Definition.prototype.get$nativeType = function() { 9881 Definition.prototype.get$nativeType = function() {
10162 return null; 9882 return null;
10163 } 9883 }
10164 // ********** Code for Expression ************** 9884 // ********** Code for Expression **************
10165 $inherits(Expression, Node); 9885 $inherits(Expression, Node);
10166 function Expression(span) { 9886 function Expression(span) {
10167 // Initializers done
10168 Node.call(this, span); 9887 Node.call(this, span);
10169 } 9888 }
10170 // ********** Code for TypeReference ************** 9889 // ********** Code for TypeReference **************
10171 $inherits(TypeReference, Node); 9890 $inherits(TypeReference, Node);
10172 function TypeReference(span, type) { 9891 function TypeReference(span, type) {
10173 this.type = type; 9892 this.type = type;
10174 // Initializers done
10175 Node.call(this, span); 9893 Node.call(this, span);
10176 } 9894 }
10177 TypeReference.prototype.get$type = function() { return this.type; }; 9895 TypeReference.prototype.get$type = function() { return this.type; };
10178 TypeReference.prototype.set$type = function(value) { return this.type = value; } ; 9896 TypeReference.prototype.set$type = function(value) { return this.type = value; } ;
10179 TypeReference.prototype.visit = function(visitor) { 9897 TypeReference.prototype.visit = function(visitor) {
10180 return visitor.visitTypeReference(this); 9898 return visitor.visitTypeReference(this);
10181 } 9899 }
10182 TypeReference.prototype.get$isFinal = function() { 9900 TypeReference.prototype.get$isFinal = function() {
10183 return false; 9901 return false;
10184 } 9902 }
10185 TypeReference.prototype.visit$1 = TypeReference.prototype.visit; 9903 TypeReference.prototype.visit$1 = TypeReference.prototype.visit;
10186 // ********** Code for DirectiveDefinition ************** 9904 // ********** Code for DirectiveDefinition **************
10187 $inherits(DirectiveDefinition, Definition); 9905 $inherits(DirectiveDefinition, Definition);
10188 function DirectiveDefinition(name, arguments, span) { 9906 function DirectiveDefinition(name, arguments, span) {
9907 this.arguments = arguments;
10189 this.name = name; 9908 this.name = name;
10190 this.arguments = arguments;
10191 // Initializers done
10192 Definition.call(this, span); 9909 Definition.call(this, span);
10193 } 9910 }
10194 DirectiveDefinition.prototype.get$name = function() { return this.name; }; 9911 DirectiveDefinition.prototype.get$name = function() { return this.name; };
10195 DirectiveDefinition.prototype.set$name = function(value) { return this.name = va lue; }; 9912 DirectiveDefinition.prototype.set$name = function(value) { return this.name = va lue; };
10196 DirectiveDefinition.prototype.get$arguments = function() { return this.arguments ; };
10197 DirectiveDefinition.prototype.set$arguments = function(value) { return this.argu ments = value; };
10198 DirectiveDefinition.prototype.visit = function(visitor) { 9913 DirectiveDefinition.prototype.visit = function(visitor) {
10199 return visitor.visitDirectiveDefinition(this); 9914 return visitor.visitDirectiveDefinition(this);
10200 } 9915 }
10201 DirectiveDefinition.prototype.visit$1 = DirectiveDefinition.prototype.visit; 9916 DirectiveDefinition.prototype.visit$1 = DirectiveDefinition.prototype.visit;
10202 // ********** Code for TypeDefinition ************** 9917 // ********** Code for TypeDefinition **************
10203 $inherits(TypeDefinition, Definition); 9918 $inherits(TypeDefinition, Definition);
10204 function TypeDefinition(isClass, name, typeParameters, extendsTypes, implementsT ypes, nativeType, defaultType, body, span) { 9919 function TypeDefinition(isClass, name, typeParameters, extendsTypes, implementsT ypes, nativeType, defaultType, body, span) {
9920 this.extendsTypes = extendsTypes;
10205 this.isClass = isClass; 9921 this.isClass = isClass;
10206 this.name = name; 9922 this.name = name;
9923 this.body = body;
10207 this.typeParameters = typeParameters; 9924 this.typeParameters = typeParameters;
10208 this.extendsTypes = extendsTypes; 9925 this.nativeType = nativeType;
10209 this.implementsTypes = implementsTypes; 9926 this.implementsTypes = implementsTypes;
10210 this.nativeType = nativeType;
10211 this.defaultType = defaultType; 9927 this.defaultType = defaultType;
10212 this.body = body;
10213 // Initializers done
10214 Definition.call(this, span); 9928 Definition.call(this, span);
10215 } 9929 }
10216 TypeDefinition.prototype.get$isClass = function() { return this.isClass; }; 9930 TypeDefinition.prototype.get$isClass = function() { return this.isClass; };
10217 TypeDefinition.prototype.set$isClass = function(value) { return this.isClass = v alue; }; 9931 TypeDefinition.prototype.set$isClass = function(value) { return this.isClass = v alue; };
10218 TypeDefinition.prototype.get$name = function() { return this.name; }; 9932 TypeDefinition.prototype.get$name = function() { return this.name; };
10219 TypeDefinition.prototype.set$name = function(value) { return this.name = value; }; 9933 TypeDefinition.prototype.set$name = function(value) { return this.name = value; };
10220 TypeDefinition.prototype.get$typeParameters = function() { return this.typeParam eters; }; 9934 TypeDefinition.prototype.get$typeParameters = function() { return this.typeParam eters; };
10221 TypeDefinition.prototype.set$typeParameters = function(value) { return this.type Parameters = value; }; 9935 TypeDefinition.prototype.set$typeParameters = function(value) { return this.type Parameters = value; };
10222 TypeDefinition.prototype.get$nativeType = function() { return this.nativeType; } ; 9936 TypeDefinition.prototype.get$nativeType = function() { return this.nativeType; } ;
10223 TypeDefinition.prototype.set$nativeType = function(value) { return this.nativeTy pe = value; }; 9937 TypeDefinition.prototype.set$nativeType = function(value) { return this.nativeTy pe = value; };
10224 TypeDefinition.prototype.get$body = function() { return this.body; }; 9938 TypeDefinition.prototype.get$body = function() { return this.body; };
10225 TypeDefinition.prototype.set$body = function(value) { return this.body = value; }; 9939 TypeDefinition.prototype.set$body = function(value) { return this.body = value; };
10226 TypeDefinition.prototype.visit = function(visitor) { 9940 TypeDefinition.prototype.visit = function(visitor) {
10227 return visitor.visitTypeDefinition(this); 9941 return visitor.visitTypeDefinition(this);
10228 } 9942 }
10229 TypeDefinition.prototype.visit$1 = TypeDefinition.prototype.visit; 9943 TypeDefinition.prototype.visit$1 = TypeDefinition.prototype.visit;
10230 // ********** Code for FunctionTypeDefinition ************** 9944 // ********** Code for FunctionTypeDefinition **************
10231 $inherits(FunctionTypeDefinition, Definition); 9945 $inherits(FunctionTypeDefinition, Definition);
10232 function FunctionTypeDefinition(func, typeParameters, span) { 9946 function FunctionTypeDefinition(func, typeParameters, span) {
9947 this.typeParameters = typeParameters;
10233 this.func = func; 9948 this.func = func;
10234 this.typeParameters = typeParameters;
10235 // Initializers done
10236 Definition.call(this, span); 9949 Definition.call(this, span);
10237 } 9950 }
10238 FunctionTypeDefinition.prototype.get$func = function() { return this.func; }; 9951 FunctionTypeDefinition.prototype.get$func = function() { return this.func; };
10239 FunctionTypeDefinition.prototype.set$func = function(value) { return this.func = value; }; 9952 FunctionTypeDefinition.prototype.set$func = function(value) { return this.func = value; };
10240 FunctionTypeDefinition.prototype.get$typeParameters = function() { return this.t ypeParameters; }; 9953 FunctionTypeDefinition.prototype.get$typeParameters = function() { return this.t ypeParameters; };
10241 FunctionTypeDefinition.prototype.set$typeParameters = function(value) { return t his.typeParameters = value; }; 9954 FunctionTypeDefinition.prototype.set$typeParameters = function(value) { return t his.typeParameters = value; };
10242 FunctionTypeDefinition.prototype.visit = function(visitor) { 9955 FunctionTypeDefinition.prototype.visit = function(visitor) {
10243 return visitor.visitFunctionTypeDefinition(this); 9956 return visitor.visitFunctionTypeDefinition(this);
10244 } 9957 }
10245 FunctionTypeDefinition.prototype.visit$1 = FunctionTypeDefinition.prototype.visi t; 9958 FunctionTypeDefinition.prototype.visit$1 = FunctionTypeDefinition.prototype.visi t;
10246 // ********** Code for VariableDefinition ************** 9959 // ********** Code for VariableDefinition **************
10247 $inherits(VariableDefinition, Definition); 9960 $inherits(VariableDefinition, Definition);
10248 function VariableDefinition(modifiers, type, names, values, span) { 9961 function VariableDefinition(modifiers, type, names, values, span) {
10249 this.modifiers = modifiers; 9962 this.modifiers = modifiers;
10250 this.type = type; 9963 this.type = type;
10251 this.names = names; 9964 this.names = names;
10252 this.values = values; 9965 this.values = values;
10253 // Initializers done
10254 Definition.call(this, span); 9966 Definition.call(this, span);
10255 } 9967 }
10256 VariableDefinition.prototype.get$type = function() { return this.type; }; 9968 VariableDefinition.prototype.get$type = function() { return this.type; };
10257 VariableDefinition.prototype.set$type = function(value) { return this.type = val ue; }; 9969 VariableDefinition.prototype.set$type = function(value) { return this.type = val ue; };
10258 VariableDefinition.prototype.get$names = function() { return this.names; }; 9970 VariableDefinition.prototype.get$names = function() { return this.names; };
10259 VariableDefinition.prototype.set$names = function(value) { return this.names = v alue; }; 9971 VariableDefinition.prototype.set$names = function(value) { return this.names = v alue; };
10260 VariableDefinition.prototype.visit = function(visitor) { 9972 VariableDefinition.prototype.visit = function(visitor) {
10261 return visitor.visitVariableDefinition(this); 9973 return visitor.visitVariableDefinition(this);
10262 } 9974 }
10263 VariableDefinition.prototype.visit$1 = VariableDefinition.prototype.visit; 9975 VariableDefinition.prototype.visit$1 = VariableDefinition.prototype.visit;
10264 // ********** Code for FunctionDefinition ************** 9976 // ********** Code for FunctionDefinition **************
10265 $inherits(FunctionDefinition, Definition); 9977 $inherits(FunctionDefinition, Definition);
10266 function FunctionDefinition(modifiers, returnType, name, formals, initializers, nativeBody, body, span) { 9978 function FunctionDefinition(modifiers, returnType, name, formals, initializers, nativeBody, body, span) {
10267 this.modifiers = modifiers; 9979 this.modifiers = modifiers;
9980 this.name = name;
9981 this.initializers = initializers;
9982 this.body = body;
10268 this.returnType = returnType; 9983 this.returnType = returnType;
10269 this.name = name;
10270 this.formals = formals; 9984 this.formals = formals;
10271 this.initializers = initializers;
10272 this.nativeBody = nativeBody; 9985 this.nativeBody = nativeBody;
10273 this.body = body;
10274 // Initializers done
10275 Definition.call(this, span); 9986 Definition.call(this, span);
10276 } 9987 }
10277 FunctionDefinition.prototype.get$returnType = function() { return this.returnTyp e; }; 9988 FunctionDefinition.prototype.get$returnType = function() { return this.returnTyp e; };
10278 FunctionDefinition.prototype.set$returnType = function(value) { return this.retu rnType = value; }; 9989 FunctionDefinition.prototype.set$returnType = function(value) { return this.retu rnType = value; };
10279 FunctionDefinition.prototype.get$name = function() { return this.name; }; 9990 FunctionDefinition.prototype.get$name = function() { return this.name; };
10280 FunctionDefinition.prototype.set$name = function(value) { return this.name = val ue; }; 9991 FunctionDefinition.prototype.set$name = function(value) { return this.name = val ue; };
10281 FunctionDefinition.prototype.get$initializers = function() { return this.initial izers; }; 9992 FunctionDefinition.prototype.get$initializers = function() { return this.initial izers; };
10282 FunctionDefinition.prototype.set$initializers = function(value) { return this.in itializers = value; }; 9993 FunctionDefinition.prototype.set$initializers = function(value) { return this.in itializers = value; };
10283 FunctionDefinition.prototype.get$nativeBody = function() { return this.nativeBod y; }; 9994 FunctionDefinition.prototype.get$nativeBody = function() { return this.nativeBod y; };
10284 FunctionDefinition.prototype.set$nativeBody = function(value) { return this.nati veBody = value; }; 9995 FunctionDefinition.prototype.set$nativeBody = function(value) { return this.nati veBody = value; };
10285 FunctionDefinition.prototype.get$body = function() { return this.body; }; 9996 FunctionDefinition.prototype.get$body = function() { return this.body; };
10286 FunctionDefinition.prototype.set$body = function(value) { return this.body = val ue; }; 9997 FunctionDefinition.prototype.set$body = function(value) { return this.body = val ue; };
10287 FunctionDefinition.prototype.visit = function(visitor) { 9998 FunctionDefinition.prototype.visit = function(visitor) {
10288 return visitor.visitFunctionDefinition(this); 9999 return visitor.visitFunctionDefinition(this);
10289 } 10000 }
10290 FunctionDefinition.prototype.visit$1 = FunctionDefinition.prototype.visit; 10001 FunctionDefinition.prototype.visit$1 = FunctionDefinition.prototype.visit;
10291 // ********** Code for ReturnStatement ************** 10002 // ********** Code for ReturnStatement **************
10292 $inherits(ReturnStatement, Statement); 10003 $inherits(ReturnStatement, Statement);
10293 function ReturnStatement(value, span) { 10004 function ReturnStatement(value, span) {
10294 this.value = value; 10005 this.value = value;
10295 // Initializers done
10296 Statement.call(this, span); 10006 Statement.call(this, span);
10297 } 10007 }
10298 ReturnStatement.prototype.get$value = function() { return this.value; }; 10008 ReturnStatement.prototype.get$value = function() { return this.value; };
10299 ReturnStatement.prototype.set$value = function(value) { return this.value = valu e; }; 10009 ReturnStatement.prototype.set$value = function(value) { return this.value = valu e; };
10300 ReturnStatement.prototype.visit = function(visitor) { 10010 ReturnStatement.prototype.visit = function(visitor) {
10301 return visitor.visitReturnStatement(this); 10011 return visitor.visitReturnStatement(this);
10302 } 10012 }
10303 ReturnStatement.prototype.visit$1 = ReturnStatement.prototype.visit; 10013 ReturnStatement.prototype.visit$1 = ReturnStatement.prototype.visit;
10304 // ********** Code for ThrowStatement ************** 10014 // ********** Code for ThrowStatement **************
10305 $inherits(ThrowStatement, Statement); 10015 $inherits(ThrowStatement, Statement);
10306 function ThrowStatement(value, span) { 10016 function ThrowStatement(value, span) {
10307 this.value = value; 10017 this.value = value;
10308 // Initializers done
10309 Statement.call(this, span); 10018 Statement.call(this, span);
10310 } 10019 }
10311 ThrowStatement.prototype.get$value = function() { return this.value; }; 10020 ThrowStatement.prototype.get$value = function() { return this.value; };
10312 ThrowStatement.prototype.set$value = function(value) { return this.value = value ; }; 10021 ThrowStatement.prototype.set$value = function(value) { return this.value = value ; };
10313 ThrowStatement.prototype.visit = function(visitor) { 10022 ThrowStatement.prototype.visit = function(visitor) {
10314 return visitor.visitThrowStatement(this); 10023 return visitor.visitThrowStatement(this);
10315 } 10024 }
10316 ThrowStatement.prototype.visit$1 = ThrowStatement.prototype.visit; 10025 ThrowStatement.prototype.visit$1 = ThrowStatement.prototype.visit;
10317 // ********** Code for AssertStatement ************** 10026 // ********** Code for AssertStatement **************
10318 $inherits(AssertStatement, Statement); 10027 $inherits(AssertStatement, Statement);
10319 function AssertStatement(test, span) { 10028 function AssertStatement(test, span) {
10320 this.test = test; 10029 this.test = test;
10321 // Initializers done
10322 Statement.call(this, span); 10030 Statement.call(this, span);
10323 } 10031 }
10324 AssertStatement.prototype.visit = function(visitor) { 10032 AssertStatement.prototype.visit = function(visitor) {
10325 return visitor.visitAssertStatement(this); 10033 return visitor.visitAssertStatement(this);
10326 } 10034 }
10327 AssertStatement.prototype.visit$1 = AssertStatement.prototype.visit; 10035 AssertStatement.prototype.visit$1 = AssertStatement.prototype.visit;
10328 // ********** Code for BreakStatement ************** 10036 // ********** Code for BreakStatement **************
10329 $inherits(BreakStatement, Statement); 10037 $inherits(BreakStatement, Statement);
10330 function BreakStatement(label, span) { 10038 function BreakStatement(label, span) {
10331 this.label = label; 10039 this.label = label;
10332 // Initializers done
10333 Statement.call(this, span); 10040 Statement.call(this, span);
10334 } 10041 }
10335 BreakStatement.prototype.get$label = function() { return this.label; }; 10042 BreakStatement.prototype.get$label = function() { return this.label; };
10336 BreakStatement.prototype.set$label = function(value) { return this.label = value ; }; 10043 BreakStatement.prototype.set$label = function(value) { return this.label = value ; };
10337 BreakStatement.prototype.visit = function(visitor) { 10044 BreakStatement.prototype.visit = function(visitor) {
10338 return visitor.visitBreakStatement(this); 10045 return visitor.visitBreakStatement(this);
10339 } 10046 }
10340 BreakStatement.prototype.visit$1 = BreakStatement.prototype.visit; 10047 BreakStatement.prototype.visit$1 = BreakStatement.prototype.visit;
10341 // ********** Code for ContinueStatement ************** 10048 // ********** Code for ContinueStatement **************
10342 $inherits(ContinueStatement, Statement); 10049 $inherits(ContinueStatement, Statement);
10343 function ContinueStatement(label, span) { 10050 function ContinueStatement(label, span) {
10344 this.label = label; 10051 this.label = label;
10345 // Initializers done
10346 Statement.call(this, span); 10052 Statement.call(this, span);
10347 } 10053 }
10348 ContinueStatement.prototype.get$label = function() { return this.label; }; 10054 ContinueStatement.prototype.get$label = function() { return this.label; };
10349 ContinueStatement.prototype.set$label = function(value) { return this.label = va lue; }; 10055 ContinueStatement.prototype.set$label = function(value) { return this.label = va lue; };
10350 ContinueStatement.prototype.visit = function(visitor) { 10056 ContinueStatement.prototype.visit = function(visitor) {
10351 return visitor.visitContinueStatement(this); 10057 return visitor.visitContinueStatement(this);
10352 } 10058 }
10353 ContinueStatement.prototype.visit$1 = ContinueStatement.prototype.visit; 10059 ContinueStatement.prototype.visit$1 = ContinueStatement.prototype.visit;
10354 // ********** Code for IfStatement ************** 10060 // ********** Code for IfStatement **************
10355 $inherits(IfStatement, Statement); 10061 $inherits(IfStatement, Statement);
10356 function IfStatement(test, trueBranch, falseBranch, span) { 10062 function IfStatement(test, trueBranch, falseBranch, span) {
10357 this.test = test; 10063 this.test = test;
10064 this.falseBranch = falseBranch;
10358 this.trueBranch = trueBranch; 10065 this.trueBranch = trueBranch;
10359 this.falseBranch = falseBranch;
10360 // Initializers done
10361 Statement.call(this, span); 10066 Statement.call(this, span);
10362 } 10067 }
10363 IfStatement.prototype.visit = function(visitor) { 10068 IfStatement.prototype.visit = function(visitor) {
10364 return visitor.visitIfStatement(this); 10069 return visitor.visitIfStatement(this);
10365 } 10070 }
10366 IfStatement.prototype.visit$1 = IfStatement.prototype.visit; 10071 IfStatement.prototype.visit$1 = IfStatement.prototype.visit;
10367 // ********** Code for WhileStatement ************** 10072 // ********** Code for WhileStatement **************
10368 $inherits(WhileStatement, Statement); 10073 $inherits(WhileStatement, Statement);
10369 function WhileStatement(test, body, span) { 10074 function WhileStatement(test, body, span) {
10075 this.body = body;
10370 this.test = test; 10076 this.test = test;
10371 this.body = body;
10372 // Initializers done
10373 Statement.call(this, span); 10077 Statement.call(this, span);
10374 } 10078 }
10375 WhileStatement.prototype.get$body = function() { return this.body; }; 10079 WhileStatement.prototype.get$body = function() { return this.body; };
10376 WhileStatement.prototype.set$body = function(value) { return this.body = value; }; 10080 WhileStatement.prototype.set$body = function(value) { return this.body = value; };
10377 WhileStatement.prototype.visit = function(visitor) { 10081 WhileStatement.prototype.visit = function(visitor) {
10378 return visitor.visitWhileStatement(this); 10082 return visitor.visitWhileStatement(this);
10379 } 10083 }
10380 WhileStatement.prototype.visit$1 = WhileStatement.prototype.visit; 10084 WhileStatement.prototype.visit$1 = WhileStatement.prototype.visit;
10381 // ********** Code for DoStatement ************** 10085 // ********** Code for DoStatement **************
10382 $inherits(DoStatement, Statement); 10086 $inherits(DoStatement, Statement);
10383 function DoStatement(body, test, span) { 10087 function DoStatement(body, test, span) {
10384 this.body = body; 10088 this.body = body;
10385 this.test = test; 10089 this.test = test;
10386 // Initializers done
10387 Statement.call(this, span); 10090 Statement.call(this, span);
10388 } 10091 }
10389 DoStatement.prototype.get$body = function() { return this.body; }; 10092 DoStatement.prototype.get$body = function() { return this.body; };
10390 DoStatement.prototype.set$body = function(value) { return this.body = value; }; 10093 DoStatement.prototype.set$body = function(value) { return this.body = value; };
10391 DoStatement.prototype.visit = function(visitor) { 10094 DoStatement.prototype.visit = function(visitor) {
10392 return visitor.visitDoStatement(this); 10095 return visitor.visitDoStatement(this);
10393 } 10096 }
10394 DoStatement.prototype.visit$1 = DoStatement.prototype.visit; 10097 DoStatement.prototype.visit$1 = DoStatement.prototype.visit;
10395 // ********** Code for ForStatement ************** 10098 // ********** Code for ForStatement **************
10396 $inherits(ForStatement, Statement); 10099 $inherits(ForStatement, Statement);
10397 function ForStatement(init, test, step, body, span) { 10100 function ForStatement(init, test, step, body, span) {
10398 this.init = init; 10101 this.body = body;
10399 this.test = test; 10102 this.test = test;
10400 this.step = step; 10103 this.step = step;
10401 this.body = body; 10104 this.init = init;
10402 // Initializers done
10403 Statement.call(this, span); 10105 Statement.call(this, span);
10404 } 10106 }
10405 ForStatement.prototype.get$body = function() { return this.body; }; 10107 ForStatement.prototype.get$body = function() { return this.body; };
10406 ForStatement.prototype.set$body = function(value) { return this.body = value; }; 10108 ForStatement.prototype.set$body = function(value) { return this.body = value; };
10407 ForStatement.prototype.visit = function(visitor) { 10109 ForStatement.prototype.visit = function(visitor) {
10408 return visitor.visitForStatement(this); 10110 return visitor.visitForStatement(this);
10409 } 10111 }
10410 ForStatement.prototype.visit$1 = ForStatement.prototype.visit; 10112 ForStatement.prototype.visit$1 = ForStatement.prototype.visit;
10411 // ********** Code for ForInStatement ************** 10113 // ********** Code for ForInStatement **************
10412 $inherits(ForInStatement, Statement); 10114 $inherits(ForInStatement, Statement);
10413 function ForInStatement(item, list, body, span) { 10115 function ForInStatement(item, list, body, span) {
10116 this.body = body;
10414 this.item = item; 10117 this.item = item;
10415 this.list = list; 10118 this.list = list;
10416 this.body = body;
10417 // Initializers done
10418 Statement.call(this, span); 10119 Statement.call(this, span);
10419 } 10120 }
10420 ForInStatement.prototype.get$body = function() { return this.body; }; 10121 ForInStatement.prototype.get$body = function() { return this.body; };
10421 ForInStatement.prototype.set$body = function(value) { return this.body = value; }; 10122 ForInStatement.prototype.set$body = function(value) { return this.body = value; };
10422 ForInStatement.prototype.visit = function(visitor) { 10123 ForInStatement.prototype.visit = function(visitor) {
10423 return visitor.visitForInStatement(this); 10124 return visitor.visitForInStatement(this);
10424 } 10125 }
10425 ForInStatement.prototype.visit$1 = ForInStatement.prototype.visit; 10126 ForInStatement.prototype.visit$1 = ForInStatement.prototype.visit;
10426 // ********** Code for TryStatement ************** 10127 // ********** Code for TryStatement **************
10427 $inherits(TryStatement, Statement); 10128 $inherits(TryStatement, Statement);
10428 function TryStatement(body, catches, finallyBlock, span) { 10129 function TryStatement(body, catches, finallyBlock, span) {
10429 this.body = body; 10130 this.body = body;
10131 this.finallyBlock = finallyBlock;
10430 this.catches = catches; 10132 this.catches = catches;
10431 this.finallyBlock = finallyBlock;
10432 // Initializers done
10433 Statement.call(this, span); 10133 Statement.call(this, span);
10434 } 10134 }
10435 TryStatement.prototype.get$body = function() { return this.body; }; 10135 TryStatement.prototype.get$body = function() { return this.body; };
10436 TryStatement.prototype.set$body = function(value) { return this.body = value; }; 10136 TryStatement.prototype.set$body = function(value) { return this.body = value; };
10437 TryStatement.prototype.visit = function(visitor) { 10137 TryStatement.prototype.visit = function(visitor) {
10438 return visitor.visitTryStatement(this); 10138 return visitor.visitTryStatement(this);
10439 } 10139 }
10440 TryStatement.prototype.visit$1 = TryStatement.prototype.visit; 10140 TryStatement.prototype.visit$1 = TryStatement.prototype.visit;
10441 // ********** Code for SwitchStatement ************** 10141 // ********** Code for SwitchStatement **************
10442 $inherits(SwitchStatement, Statement); 10142 $inherits(SwitchStatement, Statement);
10443 function SwitchStatement(test, cases, span) { 10143 function SwitchStatement(test, cases, span) {
10444 this.test = test; 10144 this.test = test;
10445 this.cases = cases; 10145 this.cases = cases;
10446 // Initializers done
10447 Statement.call(this, span); 10146 Statement.call(this, span);
10448 } 10147 }
10449 SwitchStatement.prototype.get$cases = function() { return this.cases; }; 10148 SwitchStatement.prototype.get$cases = function() { return this.cases; };
10450 SwitchStatement.prototype.set$cases = function(value) { return this.cases = valu e; }; 10149 SwitchStatement.prototype.set$cases = function(value) { return this.cases = valu e; };
10451 SwitchStatement.prototype.visit = function(visitor) { 10150 SwitchStatement.prototype.visit = function(visitor) {
10452 return visitor.visitSwitchStatement(this); 10151 return visitor.visitSwitchStatement(this);
10453 } 10152 }
10454 SwitchStatement.prototype.visit$1 = SwitchStatement.prototype.visit; 10153 SwitchStatement.prototype.visit$1 = SwitchStatement.prototype.visit;
10455 // ********** Code for BlockStatement ************** 10154 // ********** Code for BlockStatement **************
10456 $inherits(BlockStatement, Statement); 10155 $inherits(BlockStatement, Statement);
10457 function BlockStatement(body, span) { 10156 function BlockStatement(body, span) {
10458 this.body = body; 10157 this.body = body;
10459 // Initializers done
10460 Statement.call(this, span); 10158 Statement.call(this, span);
10461 } 10159 }
10462 BlockStatement.prototype.get$body = function() { return this.body; }; 10160 BlockStatement.prototype.get$body = function() { return this.body; };
10463 BlockStatement.prototype.set$body = function(value) { return this.body = value; }; 10161 BlockStatement.prototype.set$body = function(value) { return this.body = value; };
10464 BlockStatement.prototype.visit = function(visitor) { 10162 BlockStatement.prototype.visit = function(visitor) {
10465 return visitor.visitBlockStatement(this); 10163 return visitor.visitBlockStatement(this);
10466 } 10164 }
10467 BlockStatement.prototype.visit$1 = BlockStatement.prototype.visit; 10165 BlockStatement.prototype.visit$1 = BlockStatement.prototype.visit;
10468 // ********** Code for LabeledStatement ************** 10166 // ********** Code for LabeledStatement **************
10469 $inherits(LabeledStatement, Statement); 10167 $inherits(LabeledStatement, Statement);
10470 function LabeledStatement(name, body, span) { 10168 function LabeledStatement(name, body, span) {
10169 this.body = body;
10471 this.name = name; 10170 this.name = name;
10472 this.body = body;
10473 // Initializers done
10474 Statement.call(this, span); 10171 Statement.call(this, span);
10475 } 10172 }
10476 LabeledStatement.prototype.get$name = function() { return this.name; }; 10173 LabeledStatement.prototype.get$name = function() { return this.name; };
10477 LabeledStatement.prototype.set$name = function(value) { return this.name = value ; }; 10174 LabeledStatement.prototype.set$name = function(value) { return this.name = value ; };
10478 LabeledStatement.prototype.get$body = function() { return this.body; }; 10175 LabeledStatement.prototype.get$body = function() { return this.body; };
10479 LabeledStatement.prototype.set$body = function(value) { return this.body = value ; }; 10176 LabeledStatement.prototype.set$body = function(value) { return this.body = value ; };
10480 LabeledStatement.prototype.visit = function(visitor) { 10177 LabeledStatement.prototype.visit = function(visitor) {
10481 return visitor.visitLabeledStatement(this); 10178 return visitor.visitLabeledStatement(this);
10482 } 10179 }
10483 LabeledStatement.prototype.visit$1 = LabeledStatement.prototype.visit; 10180 LabeledStatement.prototype.visit$1 = LabeledStatement.prototype.visit;
10484 // ********** Code for ExpressionStatement ************** 10181 // ********** Code for ExpressionStatement **************
10485 $inherits(ExpressionStatement, Statement); 10182 $inherits(ExpressionStatement, Statement);
10486 function ExpressionStatement(body, span) { 10183 function ExpressionStatement(body, span) {
10487 this.body = body; 10184 this.body = body;
10488 // Initializers done
10489 Statement.call(this, span); 10185 Statement.call(this, span);
10490 } 10186 }
10491 ExpressionStatement.prototype.get$body = function() { return this.body; }; 10187 ExpressionStatement.prototype.get$body = function() { return this.body; };
10492 ExpressionStatement.prototype.set$body = function(value) { return this.body = va lue; }; 10188 ExpressionStatement.prototype.set$body = function(value) { return this.body = va lue; };
10493 ExpressionStatement.prototype.visit = function(visitor) { 10189 ExpressionStatement.prototype.visit = function(visitor) {
10494 return visitor.visitExpressionStatement(this); 10190 return visitor.visitExpressionStatement(this);
10495 } 10191 }
10496 ExpressionStatement.prototype.visit$1 = ExpressionStatement.prototype.visit; 10192 ExpressionStatement.prototype.visit$1 = ExpressionStatement.prototype.visit;
10497 // ********** Code for EmptyStatement ************** 10193 // ********** Code for EmptyStatement **************
10498 $inherits(EmptyStatement, Statement); 10194 $inherits(EmptyStatement, Statement);
10499 function EmptyStatement(span) { 10195 function EmptyStatement(span) {
10500 // Initializers done
10501 Statement.call(this, span); 10196 Statement.call(this, span);
10502 } 10197 }
10503 EmptyStatement.prototype.visit = function(visitor) { 10198 EmptyStatement.prototype.visit = function(visitor) {
10504 return visitor.visitEmptyStatement(this); 10199 return visitor.visitEmptyStatement(this);
10505 } 10200 }
10506 EmptyStatement.prototype.visit$1 = EmptyStatement.prototype.visit; 10201 EmptyStatement.prototype.visit$1 = EmptyStatement.prototype.visit;
10507 // ********** Code for DietStatement ************** 10202 // ********** Code for DietStatement **************
10508 $inherits(DietStatement, Statement); 10203 $inherits(DietStatement, Statement);
10509 function DietStatement(span) { 10204 function DietStatement(span) {
10510 // Initializers done
10511 Statement.call(this, span); 10205 Statement.call(this, span);
10512 } 10206 }
10513 DietStatement.prototype.visit = function(visitor) { 10207 DietStatement.prototype.visit = function(visitor) {
10514 return visitor.visitDietStatement(this); 10208 return visitor.visitDietStatement(this);
10515 } 10209 }
10516 DietStatement.prototype.visit$1 = DietStatement.prototype.visit; 10210 DietStatement.prototype.visit$1 = DietStatement.prototype.visit;
10517 // ********** Code for LambdaExpression ************** 10211 // ********** Code for LambdaExpression **************
10518 $inherits(LambdaExpression, Expression); 10212 $inherits(LambdaExpression, Expression);
10519 function LambdaExpression(func, span) { 10213 function LambdaExpression(func, span) {
10520 this.func = func; 10214 this.func = func;
10521 // Initializers done
10522 Expression.call(this, span); 10215 Expression.call(this, span);
10523 } 10216 }
10524 LambdaExpression.prototype.get$func = function() { return this.func; }; 10217 LambdaExpression.prototype.get$func = function() { return this.func; };
10525 LambdaExpression.prototype.set$func = function(value) { return this.func = value ; }; 10218 LambdaExpression.prototype.set$func = function(value) { return this.func = value ; };
10526 LambdaExpression.prototype.visit = function(visitor) { 10219 LambdaExpression.prototype.visit = function(visitor) {
10527 return visitor.visitLambdaExpression(this); 10220 return visitor.visitLambdaExpression(this);
10528 } 10221 }
10529 LambdaExpression.prototype.visit$1 = LambdaExpression.prototype.visit; 10222 LambdaExpression.prototype.visit$1 = LambdaExpression.prototype.visit;
10530 // ********** Code for CallExpression ************** 10223 // ********** Code for CallExpression **************
10531 $inherits(CallExpression, Expression); 10224 $inherits(CallExpression, Expression);
10532 function CallExpression(target, arguments, span) { 10225 function CallExpression(target, arguments, span) {
10533 this.target = target; 10226 this.target = target;
10534 this.arguments = arguments; 10227 this.arguments = arguments;
10535 // Initializers done
10536 Expression.call(this, span); 10228 Expression.call(this, span);
10537 } 10229 }
10538 CallExpression.prototype.get$target = function() { return this.target; };
10539 CallExpression.prototype.set$target = function(value) { return this.target = val ue; };
10540 CallExpression.prototype.get$arguments = function() { return this.arguments; };
10541 CallExpression.prototype.set$arguments = function(value) { return this.arguments = value; };
10542 CallExpression.prototype.visit = function(visitor) { 10230 CallExpression.prototype.visit = function(visitor) {
10543 return visitor.visitCallExpression(this); 10231 return visitor.visitCallExpression(this);
10544 } 10232 }
10545 CallExpression.prototype.visit$1 = CallExpression.prototype.visit; 10233 CallExpression.prototype.visit$1 = CallExpression.prototype.visit;
10546 // ********** Code for IndexExpression ************** 10234 // ********** Code for IndexExpression **************
10547 $inherits(IndexExpression, Expression); 10235 $inherits(IndexExpression, Expression);
10548 function IndexExpression(target, index, span) { 10236 function IndexExpression(target, index, span) {
10549 this.target = target; 10237 this.target = target;
10550 this.index = index; 10238 this.index = index;
10551 // Initializers done
10552 Expression.call(this, span); 10239 Expression.call(this, span);
10553 } 10240 }
10554 IndexExpression.prototype.get$target = function() { return this.target; };
10555 IndexExpression.prototype.set$target = function(value) { return this.target = va lue; };
10556 IndexExpression.prototype.visit = function(visitor) { 10241 IndexExpression.prototype.visit = function(visitor) {
10557 return visitor.visitIndexExpression(this); 10242 return visitor.visitIndexExpression(this);
10558 } 10243 }
10559 IndexExpression.prototype.visit$1 = IndexExpression.prototype.visit; 10244 IndexExpression.prototype.visit$1 = IndexExpression.prototype.visit;
10560 // ********** Code for BinaryExpression ************** 10245 // ********** Code for BinaryExpression **************
10561 $inherits(BinaryExpression, Expression); 10246 $inherits(BinaryExpression, Expression);
10562 function BinaryExpression(op, x, y, span) { 10247 function BinaryExpression(op, x, y, span) {
10248 this.y = y;
10249 this.x = x;
10563 this.op = op; 10250 this.op = op;
10564 this.x = x;
10565 this.y = y;
10566 // Initializers done
10567 Expression.call(this, span); 10251 Expression.call(this, span);
10568 } 10252 }
10569 BinaryExpression.prototype.get$op = function() { return this.op; }; 10253 BinaryExpression.prototype.get$op = function() { return this.op; };
10570 BinaryExpression.prototype.set$op = function(value) { return this.op = value; }; 10254 BinaryExpression.prototype.set$op = function(value) { return this.op = value; };
10571 BinaryExpression.prototype.get$x = function() { return this.x; }; 10255 BinaryExpression.prototype.get$x = function() { return this.x; };
10572 BinaryExpression.prototype.set$x = function(value) { return this.x = value; }; 10256 BinaryExpression.prototype.set$x = function(value) { return this.x = value; };
10573 BinaryExpression.prototype.get$y = function() { return this.y; }; 10257 BinaryExpression.prototype.get$y = function() { return this.y; };
10574 BinaryExpression.prototype.set$y = function(value) { return this.y = value; }; 10258 BinaryExpression.prototype.set$y = function(value) { return this.y = value; };
10575 BinaryExpression.prototype.visit = function(visitor) { 10259 BinaryExpression.prototype.visit = function(visitor) {
10576 return visitor.visitBinaryExpression$1(this); 10260 return visitor.visitBinaryExpression$1(this);
10577 } 10261 }
10578 BinaryExpression.prototype.visit$1 = BinaryExpression.prototype.visit; 10262 BinaryExpression.prototype.visit$1 = BinaryExpression.prototype.visit;
10579 // ********** Code for UnaryExpression ************** 10263 // ********** Code for UnaryExpression **************
10580 $inherits(UnaryExpression, Expression); 10264 $inherits(UnaryExpression, Expression);
10581 function UnaryExpression(op, self, span) { 10265 function UnaryExpression(op, self, span) {
10266 this.self = self;
10582 this.op = op; 10267 this.op = op;
10583 this.self = self;
10584 // Initializers done
10585 Expression.call(this, span); 10268 Expression.call(this, span);
10586 } 10269 }
10587 UnaryExpression.prototype.get$op = function() { return this.op; }; 10270 UnaryExpression.prototype.get$op = function() { return this.op; };
10588 UnaryExpression.prototype.set$op = function(value) { return this.op = value; }; 10271 UnaryExpression.prototype.set$op = function(value) { return this.op = value; };
10589 UnaryExpression.prototype.get$self = function() { return this.self; }; 10272 UnaryExpression.prototype.get$self = function() { return this.self; };
10590 UnaryExpression.prototype.set$self = function(value) { return this.self = value; }; 10273 UnaryExpression.prototype.set$self = function(value) { return this.self = value; };
10591 UnaryExpression.prototype.visit = function(visitor) { 10274 UnaryExpression.prototype.visit = function(visitor) {
10592 return visitor.visitUnaryExpression(this); 10275 return visitor.visitUnaryExpression(this);
10593 } 10276 }
10594 UnaryExpression.prototype.visit$1 = UnaryExpression.prototype.visit; 10277 UnaryExpression.prototype.visit$1 = UnaryExpression.prototype.visit;
10595 // ********** Code for PostfixExpression ************** 10278 // ********** Code for PostfixExpression **************
10596 $inherits(PostfixExpression, Expression); 10279 $inherits(PostfixExpression, Expression);
10597 function PostfixExpression(body, op, span) { 10280 function PostfixExpression(body, op, span) {
10598 this.body = body; 10281 this.body = body;
10599 this.op = op; 10282 this.op = op;
10600 // Initializers done
10601 Expression.call(this, span); 10283 Expression.call(this, span);
10602 } 10284 }
10603 PostfixExpression.prototype.get$body = function() { return this.body; }; 10285 PostfixExpression.prototype.get$body = function() { return this.body; };
10604 PostfixExpression.prototype.set$body = function(value) { return this.body = valu e; }; 10286 PostfixExpression.prototype.set$body = function(value) { return this.body = valu e; };
10605 PostfixExpression.prototype.get$op = function() { return this.op; }; 10287 PostfixExpression.prototype.get$op = function() { return this.op; };
10606 PostfixExpression.prototype.set$op = function(value) { return this.op = value; } ; 10288 PostfixExpression.prototype.set$op = function(value) { return this.op = value; } ;
10607 PostfixExpression.prototype.visit = function(visitor) { 10289 PostfixExpression.prototype.visit = function(visitor) {
10608 return visitor.visitPostfixExpression$1(this); 10290 return visitor.visitPostfixExpression$1(this);
10609 } 10291 }
10610 PostfixExpression.prototype.visit$1 = PostfixExpression.prototype.visit; 10292 PostfixExpression.prototype.visit$1 = PostfixExpression.prototype.visit;
10611 // ********** Code for NewExpression ************** 10293 // ********** Code for NewExpression **************
10612 $inherits(NewExpression, Expression); 10294 $inherits(NewExpression, Expression);
10613 function NewExpression(isConst, type, name, arguments, span) { 10295 function NewExpression(isConst, type, name, arguments, span) {
10296 this.arguments = arguments;
10297 this.name = name;
10298 this.type = type;
10614 this.isConst = isConst; 10299 this.isConst = isConst;
10615 this.type = type;
10616 this.name = name;
10617 this.arguments = arguments;
10618 // Initializers done
10619 Expression.call(this, span); 10300 Expression.call(this, span);
10620 } 10301 }
10621 NewExpression.prototype.get$isConst = function() { return this.isConst; }; 10302 NewExpression.prototype.get$isConst = function() { return this.isConst; };
10622 NewExpression.prototype.set$isConst = function(value) { return this.isConst = va lue; }; 10303 NewExpression.prototype.set$isConst = function(value) { return this.isConst = va lue; };
10623 NewExpression.prototype.get$type = function() { return this.type; }; 10304 NewExpression.prototype.get$type = function() { return this.type; };
10624 NewExpression.prototype.set$type = function(value) { return this.type = value; } ; 10305 NewExpression.prototype.set$type = function(value) { return this.type = value; } ;
10625 NewExpression.prototype.get$name = function() { return this.name; }; 10306 NewExpression.prototype.get$name = function() { return this.name; };
10626 NewExpression.prototype.set$name = function(value) { return this.name = value; } ; 10307 NewExpression.prototype.set$name = function(value) { return this.name = value; } ;
10627 NewExpression.prototype.get$arguments = function() { return this.arguments; };
10628 NewExpression.prototype.set$arguments = function(value) { return this.arguments = value; };
10629 NewExpression.prototype.visit = function(visitor) { 10308 NewExpression.prototype.visit = function(visitor) {
10630 return visitor.visitNewExpression(this); 10309 return visitor.visitNewExpression(this);
10631 } 10310 }
10632 NewExpression.prototype.visit$1 = NewExpression.prototype.visit; 10311 NewExpression.prototype.visit$1 = NewExpression.prototype.visit;
10633 // ********** Code for ListExpression ************** 10312 // ********** Code for ListExpression **************
10634 $inherits(ListExpression, Expression); 10313 $inherits(ListExpression, Expression);
10635 function ListExpression(isConst, itemType, values, span) { 10314 function ListExpression(isConst, itemType, values, span) {
10315 this.itemType = itemType;
10636 this.isConst = isConst; 10316 this.isConst = isConst;
10637 this.itemType = itemType;
10638 this.values = values; 10317 this.values = values;
10639 // Initializers done
10640 Expression.call(this, span); 10318 Expression.call(this, span);
10641 } 10319 }
10642 ListExpression.prototype.get$isConst = function() { return this.isConst; }; 10320 ListExpression.prototype.get$isConst = function() { return this.isConst; };
10643 ListExpression.prototype.set$isConst = function(value) { return this.isConst = v alue; }; 10321 ListExpression.prototype.set$isConst = function(value) { return this.isConst = v alue; };
10644 ListExpression.prototype.visit = function(visitor) { 10322 ListExpression.prototype.visit = function(visitor) {
10645 return visitor.visitListExpression(this); 10323 return visitor.visitListExpression(this);
10646 } 10324 }
10647 ListExpression.prototype.visit$1 = ListExpression.prototype.visit; 10325 ListExpression.prototype.visit$1 = ListExpression.prototype.visit;
10648 // ********** Code for MapExpression ************** 10326 // ********** Code for MapExpression **************
10649 $inherits(MapExpression, Expression); 10327 $inherits(MapExpression, Expression);
10650 function MapExpression(isConst, keyType, valueType, items, span) { 10328 function MapExpression(isConst, keyType, valueType, items, span) {
10651 this.isConst = isConst;
10652 this.keyType = keyType; 10329 this.keyType = keyType;
10653 this.valueType = valueType; 10330 this.valueType = valueType;
10654 this.items = items; 10331 this.items = items;
10655 // Initializers done 10332 this.isConst = isConst;
10656 Expression.call(this, span); 10333 Expression.call(this, span);
10657 } 10334 }
10658 MapExpression.prototype.get$isConst = function() { return this.isConst; }; 10335 MapExpression.prototype.get$isConst = function() { return this.isConst; };
10659 MapExpression.prototype.set$isConst = function(value) { return this.isConst = va lue; }; 10336 MapExpression.prototype.set$isConst = function(value) { return this.isConst = va lue; };
10660 MapExpression.prototype.visit = function(visitor) { 10337 MapExpression.prototype.visit = function(visitor) {
10661 return visitor.visitMapExpression(this); 10338 return visitor.visitMapExpression(this);
10662 } 10339 }
10663 MapExpression.prototype.visit$1 = MapExpression.prototype.visit; 10340 MapExpression.prototype.visit$1 = MapExpression.prototype.visit;
10664 // ********** Code for ConditionalExpression ************** 10341 // ********** Code for ConditionalExpression **************
10665 $inherits(ConditionalExpression, Expression); 10342 $inherits(ConditionalExpression, Expression);
10666 function ConditionalExpression(test, trueBranch, falseBranch, span) { 10343 function ConditionalExpression(test, trueBranch, falseBranch, span) {
10667 this.test = test; 10344 this.test = test;
10345 this.falseBranch = falseBranch;
10668 this.trueBranch = trueBranch; 10346 this.trueBranch = trueBranch;
10669 this.falseBranch = falseBranch;
10670 // Initializers done
10671 Expression.call(this, span); 10347 Expression.call(this, span);
10672 } 10348 }
10673 ConditionalExpression.prototype.visit = function(visitor) { 10349 ConditionalExpression.prototype.visit = function(visitor) {
10674 return visitor.visitConditionalExpression(this); 10350 return visitor.visitConditionalExpression(this);
10675 } 10351 }
10676 ConditionalExpression.prototype.visit$1 = ConditionalExpression.prototype.visit; 10352 ConditionalExpression.prototype.visit$1 = ConditionalExpression.prototype.visit;
10677 // ********** Code for IsExpression ************** 10353 // ********** Code for IsExpression **************
10678 $inherits(IsExpression, Expression); 10354 $inherits(IsExpression, Expression);
10679 function IsExpression(isTrue, x, type, span) { 10355 function IsExpression(isTrue, x, type, span) {
10680 this.isTrue = isTrue; 10356 this.isTrue = isTrue;
10681 this.x = x; 10357 this.x = x;
10682 this.type = type; 10358 this.type = type;
10683 // Initializers done
10684 Expression.call(this, span); 10359 Expression.call(this, span);
10685 } 10360 }
10686 IsExpression.prototype.get$x = function() { return this.x; }; 10361 IsExpression.prototype.get$x = function() { return this.x; };
10687 IsExpression.prototype.set$x = function(value) { return this.x = value; }; 10362 IsExpression.prototype.set$x = function(value) { return this.x = value; };
10688 IsExpression.prototype.get$type = function() { return this.type; }; 10363 IsExpression.prototype.get$type = function() { return this.type; };
10689 IsExpression.prototype.set$type = function(value) { return this.type = value; }; 10364 IsExpression.prototype.set$type = function(value) { return this.type = value; };
10690 IsExpression.prototype.visit = function(visitor) { 10365 IsExpression.prototype.visit = function(visitor) {
10691 return visitor.visitIsExpression(this); 10366 return visitor.visitIsExpression(this);
10692 } 10367 }
10693 IsExpression.prototype.visit$1 = IsExpression.prototype.visit; 10368 IsExpression.prototype.visit$1 = IsExpression.prototype.visit;
10694 // ********** Code for ParenExpression ************** 10369 // ********** Code for ParenExpression **************
10695 $inherits(ParenExpression, Expression); 10370 $inherits(ParenExpression, Expression);
10696 function ParenExpression(body, span) { 10371 function ParenExpression(body, span) {
10697 this.body = body; 10372 this.body = body;
10698 // Initializers done
10699 Expression.call(this, span); 10373 Expression.call(this, span);
10700 } 10374 }
10701 ParenExpression.prototype.get$body = function() { return this.body; }; 10375 ParenExpression.prototype.get$body = function() { return this.body; };
10702 ParenExpression.prototype.set$body = function(value) { return this.body = value; }; 10376 ParenExpression.prototype.set$body = function(value) { return this.body = value; };
10703 ParenExpression.prototype.visit = function(visitor) { 10377 ParenExpression.prototype.visit = function(visitor) {
10704 return visitor.visitParenExpression(this); 10378 return visitor.visitParenExpression(this);
10705 } 10379 }
10706 ParenExpression.prototype.visit$1 = ParenExpression.prototype.visit; 10380 ParenExpression.prototype.visit$1 = ParenExpression.prototype.visit;
10707 // ********** Code for AwaitExpression ************** 10381 // ********** Code for AwaitExpression **************
10708 $inherits(AwaitExpression, Expression); 10382 $inherits(AwaitExpression, Expression);
10709 function AwaitExpression(body, span) { 10383 function AwaitExpression(body, span) {
10710 this.body = body; 10384 this.body = body;
10711 // Initializers done
10712 Expression.call(this, span); 10385 Expression.call(this, span);
10713 } 10386 }
10714 AwaitExpression.prototype.get$body = function() { return this.body; }; 10387 AwaitExpression.prototype.get$body = function() { return this.body; };
10715 AwaitExpression.prototype.set$body = function(value) { return this.body = value; }; 10388 AwaitExpression.prototype.set$body = function(value) { return this.body = value; };
10716 AwaitExpression.prototype.visit = function(visitor) { 10389 AwaitExpression.prototype.visit = function(visitor) {
10717 return visitor.visitAwaitExpression(this); 10390 return visitor.visitAwaitExpression(this);
10718 } 10391 }
10719 AwaitExpression.prototype.visit$1 = AwaitExpression.prototype.visit; 10392 AwaitExpression.prototype.visit$1 = AwaitExpression.prototype.visit;
10720 // ********** Code for DotExpression ************** 10393 // ********** Code for DotExpression **************
10721 $inherits(DotExpression, Expression); 10394 $inherits(DotExpression, Expression);
10722 function DotExpression(self, name, span) { 10395 function DotExpression(self, name, span) {
10723 this.self = self; 10396 this.self = self;
10724 this.name = name; 10397 this.name = name;
10725 // Initializers done
10726 Expression.call(this, span); 10398 Expression.call(this, span);
10727 } 10399 }
10728 DotExpression.prototype.get$self = function() { return this.self; }; 10400 DotExpression.prototype.get$self = function() { return this.self; };
10729 DotExpression.prototype.set$self = function(value) { return this.self = value; } ; 10401 DotExpression.prototype.set$self = function(value) { return this.self = value; } ;
10730 DotExpression.prototype.get$name = function() { return this.name; }; 10402 DotExpression.prototype.get$name = function() { return this.name; };
10731 DotExpression.prototype.set$name = function(value) { return this.name = value; } ; 10403 DotExpression.prototype.set$name = function(value) { return this.name = value; } ;
10732 DotExpression.prototype.visit = function(visitor) { 10404 DotExpression.prototype.visit = function(visitor) {
10733 return visitor.visitDotExpression(this); 10405 return visitor.visitDotExpression(this);
10734 } 10406 }
10735 DotExpression.prototype.visit$1 = DotExpression.prototype.visit; 10407 DotExpression.prototype.visit$1 = DotExpression.prototype.visit;
10736 // ********** Code for VarExpression ************** 10408 // ********** Code for VarExpression **************
10737 $inherits(VarExpression, Expression); 10409 $inherits(VarExpression, Expression);
10738 function VarExpression(name, span) { 10410 function VarExpression(name, span) {
10739 this.name = name; 10411 this.name = name;
10740 // Initializers done
10741 Expression.call(this, span); 10412 Expression.call(this, span);
10742 } 10413 }
10743 VarExpression.prototype.get$name = function() { return this.name; }; 10414 VarExpression.prototype.get$name = function() { return this.name; };
10744 VarExpression.prototype.set$name = function(value) { return this.name = value; } ; 10415 VarExpression.prototype.set$name = function(value) { return this.name = value; } ;
10745 VarExpression.prototype.visit = function(visitor) { 10416 VarExpression.prototype.visit = function(visitor) {
10746 return visitor.visitVarExpression(this); 10417 return visitor.visitVarExpression(this);
10747 } 10418 }
10748 VarExpression.prototype.visit$1 = VarExpression.prototype.visit; 10419 VarExpression.prototype.visit$1 = VarExpression.prototype.visit;
10749 // ********** Code for ThisExpression ************** 10420 // ********** Code for ThisExpression **************
10750 $inherits(ThisExpression, Expression); 10421 $inherits(ThisExpression, Expression);
10751 function ThisExpression(span) { 10422 function ThisExpression(span) {
10752 // Initializers done
10753 Expression.call(this, span); 10423 Expression.call(this, span);
10754 } 10424 }
10755 ThisExpression.prototype.visit = function(visitor) { 10425 ThisExpression.prototype.visit = function(visitor) {
10756 return visitor.visitThisExpression(this); 10426 return visitor.visitThisExpression(this);
10757 } 10427 }
10758 ThisExpression.prototype.visit$1 = ThisExpression.prototype.visit; 10428 ThisExpression.prototype.visit$1 = ThisExpression.prototype.visit;
10759 // ********** Code for SuperExpression ************** 10429 // ********** Code for SuperExpression **************
10760 $inherits(SuperExpression, Expression); 10430 $inherits(SuperExpression, Expression);
10761 function SuperExpression(span) { 10431 function SuperExpression(span) {
10762 // Initializers done
10763 Expression.call(this, span); 10432 Expression.call(this, span);
10764 } 10433 }
10765 SuperExpression.prototype.visit = function(visitor) { 10434 SuperExpression.prototype.visit = function(visitor) {
10766 return visitor.visitSuperExpression(this); 10435 return visitor.visitSuperExpression(this);
10767 } 10436 }
10768 SuperExpression.prototype.visit$1 = SuperExpression.prototype.visit; 10437 SuperExpression.prototype.visit$1 = SuperExpression.prototype.visit;
10769 // ********** Code for LiteralExpression ************** 10438 // ********** Code for LiteralExpression **************
10770 $inherits(LiteralExpression, Expression); 10439 $inherits(LiteralExpression, Expression);
10771 function LiteralExpression(value, span) { 10440 function LiteralExpression(value, span) {
10772 this.value = value; 10441 this.value = value;
10773 // Initializers done
10774 Expression.call(this, span); 10442 Expression.call(this, span);
10775 } 10443 }
10776 LiteralExpression.prototype.get$value = function() { return this.value; }; 10444 LiteralExpression.prototype.get$value = function() { return this.value; };
10777 LiteralExpression.prototype.set$value = function(value) { return this.value = va lue; }; 10445 LiteralExpression.prototype.set$value = function(value) { return this.value = va lue; };
10778 LiteralExpression.prototype.visit = function(visitor) { 10446 LiteralExpression.prototype.visit = function(visitor) {
10779 return visitor.visitLiteralExpression(this); 10447 return visitor.visitLiteralExpression(this);
10780 } 10448 }
10781 LiteralExpression.prototype.visit$1 = LiteralExpression.prototype.visit; 10449 LiteralExpression.prototype.visit$1 = LiteralExpression.prototype.visit;
10782 // ********** Code for StringInterpExpression ************** 10450 // ********** Code for StringInterpExpression **************
10783 $inherits(StringInterpExpression, Expression); 10451 $inherits(StringInterpExpression, Expression);
10784 function StringInterpExpression(pieces, span) { 10452 function StringInterpExpression(pieces, span) {
10785 this.pieces = pieces; 10453 this.pieces = pieces;
10786 // Initializers done
10787 Expression.call(this, span); 10454 Expression.call(this, span);
10788 } 10455 }
10789 StringInterpExpression.prototype.visit = function(visitor) { 10456 StringInterpExpression.prototype.visit = function(visitor) {
10790 return visitor.visitStringInterpExpression(this); 10457 return visitor.visitStringInterpExpression(this);
10791 } 10458 }
10792 StringInterpExpression.prototype.visit$1 = StringInterpExpression.prototype.visi t; 10459 StringInterpExpression.prototype.visit$1 = StringInterpExpression.prototype.visi t;
10793 // ********** Code for NameTypeReference ************** 10460 // ********** Code for NameTypeReference **************
10794 $inherits(NameTypeReference, TypeReference); 10461 $inherits(NameTypeReference, TypeReference);
10795 function NameTypeReference(isFinal, name, names, span) { 10462 function NameTypeReference(isFinal, name, names, span) {
10796 this.isFinal = isFinal;
10797 this.name = name; 10463 this.name = name;
10798 this.names = names; 10464 this.names = names;
10799 // Initializers done 10465 this.isFinal = isFinal;
10800 TypeReference.call(this, span); 10466 TypeReference.call(this, span);
10801 } 10467 }
10802 NameTypeReference.prototype.get$isFinal = function() { return this.isFinal; }; 10468 NameTypeReference.prototype.get$isFinal = function() { return this.isFinal; };
10803 NameTypeReference.prototype.set$isFinal = function(value) { return this.isFinal = value; }; 10469 NameTypeReference.prototype.set$isFinal = function(value) { return this.isFinal = value; };
10804 NameTypeReference.prototype.get$name = function() { return this.name; }; 10470 NameTypeReference.prototype.get$name = function() { return this.name; };
10805 NameTypeReference.prototype.set$name = function(value) { return this.name = valu e; }; 10471 NameTypeReference.prototype.set$name = function(value) { return this.name = valu e; };
10806 NameTypeReference.prototype.get$names = function() { return this.names; }; 10472 NameTypeReference.prototype.get$names = function() { return this.names; };
10807 NameTypeReference.prototype.set$names = function(value) { return this.names = va lue; }; 10473 NameTypeReference.prototype.set$names = function(value) { return this.names = va lue; };
10808 NameTypeReference.prototype.visit = function(visitor) { 10474 NameTypeReference.prototype.visit = function(visitor) {
10809 return visitor.visitNameTypeReference(this); 10475 return visitor.visitNameTypeReference(this);
10810 } 10476 }
10811 NameTypeReference.prototype.visit$1 = NameTypeReference.prototype.visit; 10477 NameTypeReference.prototype.visit$1 = NameTypeReference.prototype.visit;
10812 // ********** Code for GenericTypeReference ************** 10478 // ********** Code for GenericTypeReference **************
10813 $inherits(GenericTypeReference, TypeReference); 10479 $inherits(GenericTypeReference, TypeReference);
10814 function GenericTypeReference(baseType, typeArguments, depth, span) { 10480 function GenericTypeReference(baseType, typeArguments, depth, span) {
10481 this.depth = depth;
10815 this.baseType = baseType; 10482 this.baseType = baseType;
10816 this.typeArguments = typeArguments; 10483 this.typeArguments = typeArguments;
10817 this.depth = depth;
10818 // Initializers done
10819 TypeReference.call(this, span); 10484 TypeReference.call(this, span);
10820 } 10485 }
10821 GenericTypeReference.prototype.get$baseType = function() { return this.baseType; }; 10486 GenericTypeReference.prototype.get$baseType = function() { return this.baseType; };
10822 GenericTypeReference.prototype.set$baseType = function(value) { return this.base Type = value; }; 10487 GenericTypeReference.prototype.set$baseType = function(value) { return this.base Type = value; };
10823 GenericTypeReference.prototype.get$typeArguments = function() { return this.type Arguments; }; 10488 GenericTypeReference.prototype.get$typeArguments = function() { return this.type Arguments; };
10824 GenericTypeReference.prototype.set$typeArguments = function(value) { return this .typeArguments = value; }; 10489 GenericTypeReference.prototype.set$typeArguments = function(value) { return this .typeArguments = value; };
10825 GenericTypeReference.prototype.get$depth = function() { return this.depth; }; 10490 GenericTypeReference.prototype.get$depth = function() { return this.depth; };
10826 GenericTypeReference.prototype.set$depth = function(value) { return this.depth = value; }; 10491 GenericTypeReference.prototype.set$depth = function(value) { return this.depth = value; };
10827 GenericTypeReference.prototype.visit = function(visitor) { 10492 GenericTypeReference.prototype.visit = function(visitor) {
10828 return visitor.visitGenericTypeReference(this); 10493 return visitor.visitGenericTypeReference(this);
10829 } 10494 }
10830 GenericTypeReference.prototype.visit$1 = GenericTypeReference.prototype.visit; 10495 GenericTypeReference.prototype.visit$1 = GenericTypeReference.prototype.visit;
10831 // ********** Code for FunctionTypeReference ************** 10496 // ********** Code for FunctionTypeReference **************
10832 $inherits(FunctionTypeReference, TypeReference); 10497 $inherits(FunctionTypeReference, TypeReference);
10833 function FunctionTypeReference(isFinal, func, span) { 10498 function FunctionTypeReference(isFinal, func, span) {
10499 this.func = func;
10834 this.isFinal = isFinal; 10500 this.isFinal = isFinal;
10835 this.func = func;
10836 // Initializers done
10837 TypeReference.call(this, span); 10501 TypeReference.call(this, span);
10838 } 10502 }
10839 FunctionTypeReference.prototype.get$isFinal = function() { return this.isFinal; }; 10503 FunctionTypeReference.prototype.get$isFinal = function() { return this.isFinal; };
10840 FunctionTypeReference.prototype.set$isFinal = function(value) { return this.isFi nal = value; }; 10504 FunctionTypeReference.prototype.set$isFinal = function(value) { return this.isFi nal = value; };
10841 FunctionTypeReference.prototype.get$func = function() { return this.func; }; 10505 FunctionTypeReference.prototype.get$func = function() { return this.func; };
10842 FunctionTypeReference.prototype.set$func = function(value) { return this.func = value; }; 10506 FunctionTypeReference.prototype.set$func = function(value) { return this.func = value; };
10843 FunctionTypeReference.prototype.visit = function(visitor) { 10507 FunctionTypeReference.prototype.visit = function(visitor) {
10844 return visitor.visitFunctionTypeReference(this); 10508 return visitor.visitFunctionTypeReference(this);
10845 } 10509 }
10846 FunctionTypeReference.prototype.visit$1 = FunctionTypeReference.prototype.visit; 10510 FunctionTypeReference.prototype.visit$1 = FunctionTypeReference.prototype.visit;
10847 // ********** Code for DefaultTypeReference ************** 10511 // ********** Code for DefaultTypeReference **************
10848 $inherits(DefaultTypeReference, TypeReference); 10512 $inherits(DefaultTypeReference, TypeReference);
10849 function DefaultTypeReference(oldFactory, baseType, typeParameters, span) { 10513 function DefaultTypeReference(oldFactory, baseType, typeParameters, span) {
10514 this.typeParameters = typeParameters;
10850 this.oldFactory = oldFactory; 10515 this.oldFactory = oldFactory;
10851 this.baseType = baseType; 10516 this.baseType = baseType;
10852 this.typeParameters = typeParameters;
10853 // Initializers done
10854 TypeReference.call(this, span); 10517 TypeReference.call(this, span);
10855 } 10518 }
10856 DefaultTypeReference.prototype.get$baseType = function() { return this.baseType; }; 10519 DefaultTypeReference.prototype.get$baseType = function() { return this.baseType; };
10857 DefaultTypeReference.prototype.set$baseType = function(value) { return this.base Type = value; }; 10520 DefaultTypeReference.prototype.set$baseType = function(value) { return this.base Type = value; };
10858 DefaultTypeReference.prototype.get$typeParameters = function() { return this.typ eParameters; }; 10521 DefaultTypeReference.prototype.get$typeParameters = function() { return this.typ eParameters; };
10859 DefaultTypeReference.prototype.set$typeParameters = function(value) { return thi s.typeParameters = value; }; 10522 DefaultTypeReference.prototype.set$typeParameters = function(value) { return thi s.typeParameters = value; };
10860 DefaultTypeReference.prototype.visit = function(visitor) { 10523 DefaultTypeReference.prototype.visit = function(visitor) {
10861 return visitor.visitDefaultTypeReference(this); 10524 return visitor.visitDefaultTypeReference(this);
10862 } 10525 }
10863 DefaultTypeReference.prototype.visit$1 = DefaultTypeReference.prototype.visit; 10526 DefaultTypeReference.prototype.visit$1 = DefaultTypeReference.prototype.visit;
10864 // ********** Code for ArgumentNode ************** 10527 // ********** Code for ArgumentNode **************
10865 $inherits(ArgumentNode, Node); 10528 $inherits(ArgumentNode, Node);
10866 function ArgumentNode(label, value, span) { 10529 function ArgumentNode(label, value, span) {
10867 this.label = label; 10530 this.label = label;
10868 this.value = value; 10531 this.value = value;
10869 // Initializers done
10870 Node.call(this, span); 10532 Node.call(this, span);
10871 } 10533 }
10872 ArgumentNode.prototype.get$label = function() { return this.label; }; 10534 ArgumentNode.prototype.get$label = function() { return this.label; };
10873 ArgumentNode.prototype.set$label = function(value) { return this.label = value; }; 10535 ArgumentNode.prototype.set$label = function(value) { return this.label = value; };
10874 ArgumentNode.prototype.get$value = function() { return this.value; }; 10536 ArgumentNode.prototype.get$value = function() { return this.value; };
10875 ArgumentNode.prototype.set$value = function(value) { return this.value = value; }; 10537 ArgumentNode.prototype.set$value = function(value) { return this.value = value; };
10876 ArgumentNode.prototype.visit = function(visitor) { 10538 ArgumentNode.prototype.visit = function(visitor) {
10877 return visitor.visitArgumentNode(this); 10539 return visitor.visitArgumentNode(this);
10878 } 10540 }
10879 ArgumentNode.prototype.visit$1 = ArgumentNode.prototype.visit; 10541 ArgumentNode.prototype.visit$1 = ArgumentNode.prototype.visit;
10880 // ********** Code for FormalNode ************** 10542 // ********** Code for FormalNode **************
10881 $inherits(FormalNode, Node); 10543 $inherits(FormalNode, Node);
10882 function FormalNode(isThis, isRest, type, name, value, span) { 10544 function FormalNode(isThis, isRest, type, name, value, span) {
10545 this.name = name;
10883 this.isThis = isThis; 10546 this.isThis = isThis;
10547 this.type = type;
10884 this.isRest = isRest; 10548 this.isRest = isRest;
10885 this.type = type;
10886 this.name = name;
10887 this.value = value; 10549 this.value = value;
10888 // Initializers done
10889 Node.call(this, span); 10550 Node.call(this, span);
10890 } 10551 }
10891 FormalNode.prototype.get$type = function() { return this.type; }; 10552 FormalNode.prototype.get$type = function() { return this.type; };
10892 FormalNode.prototype.set$type = function(value) { return this.type = value; }; 10553 FormalNode.prototype.set$type = function(value) { return this.type = value; };
10893 FormalNode.prototype.get$name = function() { return this.name; }; 10554 FormalNode.prototype.get$name = function() { return this.name; };
10894 FormalNode.prototype.set$name = function(value) { return this.name = value; }; 10555 FormalNode.prototype.set$name = function(value) { return this.name = value; };
10895 FormalNode.prototype.get$value = function() { return this.value; }; 10556 FormalNode.prototype.get$value = function() { return this.value; };
10896 FormalNode.prototype.set$value = function(value) { return this.value = value; }; 10557 FormalNode.prototype.set$value = function(value) { return this.value = value; };
10897 FormalNode.prototype.visit = function(visitor) { 10558 FormalNode.prototype.visit = function(visitor) {
10898 return visitor.visitFormalNode(this); 10559 return visitor.visitFormalNode(this);
10899 } 10560 }
10900 FormalNode.prototype.visit$1 = FormalNode.prototype.visit; 10561 FormalNode.prototype.visit$1 = FormalNode.prototype.visit;
10901 // ********** Code for CatchNode ************** 10562 // ********** Code for CatchNode **************
10902 $inherits(CatchNode, Node); 10563 $inherits(CatchNode, Node);
10903 function CatchNode(exception, trace, body, span) { 10564 function CatchNode(exception, trace, body, span) {
10565 this.body = body;
10904 this.exception = exception; 10566 this.exception = exception;
10905 this.trace = trace; 10567 this.trace = trace;
10906 this.body = body;
10907 // Initializers done
10908 Node.call(this, span); 10568 Node.call(this, span);
10909 } 10569 }
10910 CatchNode.prototype.get$exception = function() { return this.exception; }; 10570 CatchNode.prototype.get$exception = function() { return this.exception; };
10911 CatchNode.prototype.set$exception = function(value) { return this.exception = va lue; }; 10571 CatchNode.prototype.set$exception = function(value) { return this.exception = va lue; };
10912 CatchNode.prototype.get$trace = function() { return this.trace; }; 10572 CatchNode.prototype.get$trace = function() { return this.trace; };
10913 CatchNode.prototype.set$trace = function(value) { return this.trace = value; }; 10573 CatchNode.prototype.set$trace = function(value) { return this.trace = value; };
10914 CatchNode.prototype.get$body = function() { return this.body; }; 10574 CatchNode.prototype.get$body = function() { return this.body; };
10915 CatchNode.prototype.set$body = function(value) { return this.body = value; }; 10575 CatchNode.prototype.set$body = function(value) { return this.body = value; };
10916 CatchNode.prototype.visit = function(visitor) { 10576 CatchNode.prototype.visit = function(visitor) {
10917 return visitor.visitCatchNode(this); 10577 return visitor.visitCatchNode(this);
10918 } 10578 }
10919 CatchNode.prototype.visit$1 = CatchNode.prototype.visit; 10579 CatchNode.prototype.visit$1 = CatchNode.prototype.visit;
10920 // ********** Code for CaseNode ************** 10580 // ********** Code for CaseNode **************
10921 $inherits(CaseNode, Node); 10581 $inherits(CaseNode, Node);
10922 function CaseNode(label, cases, statements, span) { 10582 function CaseNode(label, cases, statements, span) {
10923 this.label = label; 10583 this.label = label;
10584 this.statements = statements;
10924 this.cases = cases; 10585 this.cases = cases;
10925 this.statements = statements;
10926 // Initializers done
10927 Node.call(this, span); 10586 Node.call(this, span);
10928 } 10587 }
10929 CaseNode.prototype.get$label = function() { return this.label; }; 10588 CaseNode.prototype.get$label = function() { return this.label; };
10930 CaseNode.prototype.set$label = function(value) { return this.label = value; }; 10589 CaseNode.prototype.set$label = function(value) { return this.label = value; };
10931 CaseNode.prototype.get$cases = function() { return this.cases; }; 10590 CaseNode.prototype.get$cases = function() { return this.cases; };
10932 CaseNode.prototype.set$cases = function(value) { return this.cases = value; }; 10591 CaseNode.prototype.set$cases = function(value) { return this.cases = value; };
10933 CaseNode.prototype.get$statements = function() { return this.statements; }; 10592 CaseNode.prototype.get$statements = function() { return this.statements; };
10934 CaseNode.prototype.set$statements = function(value) { return this.statements = v alue; }; 10593 CaseNode.prototype.set$statements = function(value) { return this.statements = v alue; };
10935 CaseNode.prototype.visit = function(visitor) { 10594 CaseNode.prototype.visit = function(visitor) {
10936 return visitor.visitCaseNode(this); 10595 return visitor.visitCaseNode(this);
10937 } 10596 }
10938 CaseNode.prototype.visit$1 = CaseNode.prototype.visit; 10597 CaseNode.prototype.visit$1 = CaseNode.prototype.visit;
10939 // ********** Code for TypeParameter ************** 10598 // ********** Code for TypeParameter **************
10940 $inherits(TypeParameter, Node); 10599 $inherits(TypeParameter, Node);
10941 function TypeParameter(name, extendsType, span) { 10600 function TypeParameter(name, extendsType, span) {
10601 this.extendsType = extendsType;
10942 this.name = name; 10602 this.name = name;
10943 this.extendsType = extendsType;
10944 // Initializers done
10945 Node.call(this, span); 10603 Node.call(this, span);
10946 } 10604 }
10947 TypeParameter.prototype.get$name = function() { return this.name; }; 10605 TypeParameter.prototype.get$name = function() { return this.name; };
10948 TypeParameter.prototype.set$name = function(value) { return this.name = value; } ; 10606 TypeParameter.prototype.set$name = function(value) { return this.name = value; } ;
10949 TypeParameter.prototype.get$extendsType = function() { return this.extendsType; }; 10607 TypeParameter.prototype.get$extendsType = function() { return this.extendsType; };
10950 TypeParameter.prototype.set$extendsType = function(value) { return this.extendsT ype = value; }; 10608 TypeParameter.prototype.set$extendsType = function(value) { return this.extendsT ype = value; };
10951 TypeParameter.prototype.visit = function(visitor) { 10609 TypeParameter.prototype.visit = function(visitor) {
10952 return visitor.visitTypeParameter(this); 10610 return visitor.visitTypeParameter(this);
10953 } 10611 }
10954 TypeParameter.prototype.visit$1 = TypeParameter.prototype.visit; 10612 TypeParameter.prototype.visit$1 = TypeParameter.prototype.visit;
10955 // ********** Code for Identifier ************** 10613 // ********** Code for Identifier **************
10956 $inherits(Identifier, Node); 10614 $inherits(Identifier, Node);
10957 function Identifier(name, span) { 10615 function Identifier(name, span) {
10958 this.name = name; 10616 this.name = name;
10959 // Initializers done
10960 Node.call(this, span); 10617 Node.call(this, span);
10961 } 10618 }
10962 Identifier.prototype.get$name = function() { return this.name; }; 10619 Identifier.prototype.get$name = function() { return this.name; };
10963 Identifier.prototype.set$name = function(value) { return this.name = value; }; 10620 Identifier.prototype.set$name = function(value) { return this.name = value; };
10964 Identifier.prototype.visit = function(visitor) { 10621 Identifier.prototype.visit = function(visitor) {
10965 return visitor.visitIdentifier(this); 10622 return visitor.visitIdentifier(this);
10966 } 10623 }
10967 Identifier.prototype.visit$1 = Identifier.prototype.visit; 10624 Identifier.prototype.visit$1 = Identifier.prototype.visit;
10968 // ********** Code for DeclaredIdentifier ************** 10625 // ********** Code for DeclaredIdentifier **************
10969 $inherits(DeclaredIdentifier, Expression); 10626 $inherits(DeclaredIdentifier, Expression);
10970 function DeclaredIdentifier(type, name, span) { 10627 function DeclaredIdentifier(type, name, span) {
10628 this.name = name;
10971 this.type = type; 10629 this.type = type;
10972 this.name = name;
10973 // Initializers done
10974 Expression.call(this, span); 10630 Expression.call(this, span);
10975 } 10631 }
10976 DeclaredIdentifier.prototype.get$type = function() { return this.type; }; 10632 DeclaredIdentifier.prototype.get$type = function() { return this.type; };
10977 DeclaredIdentifier.prototype.set$type = function(value) { return this.type = val ue; }; 10633 DeclaredIdentifier.prototype.set$type = function(value) { return this.type = val ue; };
10978 DeclaredIdentifier.prototype.get$name = function() { return this.name; }; 10634 DeclaredIdentifier.prototype.get$name = function() { return this.name; };
10979 DeclaredIdentifier.prototype.set$name = function(value) { return this.name = val ue; }; 10635 DeclaredIdentifier.prototype.set$name = function(value) { return this.name = val ue; };
10980 DeclaredIdentifier.prototype.visit = function(visitor) { 10636 DeclaredIdentifier.prototype.visit = function(visitor) {
10981 return visitor.visitDeclaredIdentifier(this); 10637 return visitor.visitDeclaredIdentifier(this);
10982 } 10638 }
10983 DeclaredIdentifier.prototype.visit$1 = DeclaredIdentifier.prototype.visit; 10639 DeclaredIdentifier.prototype.visit$1 = DeclaredIdentifier.prototype.visit;
10984 // ********** Code for Type ************** 10640 // ********** Code for Type **************
10985 $inherits(Type, Element); 10641 $inherits(Type, Element);
10986 function Type(name) { 10642 function Type(name) {
10987 this.isTested = false 10643 this.isTested = false;
10988 this.isChecked = false
10989 this.isWritten = false
10990 this._resolvedMembers = new HashMapImplementation(); 10644 this._resolvedMembers = new HashMapImplementation();
10645 this.isChecked = false;
10646 this.isWritten = false;
10991 this.varStubs = new HashMapImplementation(); 10647 this.varStubs = new HashMapImplementation();
10992 // Initializers done
10993 Element.call(this, name, null); 10648 Element.call(this, name, null);
10994 } 10649 }
10995 Type.prototype.get$typeCheckCode = function() { return this.typeCheckCode; }; 10650 Type.prototype.get$typeCheckCode = function() { return this.typeCheckCode; };
10996 Type.prototype.set$typeCheckCode = function(value) { return this.typeCheckCode = value; }; 10651 Type.prototype.set$typeCheckCode = function(value) { return this.typeCheckCode = value; };
10997 Type.prototype.get$varStubs = function() { return this.varStubs; }; 10652 Type.prototype.get$varStubs = function() { return this.varStubs; };
10998 Type.prototype.set$varStubs = function(value) { return this.varStubs = value; }; 10653 Type.prototype.set$varStubs = function(value) { return this.varStubs = value; };
10999 Type.prototype.markUsed = function() { 10654 Type.prototype.markUsed = function() {
11000 10655
11001 } 10656 }
11002 Type.prototype.get$typeMember = function() { 10657 Type.prototype.get$typeMember = function() {
(...skipping 25 matching lines...) Expand all
11028 } 10683 }
11029 Type.prototype.get$isFunction = function() { 10684 Type.prototype.get$isFunction = function() {
11030 return false; 10685 return false;
11031 } 10686 }
11032 Type.prototype.get$isList = function() { 10687 Type.prototype.get$isList = function() {
11033 return false; 10688 return false;
11034 } 10689 }
11035 Type.prototype.get$isNum = function() { 10690 Type.prototype.get$isNum = function() {
11036 return false; 10691 return false;
11037 } 10692 }
11038 Type.prototype.get$isInt = function() {
11039 return false;
11040 }
11041 Type.prototype.get$isDouble = function() {
11042 return false;
11043 }
11044 Type.prototype.get$isVoid = function() { 10693 Type.prototype.get$isVoid = function() {
11045 return false; 10694 return false;
11046 } 10695 }
11047 Type.prototype.get$isNullable = function() { 10696 Type.prototype.get$isNullable = function() {
11048 return true; 10697 return true;
11049 } 10698 }
11050 Type.prototype.get$isVarOrFunction = function() { 10699 Type.prototype.get$isVarOrFunction = function() {
11051 return this.get$isVar() || this.get$isFunction(); 10700 return this.get$isVar() || this.get$isFunction();
11052 } 10701 }
11053 Type.prototype.get$isVarOrObject = function() { 10702 Type.prototype.get$isVarOrObject = function() {
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
11331 Type.prototype.getOrMakeConcreteType$1 = Type.prototype.getOrMakeConcreteType; 10980 Type.prototype.getOrMakeConcreteType$1 = Type.prototype.getOrMakeConcreteType;
11332 Type.prototype.hashCode$0 = Type.prototype.hashCode; 10981 Type.prototype.hashCode$0 = Type.prototype.hashCode;
11333 Type.prototype.isAssignable$1 = Type.prototype.isAssignable; 10982 Type.prototype.isAssignable$1 = Type.prototype.isAssignable;
11334 Type.prototype.isSubtypeOf$1 = Type.prototype.isSubtypeOf; 10983 Type.prototype.isSubtypeOf$1 = Type.prototype.isSubtypeOf;
11335 Type.prototype.markUsed$0 = Type.prototype.markUsed; 10984 Type.prototype.markUsed$0 = Type.prototype.markUsed;
11336 Type.prototype.resolveTypeParams$1 = Type.prototype.resolveTypeParams; 10985 Type.prototype.resolveTypeParams$1 = Type.prototype.resolveTypeParams;
11337 // ********** Code for ParameterType ************** 10986 // ********** Code for ParameterType **************
11338 $inherits(ParameterType, Type); 10987 $inherits(ParameterType, Type);
11339 function ParameterType(name, typeParameter) { 10988 function ParameterType(name, typeParameter) {
11340 this.typeParameter = typeParameter; 10989 this.typeParameter = typeParameter;
11341 // Initializers done
11342 Type.call(this, name); 10990 Type.call(this, name);
11343 } 10991 }
11344 ParameterType.prototype.get$typeParameter = function() { return this.typeParamet er; }; 10992 ParameterType.prototype.get$typeParameter = function() { return this.typeParamet er; };
11345 ParameterType.prototype.set$typeParameter = function(value) { return this.typePa rameter = value; }; 10993 ParameterType.prototype.set$typeParameter = function(value) { return this.typePa rameter = value; };
11346 ParameterType.prototype.get$extendsType = function() { return this.extendsType; }; 10994 ParameterType.prototype.get$extendsType = function() { return this.extendsType; };
11347 ParameterType.prototype.set$extendsType = function(value) { return this.extendsT ype = value; }; 10995 ParameterType.prototype.set$extendsType = function(value) { return this.extendsT ype = value; };
11348 ParameterType.prototype.get$isClass = function() { 10996 ParameterType.prototype.get$isClass = function() {
11349 return false; 10997 return false;
11350 } 10998 }
11351 ParameterType.prototype.get$library = function() { 10999 ParameterType.prototype.get$library = function() {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
11392 ParameterType.prototype.addDirectSubtype$1 = ParameterType.prototype.addDirectSu btype; 11040 ParameterType.prototype.addDirectSubtype$1 = ParameterType.prototype.addDirectSu btype;
11393 ParameterType.prototype.getConstructor$1 = ParameterType.prototype.getConstructo r; 11041 ParameterType.prototype.getConstructor$1 = ParameterType.prototype.getConstructo r;
11394 ParameterType.prototype.getOrMakeConcreteType$1 = ParameterType.prototype.getOrM akeConcreteType; 11042 ParameterType.prototype.getOrMakeConcreteType$1 = ParameterType.prototype.getOrM akeConcreteType;
11395 ParameterType.prototype.isSubtypeOf$1 = ParameterType.prototype.isSubtypeOf; 11043 ParameterType.prototype.isSubtypeOf$1 = ParameterType.prototype.isSubtypeOf;
11396 ParameterType.prototype.resolve$0 = ParameterType.prototype.resolve; 11044 ParameterType.prototype.resolve$0 = ParameterType.prototype.resolve;
11397 ParameterType.prototype.resolveTypeParams$1 = ParameterType.prototype.resolveTyp eParams; 11045 ParameterType.prototype.resolveTypeParams$1 = ParameterType.prototype.resolveTyp eParams;
11398 // ********** Code for NonNullableType ************** 11046 // ********** Code for NonNullableType **************
11399 $inherits(NonNullableType, Type); 11047 $inherits(NonNullableType, Type);
11400 function NonNullableType(type) { 11048 function NonNullableType(type) {
11401 this.type = type; 11049 this.type = type;
11402 // Initializers done
11403 Type.call(this, type.name); 11050 Type.call(this, type.name);
11404 } 11051 }
11405 NonNullableType.prototype.get$type = function() { return this.type; }; 11052 NonNullableType.prototype.get$type = function() { return this.type; };
11406 NonNullableType.prototype.get$isNullable = function() { 11053 NonNullableType.prototype.get$isNullable = function() {
11407 return false; 11054 return false;
11408 } 11055 }
11409 NonNullableType.prototype.get$isBool = function() { 11056 NonNullableType.prototype.get$isBool = function() {
11410 return this.type.get$isBool(); 11057 return this.type.get$isBool();
11411 } 11058 }
11412 NonNullableType.prototype.get$isUsed = function() { 11059 NonNullableType.prototype.get$isUsed = function() {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
11503 NonNullableType.prototype.getConstructor$1 = NonNullableType.prototype.getConstr uctor; 11150 NonNullableType.prototype.getConstructor$1 = NonNullableType.prototype.getConstr uctor;
11504 NonNullableType.prototype.getFactory$2 = NonNullableType.prototype.getFactory; 11151 NonNullableType.prototype.getFactory$2 = NonNullableType.prototype.getFactory;
11505 NonNullableType.prototype.getMember$1 = NonNullableType.prototype.getMember; 11152 NonNullableType.prototype.getMember$1 = NonNullableType.prototype.getMember;
11506 NonNullableType.prototype.getOrMakeConcreteType$1 = NonNullableType.prototype.ge tOrMakeConcreteType; 11153 NonNullableType.prototype.getOrMakeConcreteType$1 = NonNullableType.prototype.ge tOrMakeConcreteType;
11507 NonNullableType.prototype.isSubtypeOf$1 = NonNullableType.prototype.isSubtypeOf; 11154 NonNullableType.prototype.isSubtypeOf$1 = NonNullableType.prototype.isSubtypeOf;
11508 NonNullableType.prototype.markUsed$0 = NonNullableType.prototype.markUsed; 11155 NonNullableType.prototype.markUsed$0 = NonNullableType.prototype.markUsed;
11509 NonNullableType.prototype.resolveTypeParams$1 = NonNullableType.prototype.resolv eTypeParams; 11156 NonNullableType.prototype.resolveTypeParams$1 = NonNullableType.prototype.resolv eTypeParams;
11510 // ********** Code for ConcreteType ************** 11157 // ********** Code for ConcreteType **************
11511 $inherits(ConcreteType, Type); 11158 $inherits(ConcreteType, Type);
11512 function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) { 11159 function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) {
11513 this.isUsed = false 11160 this.isUsed = false;
11161 this.constructors = new HashMapImplementation();
11514 this.genericType = genericType; 11162 this.genericType = genericType;
11163 this.factories = new FactoryMap();
11164 this.members = new HashMapImplementation();
11515 this.typeArguments = typeArguments; 11165 this.typeArguments = typeArguments;
11516 this.typeArgsInOrder = typeArgsInOrder; 11166 this.typeArgsInOrder = typeArgsInOrder;
11517 this.constructors = new HashMapImplementation();
11518 this.members = new HashMapImplementation();
11519 this.factories = new FactoryMap();
11520 // Initializers done
11521 Type.call(this, name); 11167 Type.call(this, name);
11522 } 11168 }
11523 ConcreteType.prototype.get$genericType = function() { return this.genericType; } ; 11169 ConcreteType.prototype.get$genericType = function() { return this.genericType; } ;
11524 ConcreteType.prototype.get$typeArguments = function() { return this.typeArgument s; }; 11170 ConcreteType.prototype.get$typeArguments = function() { return this.typeArgument s; };
11525 ConcreteType.prototype.set$typeArguments = function(value) { return this.typeArg uments = value; }; 11171 ConcreteType.prototype.set$typeArguments = function(value) { return this.typeArg uments = value; };
11526 ConcreteType.prototype.get$_parent = function() { return this._parent; }; 11172 ConcreteType.prototype.get$_parent = function() { return this._parent; };
11527 ConcreteType.prototype.set$_parent = function(value) { return this._parent = val ue; }; 11173 ConcreteType.prototype.set$_parent = function(value) { return this._parent = val ue; };
11528 ConcreteType.prototype.get$typeArgsInOrder = function() { return this.typeArgsIn Order; }; 11174 ConcreteType.prototype.get$typeArgsInOrder = function() { return this.typeArgsIn Order; };
11529 ConcreteType.prototype.set$typeArgsInOrder = function(value) { return this.typeA rgsInOrder = value; }; 11175 ConcreteType.prototype.set$typeArgsInOrder = function(value) { return this.typeA rgsInOrder = value; };
11530 ConcreteType.prototype.get$isList = function() { 11176 ConcreteType.prototype.get$isList = function() {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
11672 ConcreteType.prototype.addDirectSubtype$1 = ConcreteType.prototype.addDirectSubt ype; 11318 ConcreteType.prototype.addDirectSubtype$1 = ConcreteType.prototype.addDirectSubt ype;
11673 ConcreteType.prototype.getConstructor$1 = ConcreteType.prototype.getConstructor; 11319 ConcreteType.prototype.getConstructor$1 = ConcreteType.prototype.getConstructor;
11674 ConcreteType.prototype.getFactory$2 = ConcreteType.prototype.getFactory; 11320 ConcreteType.prototype.getFactory$2 = ConcreteType.prototype.getFactory;
11675 ConcreteType.prototype.getMember$1 = ConcreteType.prototype.getMember; 11321 ConcreteType.prototype.getMember$1 = ConcreteType.prototype.getMember;
11676 ConcreteType.prototype.getOrMakeConcreteType$1 = ConcreteType.prototype.getOrMak eConcreteType; 11322 ConcreteType.prototype.getOrMakeConcreteType$1 = ConcreteType.prototype.getOrMak eConcreteType;
11677 ConcreteType.prototype.markUsed$0 = ConcreteType.prototype.markUsed; 11323 ConcreteType.prototype.markUsed$0 = ConcreteType.prototype.markUsed;
11678 ConcreteType.prototype.resolveTypeParams$1 = ConcreteType.prototype.resolveTypeP arams; 11324 ConcreteType.prototype.resolveTypeParams$1 = ConcreteType.prototype.resolveTypeP arams;
11679 // ********** Code for DefinedType ************** 11325 // ********** Code for DefinedType **************
11680 $inherits(DefinedType, Type); 11326 $inherits(DefinedType, Type);
11681 function DefinedType(name, library, definition, isClass) { 11327 function DefinedType(name, library, definition, isClass) {
11682 this.isUsed = false 11328 this.isUsed = false;
11683 this.isNative = false 11329 this.directSubtypes = new HashSetImplementation();
11330 this.isNative = false;
11684 this.library = library; 11331 this.library = library;
11685 this.isClass = isClass; 11332 this.isClass = isClass;
11686 this.directSubtypes = new HashSetImplementation();
11687 this.constructors = new HashMapImplementation(); 11333 this.constructors = new HashMapImplementation();
11334 this.factories = new FactoryMap();
11688 this.members = new HashMapImplementation(); 11335 this.members = new HashMapImplementation();
11689 this.factories = new FactoryMap();
11690 // Initializers done
11691 Type.call(this, name); 11336 Type.call(this, name);
11692 this.setDefinition(definition); 11337 this.setDefinition(definition);
11693 } 11338 }
11694 DefinedType.prototype.get$definition = function() { return this.definition; }; 11339 DefinedType.prototype.get$definition = function() { return this.definition; };
11695 DefinedType.prototype.set$definition = function(value) { return this.definition = value; }; 11340 DefinedType.prototype.set$definition = function(value) { return this.definition = value; };
11696 DefinedType.prototype.get$library = function() { return this.library; }; 11341 DefinedType.prototype.get$library = function() { return this.library; };
11697 DefinedType.prototype.get$isClass = function() { return this.isClass; }; 11342 DefinedType.prototype.get$isClass = function() { return this.isClass; };
11698 DefinedType.prototype.get$_parent = function() { return this._parent; }; 11343 DefinedType.prototype.get$_parent = function() { return this._parent; };
11699 DefinedType.prototype.set$_parent = function(value) { return this._parent = valu e; }; 11344 DefinedType.prototype.set$_parent = function(value) { return this._parent = valu e; };
11700 DefinedType.prototype.get$parent = function() { 11345 DefinedType.prototype.get$parent = function() {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
11775 if (!this.library.get$isCore()) return null; 11420 if (!this.library.get$isCore()) return null;
11776 if (this.get$isBool()) return "boolean"; 11421 if (this.get$isBool()) return "boolean";
11777 else if (this.get$isNum()) return "number"; 11422 else if (this.get$isNum()) return "number";
11778 else if (this.get$isString()) return "string"; 11423 else if (this.get$isString()) return "string";
11779 else if (this.get$isFunction()) return "function"; 11424 else if (this.get$isFunction()) return "function";
11780 else return null; 11425 else return null;
11781 } 11426 }
11782 DefinedType.prototype.get$isNum = function() { 11427 DefinedType.prototype.get$isNum = function() {
11783 return this.library != null && this.library.get$isCore() && (this.name == "num " || this.name == "int" || this.name == "double"); 11428 return this.library != null && this.library.get$isCore() && (this.name == "num " || this.name == "int" || this.name == "double");
11784 } 11429 }
11785 DefinedType.prototype.get$isInt = function() {
11786 return $eq(this, $globals.world.intType);
11787 }
11788 DefinedType.prototype.get$isDouble = function() {
11789 return $eq(this, $globals.world.doubleType);
11790 }
11791 DefinedType.prototype.getCallMethod = function() { 11430 DefinedType.prototype.getCallMethod = function() {
11792 return this.members.$index(":call"); 11431 return this.members.$index(":call");
11793 } 11432 }
11794 DefinedType.prototype.getAllMembers = function() { 11433 DefinedType.prototype.getAllMembers = function() {
11795 return HashMapImplementation.HashMapImplementation$from$factory(this.members); 11434 return HashMapImplementation.HashMapImplementation$from$factory(this.members);
11796 } 11435 }
11797 DefinedType.prototype.markUsed = function() { 11436 DefinedType.prototype.markUsed = function() {
11798 if (this.isUsed) return; 11437 if (this.isUsed) return;
11799 this.isUsed = true; 11438 this.isUsed = true;
11800 this._checkExtends(); 11439 this._checkExtends();
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
12063 return this.defaultType.getFactory(this, constructorName); 11702 return this.defaultType.getFactory(this, constructorName);
12064 } 11703 }
12065 return ret; 11704 return ret;
12066 } 11705 }
12067 ret = this.factories.getFactory(this.name, constructorName); 11706 ret = this.factories.getFactory(this.name, constructorName);
12068 if (ret != null) return ret; 11707 if (ret != null) return ret;
12069 return this._tryCreateDefaultConstructor(constructorName); 11708 return this._tryCreateDefaultConstructor(constructorName);
12070 } 11709 }
12071 DefinedType.prototype._checkDefaultTypeParams = function() { 11710 DefinedType.prototype._checkDefaultTypeParams = function() {
12072 function toList(list) { 11711 function toList(list) {
12073 return (list != null ? list : const$127); 11712 return (list != null ? list : const$0008);
12074 } 11713 }
12075 var typeDef = this.definition; 11714 var typeDef = this.definition;
12076 if (typeDef.defaultType.oldFactory) { 11715 if (typeDef.defaultType.oldFactory) {
12077 return; 11716 return;
12078 } 11717 }
12079 var interfaceParams = toList(this.typeParameters); 11718 var interfaceParams = toList(this.typeParameters);
12080 var defaultParams = toList(typeDef.defaultType.typeParameters); 11719 var defaultParams = toList(typeDef.defaultType.typeParameters);
12081 var classParams = toList(this.defaultType.typeParameters); 11720 var classParams = toList(this.defaultType.typeParameters);
12082 if ($ne(interfaceParams.get$length(), defaultParams.get$length()) || $ne(defau ltParams.get$length(), classParams.get$length())) { 11721 if ($ne(interfaceParams.get$length(), defaultParams.get$length()) || $ne(defau ltParams.get$length(), classParams.get$length())) {
12083 $globals.world.error("\"default\" must have the same number of type paramete rs as the class and interface do", this.get$span(), typeDef.defaultType.span, th is.defaultType.get$span()); 11722 $globals.world.error("\"default\" must have the same number of type paramete rs as the class and interface do", this.get$span(), typeDef.defaultType.span, th is.defaultType.get$span());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
12173 DefinedType.prototype.getConstructor$1 = DefinedType.prototype.getConstructor; 11812 DefinedType.prototype.getConstructor$1 = DefinedType.prototype.getConstructor;
12174 DefinedType.prototype.getFactory$2 = DefinedType.prototype.getFactory; 11813 DefinedType.prototype.getFactory$2 = DefinedType.prototype.getFactory;
12175 DefinedType.prototype.getMember$1 = DefinedType.prototype.getMember; 11814 DefinedType.prototype.getMember$1 = DefinedType.prototype.getMember;
12176 DefinedType.prototype.getOrMakeConcreteType$1 = DefinedType.prototype.getOrMakeC oncreteType; 11815 DefinedType.prototype.getOrMakeConcreteType$1 = DefinedType.prototype.getOrMakeC oncreteType;
12177 DefinedType.prototype.markUsed$0 = DefinedType.prototype.markUsed; 11816 DefinedType.prototype.markUsed$0 = DefinedType.prototype.markUsed;
12178 DefinedType.prototype.resolve$0 = DefinedType.prototype.resolve; 11817 DefinedType.prototype.resolve$0 = DefinedType.prototype.resolve;
12179 DefinedType.prototype.resolveTypeParams$1 = DefinedType.prototype.resolveTypePar ams; 11818 DefinedType.prototype.resolveTypeParams$1 = DefinedType.prototype.resolveTypePar ams;
12180 DefinedType.prototype.setDefinition$1 = DefinedType.prototype.setDefinition; 11819 DefinedType.prototype.setDefinition$1 = DefinedType.prototype.setDefinition;
12181 // ********** Code for NativeType ************** 11820 // ********** Code for NativeType **************
12182 function NativeType(name) { 11821 function NativeType(name) {
12183 this.isConstructorHidden = false 11822 this.isConstructorHidden = false;
12184 this.isJsGlobalObject = false 11823 this.isSingleton = false;
12185 this.isSingleton = false 11824 this.isJsGlobalObject = false;
12186 this.name = name; 11825 this.name = name;
12187 // Initializers done
12188 while (true) { 11826 while (true) {
12189 if (this.name.startsWith("@")) { 11827 if (this.name.startsWith("@")) {
12190 this.name = this.name.substring((1)); 11828 this.name = this.name.substring((1));
12191 this.isJsGlobalObject = true; 11829 this.isJsGlobalObject = true;
12192 } 11830 }
12193 else if (this.name.startsWith("*")) { 11831 else if (this.name.startsWith("*")) {
12194 this.name = this.name.substring((1)); 11832 this.name = this.name.substring((1));
12195 this.isConstructorHidden = true; 11833 this.isConstructorHidden = true;
12196 } 11834 }
12197 else { 11835 else {
12198 break; 11836 break;
12199 } 11837 }
12200 } 11838 }
12201 if (this.name.startsWith("=")) { 11839 if (this.name.startsWith("=")) {
12202 this.name = this.name.substring((1)); 11840 this.name = this.name.substring((1));
12203 this.isSingleton = true; 11841 this.isSingleton = true;
12204 } 11842 }
12205 } 11843 }
12206 NativeType.prototype.get$name = function() { return this.name; }; 11844 NativeType.prototype.get$name = function() { return this.name; };
12207 NativeType.prototype.set$name = function(value) { return this.name = value; }; 11845 NativeType.prototype.set$name = function(value) { return this.name = value; };
12208 // ********** Code for FixedCollection ************** 11846 // ********** Code for FixedCollection **************
12209 function FixedCollection(value, length) { 11847 function FixedCollection(value, length) {
11848 this.length = length;
12210 this.value = value; 11849 this.value = value;
12211 this.length = length;
12212 // Initializers done
12213 } 11850 }
12214 FixedCollection.prototype.get$value = function() { return this.value; }; 11851 FixedCollection.prototype.get$value = function() { return this.value; };
12215 FixedCollection.prototype.get$length = function() { return this.length; }; 11852 FixedCollection.prototype.get$length = function() { return this.length; };
12216 FixedCollection.prototype.iterator = function() { 11853 FixedCollection.prototype.iterator = function() {
12217 return new FixedIterator_E(this.value, this.length); 11854 return new FixedIterator_E(this.value, this.length);
12218 } 11855 }
12219 FixedCollection.prototype.forEach = function(f) { 11856 FixedCollection.prototype.forEach = function(f) {
12220 Collections.forEach(this, f); 11857 Collections.forEach(this, f);
12221 } 11858 }
12222 FixedCollection.prototype.filter = function(f) { 11859 FixedCollection.prototype.filter = function(f) {
(...skipping 20 matching lines...) Expand all
12243 FixedCollection.prototype.isEmpty$0 = FixedCollection.prototype.isEmpty; 11880 FixedCollection.prototype.isEmpty$0 = FixedCollection.prototype.isEmpty;
12244 FixedCollection.prototype.iterator$0 = FixedCollection.prototype.iterator; 11881 FixedCollection.prototype.iterator$0 = FixedCollection.prototype.iterator;
12245 FixedCollection.prototype.some$1 = function($0) { 11882 FixedCollection.prototype.some$1 = function($0) {
12246 return this.some(to$call$1($0)); 11883 return this.some(to$call$1($0));
12247 }; 11884 };
12248 // ********** Code for FixedCollection_Type ************** 11885 // ********** Code for FixedCollection_Type **************
12249 $inherits(FixedCollection_Type, FixedCollection); 11886 $inherits(FixedCollection_Type, FixedCollection);
12250 function FixedCollection_Type(value, length) { 11887 function FixedCollection_Type(value, length) {
12251 this.value = value; 11888 this.value = value;
12252 this.length = length; 11889 this.length = length;
12253 // Initializers done
12254 } 11890 }
12255 // ********** Code for FixedIterator ************** 11891 // ********** Code for FixedIterator **************
12256 function FixedIterator(value, length) { 11892 function FixedIterator(value, length) {
12257 this._index = (0) 11893 this.length = length;
11894 this._index = (0);
12258 this.value = value; 11895 this.value = value;
12259 this.length = length;
12260 // Initializers done
12261 } 11896 }
12262 FixedIterator.prototype.get$value = function() { return this.value; }; 11897 FixedIterator.prototype.get$value = function() { return this.value; };
12263 FixedIterator.prototype.get$length = function() { return this.length; }; 11898 FixedIterator.prototype.get$length = function() { return this.length; };
12264 FixedIterator.prototype.hasNext = function() { 11899 FixedIterator.prototype.hasNext = function() {
12265 return this._index < this.length; 11900 return this._index < this.length;
12266 } 11901 }
12267 FixedIterator.prototype.next = function() { 11902 FixedIterator.prototype.next = function() {
12268 this._index++; 11903 this._index++;
12269 return this.value; 11904 return this.value;
12270 } 11905 }
12271 FixedIterator.prototype.hasNext$0 = FixedIterator.prototype.hasNext; 11906 FixedIterator.prototype.hasNext$0 = FixedIterator.prototype.hasNext;
12272 FixedIterator.prototype.next$0 = FixedIterator.prototype.next; 11907 FixedIterator.prototype.next$0 = FixedIterator.prototype.next;
12273 // ********** Code for FixedIterator_E ************** 11908 // ********** Code for FixedIterator_E **************
12274 $inherits(FixedIterator_E, FixedIterator); 11909 $inherits(FixedIterator_E, FixedIterator);
12275 function FixedIterator_E(value, length) { 11910 function FixedIterator_E(value, length) {
12276 this._index = (0) 11911 this._index = (0);
12277 this.value = value; 11912 this.value = value;
12278 this.length = length; 11913 this.length = length;
12279 // Initializers done
12280 } 11914 }
12281 // ********** Code for Value ************** 11915 // ********** Code for Value **************
12282 function Value(_type, code, span, needsTemp) { 11916 function Value(_type, code, span, needsTemp) {
12283 this.isSuper = false 11917 this.isFinal = false;
12284 this.isType = false 11918 this.isType = false;
12285 this.isFinal = false 11919 this.allowDynamic = true;
12286 this.allowDynamic = true 11920 this.isSuper = false;
12287 this._type = _type; 11921 this._type = _type;
12288 this.code = code;
12289 this.span = span; 11922 this.span = span;
12290 this.needsTemp = needsTemp; 11923 this.needsTemp = needsTemp;
12291 // Initializers done 11924 this.code = code;
12292 if (this._type == null) $globals.world.internalError("type passed as null", th is.span); 11925 if (this._type == null) $globals.world.internalError("type passed as null", th is.span);
12293 } 11926 }
12294 Value.type$ctor = function(_type, span) { 11927 Value.type$ctor = function(_type, span) {
12295 this.isSuper = false 11928 this.isFinal = false;
12296 this.isType = false 11929 this.isType = true;
12297 this.isFinal = false 11930 this.allowDynamic = true;
12298 this.allowDynamic = true 11931 this.isSuper = false;
12299 this._type = _type; 11932 this._type = _type;
12300 this.span = span; 11933 this.span = span;
11934 this.needsTemp = false;
12301 this.code = null; 11935 this.code = null;
12302 this.needsTemp = false;
12303 this.isType = true;
12304 // Initializers done
12305 if (this._type == null) $globals.world.internalError("type passed as null", th is.span); 11936 if (this._type == null) $globals.world.internalError("type passed as null", th is.span);
12306 } 11937 }
12307 Value.type$ctor.prototype = Value.prototype; 11938 Value.type$ctor.prototype = Value.prototype;
12308 Value.prototype.get$code = function() { return this.code; }; 11939 Value.prototype.get$code = function() { return this.code; };
12309 Value.prototype.set$code = function(value) { return this.code = value; }; 11940 Value.prototype.set$code = function(value) { return this.code = value; };
12310 Value.prototype.get$span = function() { return this.span; }; 11941 Value.prototype.get$span = function() { return this.span; };
12311 Value.prototype.set$span = function(value) { return this.span = value; }; 11942 Value.prototype.set$span = function(value) { return this.span = value; };
12312 Value.prototype.get$isSuper = function() { return this.isSuper; }; 11943 Value.prototype.get$isSuper = function() { return this.isSuper; };
12313 Value.prototype.set$isSuper = function(value) { return this.isSuper = value; }; 11944 Value.prototype.set$isSuper = function(value) { return this.isSuper = value; };
12314 Value.prototype.get$isType = function() { return this.isType; }; 11945 Value.prototype.get$isType = function() { return this.isType; };
(...skipping 11 matching lines...) Expand all
12326 if (!$globals.options.forceDynamic || !this.allowDynamic || this.isType || thi s.isSuper || this.get$isConst()) { 11957 if (!$globals.options.forceDynamic || !this.allowDynamic || this.isType || thi s.isSuper || this.get$isConst()) {
12327 return this._type; 11958 return this._type;
12328 } 11959 }
12329 else { 11960 else {
12330 return $globals.world.varType; 11961 return $globals.world.varType;
12331 } 11962 }
12332 } 11963 }
12333 Value.prototype.get$isConst = function() { 11964 Value.prototype.get$isConst = function() {
12334 return false; 11965 return false;
12335 } 11966 }
12336 Value.prototype.get$constValue = function() { 11967 Value.prototype.validateInitialized = function(span) {
12337 return null; 11968
12338 } 11969 }
12339 Value.prototype.get_ = function(context, name, node) { 11970 Value.prototype.get_ = function(context, name, node) {
12340 var member = this._resolveMember(context, name, node, false); 11971 var member = this._resolveMember(context, name, node, false);
12341 if (member != null) { 11972 if (member != null) {
12342 return member._get$3(context, node, this); 11973 return member._get$3(context, node, this);
12343 } 11974 }
12344 else { 11975 else {
12345 return this.invokeNoSuchMethod(context, ("get:" + name), node); 11976 return this.invokeNoSuchMethod(context, ("get:" + name), node);
12346 } 11977 }
12347 } 11978 }
12348 Value.prototype.set_ = function(context, name, node, value, isDynamic) { 11979 Value.prototype.set_ = function(context, name, node, value, isDynamic) {
12349 var member = this._resolveMember(context, name, node, isDynamic); 11980 var member = this._resolveMember(context, name, node, isDynamic);
12350 if (member != null) { 11981 if (member != null) {
12351 return member._set$5(context, node, this, value, isDynamic); 11982 return member._set$5(context, node, this, value, isDynamic);
12352 } 11983 }
12353 else { 11984 else {
12354 return this.invokeNoSuchMethod(context, ("set:" + name), node, new Arguments (null, [value])); 11985 return this.invokeNoSuchMethod(context, ("set:" + name), node, new Arguments (null, [value]));
12355 } 11986 }
12356 } 11987 }
11988 Value.prototype.unop = function(kind, context, node) {
11989 switch (kind) {
11990 case (19):
11991
11992 var newVal = this.convertTo(context, $globals.world.nonNullBool, false);
11993 return new Value(newVal.get$type(), ("!" + newVal.get$code()), node.get$sp an(), true);
11994
11995 case (42):
11996
11997 $globals.world.error("no unary add operator in dart", node.get$span());
11998 break;
11999
12000 case (43):
12001
12002 return this.invoke(context, ":negate", node, Arguments.get$EMPTY(), false) ;
12003
12004 case (18):
12005
12006 return this.invoke(context, ":bit_not", node, Arguments.get$EMPTY(), false );
12007
12008 }
12009 $globals.world.internalError(("unimplemented: " + node.get$op()), node.get$spa n());
12010 }
12357 Value.prototype.binop = function(kind, other, context, node) { 12011 Value.prototype.binop = function(kind, other, context, node) {
12358 switch (kind) { 12012 switch (kind) {
12359 case (35): 12013 case (35):
12360 case (34): 12014 case (34):
12361 12015
12362 var code = ("" + this.get$code() + " " + node.get$op() + " " + other.get$c ode()); 12016 var code = ("" + this.get$code() + " " + node.get$op() + " " + other.get$c ode());
12363 return new Value($globals.world.nonNullBool, code, node.get$span(), true); 12017 return new Value($globals.world.nonNullBool, code, node.get$span(), true);
12364 12018
12365 case (50): 12019 case (50):
12366 12020
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
12649 }; 12303 };
12650 Value.prototype.invoke$4 = function($0, $1, $2, $3) { 12304 Value.prototype.invoke$4 = function($0, $1, $2, $3) {
12651 return this.invoke($0, $1, $2, $3, false); 12305 return this.invoke($0, $1, $2, $3, false);
12652 }; 12306 };
12653 Value.prototype.invoke$4$isDynamic = Value.prototype.invoke; 12307 Value.prototype.invoke$4$isDynamic = Value.prototype.invoke;
12654 Value.prototype.invoke$5 = Value.prototype.invoke; 12308 Value.prototype.invoke$5 = Value.prototype.invoke;
12655 Value.prototype.needsConversion$1 = Value.prototype.needsConversion; 12309 Value.prototype.needsConversion$1 = Value.prototype.needsConversion;
12656 Value.prototype.set_$4 = function($0, $1, $2, $3) { 12310 Value.prototype.set_$4 = function($0, $1, $2, $3) {
12657 return this.set_($0, $1, $2, $3, false); 12311 return this.set_($0, $1, $2, $3, false);
12658 }; 12312 };
12313 Value.prototype.unop$3 = Value.prototype.unop;
12659 // ********** Code for EvaluatedValue ************** 12314 // ********** Code for EvaluatedValue **************
12660 $inherits(EvaluatedValue, Value); 12315 $inherits(EvaluatedValue, Value);
12661 function EvaluatedValue(isConst, type, span) { 12316 function EvaluatedValue(isConst, type, span) {
12662 this.isConst = isConst; 12317 this.isConst = isConst;
12663 // Initializers done
12664 Value.call(this, type, "@@@", span, false); 12318 Value.call(this, type, "@@@", span, false);
12665 } 12319 }
12666 EvaluatedValue.prototype.get$isConst = function() { return this.isConst; }; 12320 EvaluatedValue.prototype.get$isConst = function() { return this.isConst; };
12667 EvaluatedValue.prototype.set$isConst = function(value) { return this.isConst = v alue; }; 12321 EvaluatedValue.prototype.set$isConst = function(value) { return this.isConst = v alue; };
12668 EvaluatedValue.prototype.get$code = function() { 12322 EvaluatedValue.prototype.get$code = function() {
12669 return "@@@"; 12323 return "@@@";
12670 } 12324 }
12671 EvaluatedValue.prototype.get$constValue = function() {
12672 return this;
12673 }
12674 EvaluatedValue.prototype.hashCode = function() { 12325 EvaluatedValue.prototype.hashCode = function() {
12675 return this.get$code().hashCode(); 12326 return this.get$code().hashCode();
12676 } 12327 }
12677 EvaluatedValue.prototype.$eq = function(other) { 12328 EvaluatedValue.prototype.$eq = function(other) {
12678 return (other instanceof EvaluatedValue) && $eq(other.get$type(), this.get$typ e()) && $eq(other.get$code(), this.get$code()); 12329 return (other instanceof EvaluatedValue) && $eq(other.get$type(), this.get$typ e()) && $eq(other.get$code(), this.get$code());
12679 } 12330 }
12680 EvaluatedValue.prototype.hashCode$0 = EvaluatedValue.prototype.hashCode; 12331 EvaluatedValue.prototype.hashCode$0 = EvaluatedValue.prototype.hashCode;
12681 // ********** Code for NullValue ************** 12332 // ********** Code for NullValue **************
12682 $inherits(NullValue, EvaluatedValue); 12333 $inherits(NullValue, EvaluatedValue);
12683 function NullValue(isConst, span) { 12334 function NullValue(isConst, span) {
12684 // Initializers done
12685 EvaluatedValue.call(this, isConst, $globals.world.varType, span); 12335 EvaluatedValue.call(this, isConst, $globals.world.varType, span);
12686 } 12336 }
12687 NullValue.prototype.get$actualValue = function() { 12337 NullValue.prototype.get$actualValue = function() {
12688 return null; 12338 return null;
12689 } 12339 }
12690 NullValue.prototype.get$code = function() { 12340 NullValue.prototype.get$code = function() {
12691 return "null"; 12341 return "null";
12692 } 12342 }
12693 NullValue.prototype.binop = function(kind, other, context, node) { 12343 NullValue.prototype.binop = function(kind, other, context, node) {
12694 if (!(other instanceof ListValue)) return Value.prototype.binop.call(this, kin d, other, context, node); 12344 if (!(other instanceof NullValue)) return Value.prototype.binop.call(this, kin d, other, context, node);
12345 var c = this.isConst && other.get$isConst();
12346 var s = node.get$span();
12695 switch (kind) { 12347 switch (kind) {
12696 case (50): 12348 case (50):
12349 case (48):
12697 12350
12698 return new BoolValue($eq(this.get$type(), other.get$type()) && this.get$co de() == other.get$code(), this.isConst && other.get$isConst(), node.get$span()); 12351 return new BoolValue(true, c, s);
12699 12352
12700 case (51): 12353 case (51):
12354 case (49):
12701 12355
12702 return new BoolValue($ne(this.get$type(), other.get$type()) || this.get$co de() != other.get$code(), this.isConst && other.get$isConst(), node.get$span()); 12356 return new BoolValue(false, c, s);
12703 12357
12704 } 12358 }
12705 return Value.prototype.binop.call(this, kind, other, context, node); 12359 return Value.prototype.binop.call(this, kind, other, context, node);
12706 } 12360 }
12707 NullValue.prototype.binop$4 = NullValue.prototype.binop; 12361 NullValue.prototype.binop$4 = NullValue.prototype.binop;
12708 // ********** Code for BoolValue ************** 12362 // ********** Code for BoolValue **************
12709 $inherits(BoolValue, EvaluatedValue); 12363 $inherits(BoolValue, EvaluatedValue);
12710 function BoolValue(actualValue, isConst, span) { 12364 function BoolValue(actualValue, isConst, span) {
12711 this.actualValue = actualValue; 12365 this.actualValue = actualValue;
12712 // Initializers done
12713 EvaluatedValue.call(this, isConst, $globals.world.nonNullBool, span); 12366 EvaluatedValue.call(this, isConst, $globals.world.nonNullBool, span);
12714 } 12367 }
12715 BoolValue.prototype.get$actualValue = function() { return this.actualValue; }; 12368 BoolValue.prototype.get$actualValue = function() { return this.actualValue; };
12716 BoolValue.prototype.set$actualValue = function(value) { return this.actualValue = value; }; 12369 BoolValue.prototype.set$actualValue = function(value) { return this.actualValue = value; };
12717 BoolValue.prototype.get$code = function() { 12370 BoolValue.prototype.get$code = function() {
12718 return this.actualValue ? "true" : "false"; 12371 return this.actualValue ? "true" : "false";
12719 } 12372 }
12373 BoolValue.prototype.unop = function(kind, context, node) {
12374 switch (kind) {
12375 case (19):
12376
12377 return new BoolValue(!this.actualValue, this.isConst, node.get$span());
12378
12379 }
12380 return Value.prototype.unop.call(this, kind, context, node);
12381 }
12720 BoolValue.prototype.binop = function(kind, other, context, node) { 12382 BoolValue.prototype.binop = function(kind, other, context, node) {
12721 if (!(other instanceof BoolValue)) return Value.prototype.binop.call(this, kin d, other, context, node); 12383 if (!(other instanceof BoolValue)) return Value.prototype.binop.call(this, kin d, other, context, node);
12384 var c = this.isConst && other.get$isConst();
12385 var s = node.get$span();
12386 var x = this.actualValue, y = other.get$actualValue();
12722 switch (kind) { 12387 switch (kind) {
12388 case (50):
12389 case (48):
12390
12391 return new BoolValue($eq(x, y), c, s);
12392
12393 case (51):
12394 case (49):
12395
12396 return new BoolValue($ne(x, y), c, s);
12397
12723 case (35): 12398 case (35):
12724 12399
12725 return new BoolValue(this.actualValue && other.get$actualValue(), this.isC onst && other.get$isConst(), node.get$span()); 12400 return new BoolValue(x && y, c, s);
12726 12401
12727 case (34): 12402 case (34):
12728 12403
12729 return new BoolValue(this.actualValue || other.get$actualValue(), this.isC onst && other.get$isConst(), node.get$span()); 12404 return new BoolValue(x || y, c, s);
12730
12731 case (50):
12732
12733 return new BoolValue($eq(this.actualValue, other.get$actualValue()), this. isConst && other.get$isConst(), node.get$span());
12734
12735 case (51):
12736
12737 return new BoolValue($ne(this.actualValue, other.get$actualValue()), this. isConst && other.get$isConst(), node.get$span());
12738 12405
12739 } 12406 }
12740 return Value.prototype.binop.call(this, kind, other, context, node); 12407 return Value.prototype.binop.call(this, kind, other, context, node);
12741 } 12408 }
12742 BoolValue.prototype.binop$4 = BoolValue.prototype.binop; 12409 BoolValue.prototype.binop$4 = BoolValue.prototype.binop;
12410 BoolValue.prototype.unop$3 = BoolValue.prototype.unop;
12743 // ********** Code for IntValue ************** 12411 // ********** Code for IntValue **************
12744 $inherits(IntValue, EvaluatedValue); 12412 $inherits(IntValue, EvaluatedValue);
12745 function IntValue(actualValue, isConst, span) { 12413 function IntValue(actualValue, isConst, span) {
12746 this.actualValue = actualValue; 12414 this.actualValue = actualValue;
12747 // Initializers done
12748 EvaluatedValue.call(this, isConst, $globals.world.intType, span); 12415 EvaluatedValue.call(this, isConst, $globals.world.intType, span);
12749 } 12416 }
12750 IntValue.prototype.get$actualValue = function() { return this.actualValue; }; 12417 IntValue.prototype.get$actualValue = function() { return this.actualValue; };
12751 IntValue.prototype.set$actualValue = function(value) { return this.actualValue = value; }; 12418 IntValue.prototype.set$actualValue = function(value) { return this.actualValue = value; };
12752 IntValue.prototype.get$code = function() { 12419 IntValue.prototype.get$code = function() {
12753 return ("(" + this.actualValue + ")"); 12420 return ("(" + this.actualValue + ")");
12754 } 12421 }
12422 IntValue.prototype.unop = function(kind, context, node) {
12423 switch (kind) {
12424 case (42):
12425
12426 return new IntValue(this.actualValue, this.isConst, this.span);
12427
12428 case (43):
12429
12430 return new IntValue(-this.actualValue, this.isConst, this.span);
12431
12432 case (18):
12433
12434 return new IntValue(~this.actualValue, this.isConst, this.span);
12435
12436 }
12437 return Value.prototype.unop.call(this, kind, context, node);
12438 }
12755 IntValue.prototype.binop = function(kind, other, context, node) { 12439 IntValue.prototype.binop = function(kind, other, context, node) {
12756 if (!(other instanceof IntValue)) return Value.prototype.binop.call(this, kind , other, context, node); 12440 var c = this.isConst && other.get$isConst();
12757 switch (kind) { 12441 var s = node.get$span();
12758 case (50): 12442 if ((other instanceof IntValue)) {
12443 var x = this.actualValue;
12444 var y = other.get$actualValue();
12445 switch (kind) {
12446 case (50):
12447 case (48):
12759 12448
12760 return new BoolValue(this.actualValue == other.get$actualValue(), this.isC onst && other.get$isConst(), node.get$span()); 12449 return new BoolValue(x == y, c, s);
12761 12450
12762 case (51): 12451 case (51):
12452 case (49):
12763 12453
12764 return new BoolValue(this.actualValue != other.get$actualValue(), this.isC onst && other.get$isConst(), node.get$span()); 12454 return new BoolValue(x != y, c, s);
12765 12455
12456 case (36):
12457
12458 return new IntValue(x | y, c, s);
12459
12460 case (37):
12461
12462 return new IntValue(x ^ y, c, s);
12463
12464 case (38):
12465
12466 return new IntValue(x & y, c, s);
12467
12468 case (39):
12469
12470 return new IntValue(x << y, c, s);
12471
12472 case (40):
12473
12474 return new IntValue(x >> y, c, s);
12475
12476 case (41):
12477
12478 return new IntValue(x >>> y, c, s);
12479
12480 case (42):
12481
12482 return new IntValue(x + y, c, s);
12483
12484 case (43):
12485
12486 return new IntValue(x - y, c, s);
12487
12488 case (44):
12489
12490 return new IntValue(x * y, c, s);
12491
12492 case (45):
12493
12494 return new DoubleValue(x / y, c, s);
12495
12496 case (46):
12497
12498 return new IntValue($truncdiv(x, y), c, s);
12499
12500 case (47):
12501
12502 return new IntValue($mod(x, y), c, s);
12503
12504 case (52):
12505
12506 return new BoolValue(x < y, c, s);
12507
12508 case (53):
12509
12510 return new BoolValue(x > y, c, s);
12511
12512 case (54):
12513
12514 return new BoolValue(x <= y, c, s);
12515
12516 case (55):
12517
12518 return new BoolValue(x >= y, c, s);
12519
12520 }
12521 }
12522 else if ((other instanceof DoubleValue)) {
12523 var x = this.actualValue;
12524 var y = other.get$actualValue();
12525 switch (kind) {
12526 case (50):
12527 case (48):
12528
12529 return new BoolValue(x == y, c, s);
12530
12531 case (51):
12532 case (49):
12533
12534 return new BoolValue(x != y, c, s);
12535
12536 case (42):
12537
12538 return new DoubleValue(x + y, c, s);
12539
12540 case (43):
12541
12542 return new DoubleValue(x - y, c, s);
12543
12544 case (44):
12545
12546 return new DoubleValue(x * y, c, s);
12547
12548 case (45):
12549
12550 return new DoubleValue(x / y, c, s);
12551
12552 case (46):
12553
12554 return new DoubleValue($truncdiv(x, y), c, s);
12555
12556 case (47):
12557
12558 return new DoubleValue($mod(x, y), c, s);
12559
12560 case (52):
12561
12562 return new BoolValue(x < y, c, s);
12563
12564 case (53):
12565
12566 return new BoolValue(x > y, c, s);
12567
12568 case (54):
12569
12570 return new BoolValue(x <= y, c, s);
12571
12572 case (55):
12573
12574 return new BoolValue(x >= y, c, s);
12575
12576 }
12766 } 12577 }
12767 return Value.prototype.binop.call(this, kind, other, context, node); 12578 return Value.prototype.binop.call(this, kind, other, context, node);
12768 } 12579 }
12769 IntValue.prototype.binop$4 = IntValue.prototype.binop; 12580 IntValue.prototype.binop$4 = IntValue.prototype.binop;
12581 IntValue.prototype.unop$3 = IntValue.prototype.unop;
12770 // ********** Code for DoubleValue ************** 12582 // ********** Code for DoubleValue **************
12771 $inherits(DoubleValue, EvaluatedValue); 12583 $inherits(DoubleValue, EvaluatedValue);
12772 function DoubleValue(actualValue, isConst, span) { 12584 function DoubleValue(actualValue, isConst, span) {
12773 this.actualValue = actualValue; 12585 this.actualValue = actualValue;
12774 // Initializers done
12775 EvaluatedValue.call(this, isConst, $globals.world.doubleType, span); 12586 EvaluatedValue.call(this, isConst, $globals.world.doubleType, span);
12776 } 12587 }
12777 DoubleValue.prototype.get$actualValue = function() { return this.actualValue; }; 12588 DoubleValue.prototype.get$actualValue = function() { return this.actualValue; };
12778 DoubleValue.prototype.set$actualValue = function(value) { return this.actualValu e = value; }; 12589 DoubleValue.prototype.set$actualValue = function(value) { return this.actualValu e = value; };
12779 DoubleValue.prototype.get$code = function() { 12590 DoubleValue.prototype.get$code = function() {
12780 return ("(" + this.actualValue + ")"); 12591 return ("(" + this.actualValue + ")");
12781 } 12592 }
12593 DoubleValue.prototype.unop = function(kind, context, node) {
12594 switch (kind) {
12595 case (42):
12596
12597 return new DoubleValue(this.actualValue, this.isConst, this.span);
12598
12599 case (43):
12600
12601 return new DoubleValue(-this.actualValue, this.isConst, this.span);
12602
12603 }
12604 return Value.prototype.unop.call(this, kind, context, node);
12605 }
12782 DoubleValue.prototype.binop = function(kind, other, context, node) { 12606 DoubleValue.prototype.binop = function(kind, other, context, node) {
12783 if (!(other instanceof DoubleValue)) return Value.prototype.binop.call(this, k ind, other, context, node); 12607 var c = this.isConst && other.get$isConst();
12784 switch (kind) { 12608 var s = node.get$span();
12785 case (50): 12609 if ((other instanceof DoubleValue)) {
12610 var x = this.actualValue;
12611 var y = other.get$actualValue();
12612 switch (kind) {
12613 case (50):
12614 case (48):
12786 12615
12787 return new BoolValue(this.actualValue == other.get$actualValue(), this.isC onst && other.get$isConst(), node.get$span()); 12616 return new BoolValue(x == y, c, s);
12788 12617
12789 case (51): 12618 case (51):
12619 case (49):
12790 12620
12791 return new BoolValue(this.actualValue != other.get$actualValue(), this.isC onst && other.get$isConst(), node.get$span()); 12621 return new BoolValue(x != y, c, s);
12792 12622
12623 case (42):
12624
12625 return new DoubleValue(x + y, c, s);
12626
12627 case (43):
12628
12629 return new DoubleValue(x - y, c, s);
12630
12631 case (44):
12632
12633 return new DoubleValue(x * y, c, s);
12634
12635 case (45):
12636
12637 return new DoubleValue(x / y, c, s);
12638
12639 case (46):
12640
12641 return new DoubleValue($truncdiv(x, y), c, s);
12642
12643 case (47):
12644
12645 return new DoubleValue($mod(x, y), c, s);
12646
12647 case (52):
12648
12649 return new BoolValue(x < y, c, s);
12650
12651 case (53):
12652
12653 return new BoolValue(x > y, c, s);
12654
12655 case (54):
12656
12657 return new BoolValue(x <= y, c, s);
12658
12659 case (55):
12660
12661 return new BoolValue(x >= y, c, s);
12662
12663 }
12664 }
12665 else if ((other instanceof IntValue)) {
12666 var x = this.actualValue;
12667 var y = other.get$actualValue();
12668 switch (kind) {
12669 case (50):
12670 case (48):
12671
12672 return new BoolValue(x == y, c, s);
12673
12674 case (51):
12675 case (49):
12676
12677 return new BoolValue(x != y, c, s);
12678
12679 case (42):
12680
12681 return new DoubleValue(x + y, c, s);
12682
12683 case (43):
12684
12685 return new DoubleValue(x - y, c, s);
12686
12687 case (44):
12688
12689 return new DoubleValue(x * y, c, s);
12690
12691 case (45):
12692
12693 return new DoubleValue(x / y, c, s);
12694
12695 case (46):
12696
12697 return new DoubleValue($truncdiv(x, y), c, s);
12698
12699 case (47):
12700
12701 return new DoubleValue($mod(x, y), c, s);
12702
12703 case (52):
12704
12705 return new BoolValue(x < y, c, s);
12706
12707 case (53):
12708
12709 return new BoolValue(x > y, c, s);
12710
12711 case (54):
12712
12713 return new BoolValue(x <= y, c, s);
12714
12715 case (55):
12716
12717 return new BoolValue(x >= y, c, s);
12718
12719 }
12793 } 12720 }
12794 return Value.prototype.binop.call(this, kind, other, context, node); 12721 return Value.prototype.binop.call(this, kind, other, context, node);
12795 } 12722 }
12796 DoubleValue.prototype.binop$4 = DoubleValue.prototype.binop; 12723 DoubleValue.prototype.binop$4 = DoubleValue.prototype.binop;
12724 DoubleValue.prototype.unop$3 = DoubleValue.prototype.unop;
12797 // ********** Code for StringValue ************** 12725 // ********** Code for StringValue **************
12798 $inherits(StringValue, EvaluatedValue); 12726 $inherits(StringValue, EvaluatedValue);
12799 function StringValue(actualValue, isConst, span) { 12727 function StringValue(actualValue, isConst, span) {
12800 this.actualValue = actualValue; 12728 this.actualValue = actualValue;
12801 // Initializers done
12802 EvaluatedValue.call(this, isConst, $globals.world.stringType, span); 12729 EvaluatedValue.call(this, isConst, $globals.world.stringType, span);
12803 } 12730 }
12804 StringValue.prototype.get$actualValue = function() { return this.actualValue; }; 12731 StringValue.prototype.get$actualValue = function() { return this.actualValue; };
12805 StringValue.prototype.set$actualValue = function(value) { return this.actualValu e = value; }; 12732 StringValue.prototype.set$actualValue = function(value) { return this.actualValu e = value; };
12806 StringValue.prototype.binop = function(kind, other, context, node) { 12733 StringValue.prototype.binop = function(kind, other, context, node) {
12807 if (!(other instanceof StringValue)) return Value.prototype.binop.call(this, k ind, other, context, node); 12734 if (!(other instanceof StringValue)) return Value.prototype.binop.call(this, k ind, other, context, node);
12735 var c = this.isConst && other.get$isConst();
12736 var s = node.get$span();
12737 var x = this.actualValue, y = other.get$actualValue();
12808 switch (kind) { 12738 switch (kind) {
12809 case (50): 12739 case (50):
12740 case (48):
12810 12741
12811 return new BoolValue(this.actualValue == other.get$actualValue(), this.isC onst && other.get$isConst(), node.get$span()); 12742 return new BoolValue(x == y, c, s);
12812 12743
12813 case (51): 12744 case (51):
12745 case (49):
12814 12746
12815 return new BoolValue(this.actualValue != other.get$actualValue(), this.isC onst && other.get$isConst(), node.get$span()); 12747 return new BoolValue(x != y, c, s);
12748
12749 case (42):
12750
12751 return new StringValue(x + y, c, s);
12816 12752
12817 } 12753 }
12818 return Value.prototype.binop.call(this, kind, other, context, node); 12754 return Value.prototype.binop.call(this, kind, other, context, node);
12819 } 12755 }
12820 StringValue.prototype.get$code = function() { 12756 StringValue.prototype.get$code = function() {
12821 var buf = new StringBufferImpl(""); 12757 var buf = new StringBufferImpl("");
12822 buf.add("\""); 12758 buf.add("\"");
12823 for (var i = (0); 12759 for (var i = (0);
12824 i < this.actualValue.length; i++) { 12760 i < this.actualValue.length; i++) {
12825 var ch = this.actualValue.charCodeAt(i); 12761 var ch = this.actualValue.charCodeAt(i);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
12893 } 12829 }
12894 } 12830 }
12895 buf.add("\""); 12831 buf.add("\"");
12896 return buf.toString(); 12832 return buf.toString();
12897 } 12833 }
12898 StringValue.prototype.binop$4 = StringValue.prototype.binop; 12834 StringValue.prototype.binop$4 = StringValue.prototype.binop;
12899 // ********** Code for ListValue ************** 12835 // ********** Code for ListValue **************
12900 $inherits(ListValue, EvaluatedValue); 12836 $inherits(ListValue, EvaluatedValue);
12901 function ListValue(values, isConst, type, span) { 12837 function ListValue(values, isConst, type, span) {
12902 this.values = values; 12838 this.values = values;
12903 // Initializers done
12904 EvaluatedValue.call(this, isConst, type, span); 12839 EvaluatedValue.call(this, isConst, type, span);
12905 } 12840 }
12906 ListValue.prototype.get$code = function() { 12841 ListValue.prototype.get$code = function() {
12907 var buf = new StringBufferImpl(""); 12842 var buf = new StringBufferImpl("");
12908 buf.add("["); 12843 buf.add("[");
12909 for (var i = (0); 12844 for (var i = (0);
12910 i < this.values.get$length(); i = i + (1)) { 12845 i < this.values.get$length(); i = i + (1)) {
12911 if (i > (0)) buf.add(", "); 12846 if (i > (0)) buf.add(", ");
12912 buf.add(this.values.$index(i).get$code()); 12847 buf.add(this.values.$index(i).get$code());
12913 } 12848 }
(...skipping 21 matching lines...) Expand all
12935 } 12870 }
12936 ListValue.prototype.getGlobalValue = function() { 12871 ListValue.prototype.getGlobalValue = function() {
12937 return $globals.world.gen.globalForConst(this, this.values); 12872 return $globals.world.gen.globalForConst(this, this.values);
12938 } 12873 }
12939 ListValue.prototype.binop$4 = ListValue.prototype.binop; 12874 ListValue.prototype.binop$4 = ListValue.prototype.binop;
12940 ListValue.prototype.getGlobalValue$0 = ListValue.prototype.getGlobalValue; 12875 ListValue.prototype.getGlobalValue$0 = ListValue.prototype.getGlobalValue;
12941 // ********** Code for MapValue ************** 12876 // ********** Code for MapValue **************
12942 $inherits(MapValue, EvaluatedValue); 12877 $inherits(MapValue, EvaluatedValue);
12943 function MapValue(values, isConst, type, span) { 12878 function MapValue(values, isConst, type, span) {
12944 this.values = values; 12879 this.values = values;
12945 // Initializers done
12946 EvaluatedValue.call(this, isConst, type, span); 12880 EvaluatedValue.call(this, isConst, type, span);
12947 } 12881 }
12948 MapValue.prototype.get$code = function() { 12882 MapValue.prototype.get$code = function() {
12949 var items = new ListValue(this.values, false, $globals.world.listType, this.sp an); 12883 var items = new ListValue(this.values, false, $globals.world.listType, this.sp an);
12950 var tp = $globals.world.corelib.topType; 12884 var tp = $globals.world.corelib.topType;
12951 var f = this.isConst ? tp.getMember$1("_constMap") : tp.getMember$1("_map"); 12885 var f = this.isConst ? tp.getMember$1("_constMap") : tp.getMember$1("_map");
12952 var value = f.invoke(null, null, new Value.type$ctor(tp, null), new Arguments( null, [items]), false); 12886 var value = f.invoke(null, null, new Value.type$ctor(tp, null), new Arguments( null, [items]), false);
12953 return value.get$code(); 12887 return value.get$code();
12954 } 12888 }
12955 MapValue.prototype.getGlobalValue = function() { 12889 MapValue.prototype.getGlobalValue = function() {
(...skipping 10 matching lines...) Expand all
12966 12900
12967 return new BoolValue($ne(this.get$type(), other.get$type()) || this.get$co de() != other.get$code(), this.isConst && other.get$isConst(), node.get$span()); 12901 return new BoolValue($ne(this.get$type(), other.get$type()) || this.get$co de() != other.get$code(), this.isConst && other.get$isConst(), node.get$span());
12968 12902
12969 } 12903 }
12970 return Value.prototype.binop.call(this, kind, other, context, node); 12904 return Value.prototype.binop.call(this, kind, other, context, node);
12971 } 12905 }
12972 MapValue.prototype.binop$4 = MapValue.prototype.binop; 12906 MapValue.prototype.binop$4 = MapValue.prototype.binop;
12973 MapValue.prototype.getGlobalValue$0 = MapValue.prototype.getGlobalValue; 12907 MapValue.prototype.getGlobalValue$0 = MapValue.prototype.getGlobalValue;
12974 // ********** Code for ObjectValue ************** 12908 // ********** Code for ObjectValue **************
12975 $inherits(ObjectValue, EvaluatedValue); 12909 $inherits(ObjectValue, EvaluatedValue);
12976 function ObjectValue(fields, isConst, type, _code, span) { 12910 function ObjectValue(isConst, type, span) {
12977 this.fields = fields; 12911 this.seenNativeInitializer = false;
12978 this._code = _code; 12912 this.fields = new HashMapImplementation();
12979 // Initializers done
12980 EvaluatedValue.call(this, isConst, type, span); 12913 EvaluatedValue.call(this, isConst, type, span);
12981 } 12914 }
12982 ObjectValue.prototype.get$fields = function() { return this.fields; }; 12915 ObjectValue.prototype.get$fields = function() { return this.fields; };
12983 ObjectValue.prototype.set$fields = function(value) { return this.fields = value; }; 12916 ObjectValue.prototype.set$fields = function(value) { return this.fields = value; };
12917 ObjectValue.prototype.get$seenNativeInitializer = function() { return this.seenN ativeInitializer; };
12918 ObjectValue.prototype.set$seenNativeInitializer = function(value) { return this. seenNativeInitializer = value; };
12984 ObjectValue.prototype.get$code = function() { 12919 ObjectValue.prototype.get$code = function() {
12920 if (this._code == null) this.validateInitialized(null);
12985 return this._code; 12921 return this._code;
12986 } 12922 }
12923 ObjectValue.prototype.initFields = function() {
12924 var allMembers = $globals.world.gen._orderValues(this.get$type().getAllMembers ());
12925 for (var $$i = allMembers.iterator$0(); $$i.hasNext$0(); ) {
12926 var f = $$i.next$0();
12927 if (f.get$isField() && !f.get$isStatic() && f.get$declaringType().get$isClas s()) {
12928 this.fields.$setindex(f, f.computeValue$0());
12929 }
12930 }
12931 }
12932 ObjectValue.prototype.setField = function(field, value, duringInit) {
12933 var currentValue = this.fields.$index(field);
12934 if (this.isConst && !value.get$isConst()) {
12935 $globals.world.error("used of non-const value in const intializer", value.sp an);
12936 }
12937 if (currentValue == null) {
12938 this.fields.$setindex(field, value);
12939 if (field.get$isFinal() && !duringInit) {
12940 $globals.world.error("can not initialize final fields outside of initializ er", value.span);
12941 }
12942 }
12943 else {
12944 if (field.get$isFinal() && field.computeValue() == null) {
12945 $globals.world.error("reassignment of field not allowed", value.span, fiel d.get$span());
12946 }
12947 else {
12948 this.fields.$setindex(field, value);
12949 }
12950 }
12951 }
12952 ObjectValue.prototype.validateInitialized = function(span) {
12953 var buf = new StringBufferImpl("");
12954 buf.add$1("Object.create(");
12955 buf.add$1(("" + this.get$type().get$jsname() + ".prototype, "));
12956 buf.add$1("{");
12957 var $$list = this.fields.getKeys();
12958 for (var $$i = this.fields.getKeys().iterator$0(); $$i.hasNext$0(); ) {
12959 var field = $$i.next$0();
12960 buf.add$1(field.get$name());
12961 buf.add$1(": ");
12962 buf.add$1("{\"value\": ");
12963 if (this.fields.$index(field) == null) {
12964 $globals.world.error(("Required field \"" + field.get$name() + "\" was not initialized"), span, field.get$span());
12965 buf.add$1("null");
12966 }
12967 else {
12968 buf.add$1(this.fields.$index(field).get$code());
12969 }
12970 buf.add$1(", writeable: false}, ");
12971 }
12972 buf.add$1("})");
12973 this._code = buf.toString$0();
12974 }
12987 ObjectValue.prototype.binop = function(kind, other, context, node) { 12975 ObjectValue.prototype.binop = function(kind, other, context, node) {
12988 if (!(other instanceof ObjectValue)) return Value.prototype.binop.call(this, k ind, other, context, node); 12976 if (!(other instanceof ObjectValue)) return Value.prototype.binop.call(this, k ind, other, context, node);
12989 switch (kind) { 12977 switch (kind) {
12990 case (50): 12978 case (50):
12979 case (48):
12991 12980
12992 return new BoolValue($eq(this.get$type(), other.get$type()) && this.get$co de() == other.get$code(), this.isConst && other.get$isConst(), node.get$span()); 12981 return new BoolValue($eq(this.get$type(), other.get$type()) && this.get$co de() == other.get$code(), this.isConst && other.get$isConst(), node.get$span());
12993 12982
12994 case (51): 12983 case (51):
12984 case (49):
12995 12985
12996 return new BoolValue($ne(this.get$type(), other.get$type()) || this.get$co de() != other.get$code(), this.isConst && other.get$isConst(), node.get$span()); 12986 return new BoolValue($ne(this.get$type(), other.get$type()) || this.get$co de() != other.get$code(), this.isConst && other.get$isConst(), node.get$span());
12997 12987
12998 } 12988 }
12999 return Value.prototype.binop.call(this, kind, other, context, node); 12989 return Value.prototype.binop.call(this, kind, other, context, node);
13000 } 12990 }
13001 ObjectValue.prototype.binop$4 = ObjectValue.prototype.binop; 12991 ObjectValue.prototype.binop$4 = ObjectValue.prototype.binop;
12992 ObjectValue.prototype.initFields$0 = ObjectValue.prototype.initFields;
13002 // ********** Code for GlobalValue ************** 12993 // ********** Code for GlobalValue **************
13003 $inherits(GlobalValue, Value); 12994 $inherits(GlobalValue, Value);
13004 function GlobalValue(type, code, isConst, field, name, exp, span, _dependencies) { 12995 function GlobalValue(type, code, isConst, field, name, exp, span, _dependencies) {
12996 this.exp = exp;
13005 this.field = field; 12997 this.field = field;
13006 this.name = name; 12998 this.name = name;
13007 this.exp = exp;
13008 this.dependencies = []; 12999 this.dependencies = [];
13009 // Initializers done 13000 this.isConst = isConst;
13010 Value.call(this, type, code, span, !isConst); 13001 Value.call(this, type, code, span, !isConst);
13011 for (var $$i = 0;$$i < _dependencies.get$length(); $$i++) { 13002 for (var $$i = 0;$$i < _dependencies.get$length(); $$i++) {
13012 var dep = _dependencies.$index($$i); 13003 var dep = _dependencies.$index($$i);
13013 if ((dep instanceof GlobalValue)) { 13004 if ((dep instanceof GlobalValue)) {
13014 this.dependencies.add(dep); 13005 this.dependencies.add(dep);
13015 this.dependencies.addAll(dep.get$dependencies()); 13006 this.dependencies.addAll(dep.get$dependencies());
13016 } 13007 }
13017 } 13008 }
13018 } 13009 }
13019 GlobalValue.prototype.get$field = function() { return this.field; }; 13010 GlobalValue.prototype.get$field = function() { return this.field; };
13020 GlobalValue.prototype.set$field = function(value) { return this.field = value; } ; 13011 GlobalValue.prototype.set$field = function(value) { return this.field = value; } ;
13021 GlobalValue.prototype.get$name = function() { return this.name; }; 13012 GlobalValue.prototype.get$name = function() { return this.name; };
13022 GlobalValue.prototype.set$name = function(value) { return this.name = value; }; 13013 GlobalValue.prototype.set$name = function(value) { return this.name = value; };
13023 GlobalValue.prototype.get$exp = function() { return this.exp; }; 13014 GlobalValue.prototype.get$exp = function() { return this.exp; };
13024 GlobalValue.prototype.set$exp = function(value) { return this.exp = value; }; 13015 GlobalValue.prototype.set$exp = function(value) { return this.exp = value; };
13025 GlobalValue.prototype.get$isConst = function() { 13016 GlobalValue.prototype.get$isConst = function() { return this.isConst; };
13026 return this.exp.get$isConst() && (this.field == null || this.field.isFinal); 13017 GlobalValue.prototype.set$isConst = function(value) { return this.isConst = valu e; };
13027 }
13028 GlobalValue.prototype.get$actualValue = function() { 13018 GlobalValue.prototype.get$actualValue = function() {
13029 return this.exp.get$dynamic().get$actualValue(); 13019 return this.exp.get$dynamic().get$actualValue();
13030 } 13020 }
13031 GlobalValue.prototype.get$constValue = function() {
13032 return this.get$isConst() ? this.exp.get$constValue() : null;
13033 }
13034 GlobalValue.prototype.get$dependencies = function() { return this.dependencies; }; 13021 GlobalValue.prototype.get$dependencies = function() { return this.dependencies; };
13035 GlobalValue.prototype.set$dependencies = function(value) { return this.dependenc ies = value; }; 13022 GlobalValue.prototype.set$dependencies = function(value) { return this.dependenc ies = value; };
13036 GlobalValue.prototype.compareTo = function(other) { 13023 GlobalValue.prototype.compareTo = function(other) {
13037 if ($eq(other, this)) { 13024 if ($eq(other, this)) {
13038 return (0); 13025 return (0);
13039 } 13026 }
13040 else if (this.dependencies.indexOf(other) >= (0)) { 13027 else if (this.dependencies.indexOf(other) >= (0)) {
13041 return (1); 13028 return (1);
13042 } 13029 }
13043 else if (other.dependencies.indexOf(this) >= (0)) { 13030 else if (other.dependencies.indexOf(this) >= (0)) {
(...skipping 16 matching lines...) Expand all
13060 } 13047 }
13061 else { 13048 else {
13062 return this.field.name.compareTo(other.field.name); 13049 return this.field.name.compareTo(other.field.name);
13063 } 13050 }
13064 } 13051 }
13065 GlobalValue.prototype.compareTo$1 = GlobalValue.prototype.compareTo; 13052 GlobalValue.prototype.compareTo$1 = GlobalValue.prototype.compareTo;
13066 // ********** Code for BareValue ************** 13053 // ********** Code for BareValue **************
13067 $inherits(BareValue, Value); 13054 $inherits(BareValue, Value);
13068 function BareValue(home, outermost, span) { 13055 function BareValue(home, outermost, span) {
13069 this.home = home; 13056 this.home = home;
13070 // Initializers done
13071 Value.call(this, outermost.method.declaringType, null, span, false); 13057 Value.call(this, outermost.method.declaringType, null, span, false);
13072 this.isType = outermost.get$isStatic(); 13058 this.isType = outermost.get$isStatic();
13073 } 13059 }
13074 BareValue.prototype.get$type = function() { 13060 BareValue.prototype.get$type = function() {
13075 return this._type; 13061 return this._type;
13076 } 13062 }
13077 BareValue.prototype._ensureCode = function() { 13063 BareValue.prototype._ensureCode = function() {
13078 if (this.code != null) return; 13064 if (this.code != null) return;
13079 if (this.isType) { 13065 if (this.isType) {
13080 this.code = this.get$type().get$jsname(); 13066 this.code = this.get$type().get$jsname();
(...skipping 15 matching lines...) Expand all
13096 if (member != null) { 13082 if (member != null) {
13097 return member; 13083 return member;
13098 } 13084 }
13099 this._ensureCode(); 13085 this._ensureCode();
13100 return null; 13086 return null;
13101 } 13087 }
13102 // ********** Code for CompilerException ************** 13088 // ********** Code for CompilerException **************
13103 function CompilerException(_message, _location) { 13089 function CompilerException(_message, _location) {
13104 this._lang_message = _message; 13090 this._lang_message = _message;
13105 this._location = _location; 13091 this._location = _location;
13106 // Initializers done
13107 } 13092 }
13108 CompilerException.prototype.toString = function() { 13093 CompilerException.prototype.toString = function() {
13109 if (this._location != null) { 13094 if (this._location != null) {
13110 return ("CompilerException: " + this._location.toMessageString(this._lang_me ssage)); 13095 return ("CompilerException: " + this._location.toMessageString(this._lang_me ssage));
13111 } 13096 }
13112 else { 13097 else {
13113 return ("CompilerException: " + this._lang_message); 13098 return ("CompilerException: " + this._lang_message);
13114 } 13099 }
13115 } 13100 }
13116 CompilerException.prototype.toString$0 = CompilerException.prototype.toString; 13101 CompilerException.prototype.toString$0 = CompilerException.prototype.toString;
13117 // ********** Code for World ************** 13102 // ********** Code for World **************
13118 function World(files) { 13103 function World(files) {
13119 this.errors = (0)
13120 this.warnings = (0)
13121 this.dartBytesRead = (0)
13122 this.jsBytesWritten = (0)
13123 this.seenFatal = false
13124 this.files = files; 13104 this.files = files;
13125 this.libraries = new HashMapImplementation();
13126 this._todo = [];
13127 this._members = new HashMapImplementation(); 13105 this._members = new HashMapImplementation();
13128 this._topNames = new HashMapImplementation(); 13106 this._topNames = new HashMapImplementation();
13107 this.warnings = (0);
13108 this.seenFatal = false;
13109 this.libraries = new HashMapImplementation();
13110 this.dartBytesRead = (0);
13111 this._todo = [];
13112 this.jsBytesWritten = (0);
13113 this.errors = (0);
13129 this.reader = new LibraryReader(); 13114 this.reader = new LibraryReader();
13130 // Initializers done
13131 } 13115 }
13132 World.prototype.get$functionType = function() { return this.functionType; }; 13116 World.prototype.get$functionType = function() { return this.functionType; };
13133 World.prototype.set$functionType = function(value) { return this.functionType = value; }; 13117 World.prototype.set$functionType = function(value) { return this.functionType = value; };
13134 World.prototype.init = function() { 13118 World.prototype.init = function() {
13135 this.corelib = new Library(this.readFile("dart:core")); 13119 this.corelib = new Library(this.readFile("dart:core"));
13136 this.libraries.$setindex("dart:core", this.corelib); 13120 this.libraries.$setindex("dart:core", this.corelib);
13137 this._todo.add(this.corelib); 13121 this._todo.add(this.corelib);
13138 this.coreimpl = this.getOrAddLibrary("dart:coreimpl"); 13122 this.coreimpl = this.getOrAddLibrary("dart:coreimpl");
13139 this.voidType = this.corelib.addType("void", null, false); 13123 this.voidType = this.corelib.addType("void", null, false);
13140 this.dynamicType = this.corelib.addType("Dynamic", null, false); 13124 this.dynamicType = this.corelib.addType("Dynamic", null, false);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
13471 World.prototype.withTiming = function(name, f) { 13455 World.prototype.withTiming = function(name, f) {
13472 var sw = new StopwatchImplementation(); 13456 var sw = new StopwatchImplementation();
13473 sw.start(); 13457 sw.start();
13474 var result = f(); 13458 var result = f();
13475 sw.stop(); 13459 sw.stop();
13476 this.info(("" + name + " in " + sw.elapsedInMs() + "msec")); 13460 this.info(("" + name + " in " + sw.elapsedInMs() + "msec"));
13477 return result; 13461 return result;
13478 } 13462 }
13479 // ********** Code for FrogOptions ************** 13463 // ********** Code for FrogOptions **************
13480 function FrogOptions(homedir, args, files) { 13464 function FrogOptions(homedir, args, files) {
13481 this.config = "dev" 13465 this.legOnly = false;
13482 this.enableLeg = false 13466 this.throwOnFatal = false;
13483 this.legOnly = false 13467 this.config = "dev";
13484 this.enableAsserts = false 13468 this.throwOnWarnings = false;
13485 this.enableTypeChecks = false 13469 this.verifyImplements = false;
13486 this.warningsAsErrors = false 13470 this.warningsAsErrors = false;
13487 this.verifyImplements = false 13471 this.enableLeg = false;
13488 this.compileAll = false 13472 this.enableAsserts = false;
13489 this.forceDynamic = false 13473 this.enableTypeChecks = false;
13490 this.dietParse = false 13474 this.forceDynamic = false;
13491 this.compileOnly = false 13475 this.showInfo = false;
13492 this.throwOnErrors = false 13476 this.dietParse = false;
13493 this.throwOnWarnings = false 13477 this.useColors = true;
13494 this.throwOnFatal = false 13478 this.compileOnly = false;
13495 this.showInfo = false 13479 this.showWarnings = true;
13496 this.showWarnings = true 13480 this.compileAll = false;
13497 this.useColors = true 13481 this.throwOnErrors = false;
13498 // Initializers done
13499 if ($eq(this.config, "dev")) { 13482 if ($eq(this.config, "dev")) {
13500 this.libDir = joinPaths(homedir, "/lib"); 13483 this.libDir = joinPaths(homedir, "/lib");
13501 } 13484 }
13502 else if ($eq(this.config, "sdk")) { 13485 else if ($eq(this.config, "sdk")) {
13503 this.libDir = joinPaths(homedir, "/../lib"); 13486 this.libDir = joinPaths(homedir, "/../lib");
13504 } 13487 }
13505 else { 13488 else {
13506 $globals.world.error(("Invalid configuration " + this.config)); 13489 $globals.world.error(("Invalid configuration " + this.config));
13507 $throw("Invalid configuration"); 13490 $throw("Invalid configuration");
13508 } 13491 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
13623 if (files.fileExists(temp)) { 13606 if (files.fileExists(temp)) {
13624 this.libDir = temp; 13607 this.libDir = temp;
13625 } 13608 }
13626 else { 13609 else {
13627 this.libDir = "lib"; 13610 this.libDir = "lib";
13628 } 13611 }
13629 } 13612 }
13630 } 13613 }
13631 // ********** Code for LibraryReader ************** 13614 // ********** Code for LibraryReader **************
13632 function LibraryReader() { 13615 function LibraryReader() {
13633 // Initializers done
13634 if ($eq($globals.options.config, "dev")) { 13616 if ($eq($globals.options.config, "dev")) {
13635 this._specialLibs = _map(["dart:core", joinPaths($globals.options.libDir, "c orelib.dart"), "dart:coreimpl", joinPaths($globals.options.libDir, "corelib_impl .dart"), "dart:html", joinPaths($globals.options.libDir, "../../client/html/rele ase/html.dart"), "dart:htmlimpl", joinPaths($globals.options.libDir, "../../clie nt/html/release/htmlimpl.dart"), "dart:dom", joinPaths($globals.options.libDir, "../../client/dom/frog/dom_frog.dart"), "dart:json", joinPaths($globals.options. libDir, "json_frog.dart")]); 13617 this._specialLibs = _map(["dart:core", joinPaths($globals.options.libDir, "c orelib.dart"), "dart:coreimpl", joinPaths($globals.options.libDir, "corelib_impl .dart"), "dart:html", joinPaths($globals.options.libDir, "../../client/html/rele ase/html.dart"), "dart:htmlimpl", joinPaths($globals.options.libDir, "../../clie nt/html/release/htmlimpl.dart"), "dart:dom", joinPaths($globals.options.libDir, "../../client/dom/frog/dom_frog.dart"), "dart:json", joinPaths($globals.options. libDir, "json_frog.dart")]);
13636 } 13618 }
13637 else if ($eq($globals.options.config, "sdk")) { 13619 else if ($eq($globals.options.config, "sdk")) {
13638 this._specialLibs = _map(["dart:core", joinPaths($globals.options.libDir, "c ore/core_frog.dart"), "dart:coreimpl", joinPaths($globals.options.libDir, "corei mpl/coreimpl_frog.dart"), "dart:html", joinPaths($globals.options.libDir, "html/ html.dart"), "dart:htmlimpl", joinPaths($globals.options.libDir, "htmlimpl/htmli mpl.dart"), "dart:dom", joinPaths($globals.options.libDir, "dom/frog/dom_frog.da rt"), "dart:json", joinPaths($globals.options.libDir, "json/json_frog.dart")]); 13620 this._specialLibs = _map(["dart:core", joinPaths($globals.options.libDir, "c ore/core_frog.dart"), "dart:coreimpl", joinPaths($globals.options.libDir, "corei mpl/coreimpl_frog.dart"), "dart:html", joinPaths($globals.options.libDir, "html/ html.dart"), "dart:htmlimpl", joinPaths($globals.options.libDir, "htmlimpl/htmli mpl.dart"), "dart:dom", joinPaths($globals.options.libDir, "dom/frog/dom_frog.da rt"), "dart:json", joinPaths($globals.options.libDir, "json/json_frog.dart")]);
13639 } 13621 }
13640 else { 13622 else {
13641 $globals.world.error(("Invalid configuration " + $globals.options.config)); 13623 $globals.world.error(("Invalid configuration " + $globals.options.config));
13642 } 13624 }
13643 } 13625 }
13644 LibraryReader.prototype.readFile = function(fullname) { 13626 LibraryReader.prototype.readFile = function(fullname) {
13645 var filename = this._specialLibs.$index(fullname); 13627 var filename = this._specialLibs.$index(fullname);
13646 if (filename == null) { 13628 if (filename == null) {
13647 filename = fullname; 13629 filename = fullname;
13648 } 13630 }
13649 if ($globals.world.files.fileExists(filename)) { 13631 if ($globals.world.files.fileExists(filename)) {
13650 return new SourceFile(filename, $globals.world.files.readAll(filename)); 13632 return new SourceFile(filename, $globals.world.files.readAll(filename));
13651 } 13633 }
13652 else { 13634 else {
13653 $globals.world.error(("File not found: " + filename)); 13635 $globals.world.error(("File not found: " + filename));
13654 return new SourceFile(filename, ""); 13636 return new SourceFile(filename, "");
13655 } 13637 }
13656 } 13638 }
13657 // ********** Code for VarMember ************** 13639 // ********** Code for VarMember **************
13658 function VarMember(name) { 13640 function VarMember(name) {
13659 this.isGenerated = false 13641 this.isGenerated = false;
13660 this.name = name; 13642 this.name = name;
13661 // Initializers done
13662 } 13643 }
13663 VarMember.prototype.get$name = function() { return this.name; }; 13644 VarMember.prototype.get$name = function() { return this.name; };
13664 VarMember.prototype.get$isGenerated = function() { return this.isGenerated; }; 13645 VarMember.prototype.get$isGenerated = function() { return this.isGenerated; };
13665 VarMember.prototype.set$isGenerated = function(value) { return this.isGenerated = value; }; 13646 VarMember.prototype.set$isGenerated = function(value) { return this.isGenerated = value; };
13666 VarMember.prototype.get$returnType = function() { 13647 VarMember.prototype.get$returnType = function() {
13667 return $globals.world.varType; 13648 return $globals.world.varType;
13668 } 13649 }
13669 VarMember.prototype.invoke = function(context, node, target, args) { 13650 VarMember.prototype.invoke = function(context, node, target, args) {
13670 return new Value(this.get$returnType(), ("" + target.get$code() + "." + this.n ame + "(" + args.getCode() + ")"), node.span, true); 13651 return new Value(this.get$returnType(), ("" + target.get$code() + "." + this.n ame + "(" + args.getCode() + ")"), node.span, true);
13671 } 13652 }
13672 VarMember.prototype.generate$1 = VarMember.prototype.generate; 13653 VarMember.prototype.generate$1 = VarMember.prototype.generate;
13673 VarMember.prototype.invoke$4 = VarMember.prototype.invoke; 13654 VarMember.prototype.invoke$4 = VarMember.prototype.invoke;
13674 // ********** Code for VarFunctionStub ************** 13655 // ********** Code for VarFunctionStub **************
13675 $inherits(VarFunctionStub, VarMember); 13656 $inherits(VarFunctionStub, VarMember);
13676 function VarFunctionStub(name, callArgs) { 13657 function VarFunctionStub(name, callArgs) {
13677 this.args = callArgs.toCallStubArgs(); 13658 this.args = callArgs.toCallStubArgs();
13678 // Initializers done
13679 VarMember.call(this, name); 13659 VarMember.call(this, name);
13680 $globals.world.functionImplType.markUsed(); 13660 $globals.world.functionImplType.markUsed();
13681 $globals.world.gen.genMethod($globals.world.functionImplType.getMember("_genSt ub")); 13661 $globals.world.gen.genMethod($globals.world.functionImplType.getMember("_genSt ub"));
13682 } 13662 }
13683 VarFunctionStub.prototype.invoke = function(context, node, target, args) { 13663 VarFunctionStub.prototype.invoke = function(context, node, target, args) {
13684 return VarMember.prototype.invoke.call(this, context, node, target, args); 13664 return VarMember.prototype.invoke.call(this, context, node, target, args);
13685 } 13665 }
13686 VarFunctionStub.prototype.generate = function(code) { 13666 VarFunctionStub.prototype.generate = function(code) {
13687 this.isGenerated = true; 13667 this.isGenerated = true;
13688 if (this.args.get$hasNames()) { 13668 if (this.args.get$hasNames()) {
(...skipping 22 matching lines...) Expand all
13711 w.enterBlock(("Function.prototype." + this.name + " = function(" + argsCode + ") {")); 13691 w.enterBlock(("Function.prototype." + this.name + " = function(" + argsCode + ") {"));
13712 w.writeln(("this." + this.name + " = this._genStub(" + this.args.get$length() + ", [\"" + named + "\"]);")); 13692 w.writeln(("this." + this.name + " = this._genStub(" + this.args.get$length() + ", [\"" + named + "\"]);"));
13713 w.writeln(("return this." + this.name + "(" + argsCode + ");")); 13693 w.writeln(("return this." + this.name + "(" + argsCode + ");"));
13714 w.exitBlock("}"); 13694 w.exitBlock("}");
13715 } 13695 }
13716 VarFunctionStub.prototype.generate$1 = VarFunctionStub.prototype.generate; 13696 VarFunctionStub.prototype.generate$1 = VarFunctionStub.prototype.generate;
13717 VarFunctionStub.prototype.invoke$4 = VarFunctionStub.prototype.invoke; 13697 VarFunctionStub.prototype.invoke$4 = VarFunctionStub.prototype.invoke;
13718 // ********** Code for VarMethodStub ************** 13698 // ********** Code for VarMethodStub **************
13719 $inherits(VarMethodStub, VarMember); 13699 $inherits(VarMethodStub, VarMember);
13720 function VarMethodStub(name, member, args, body) { 13700 function VarMethodStub(name, member, args, body) {
13701 this.body = body;
13721 this.member = member; 13702 this.member = member;
13722 this.args = args; 13703 this.args = args;
13723 this.body = body;
13724 // Initializers done
13725 VarMember.call(this, name); 13704 VarMember.call(this, name);
13726 } 13705 }
13727 VarMethodStub.prototype.get$body = function() { return this.body; }; 13706 VarMethodStub.prototype.get$body = function() { return this.body; };
13728 VarMethodStub.prototype.get$isHidden = function() { 13707 VarMethodStub.prototype.get$isHidden = function() {
13729 return this.member != null ? this.member.declaringType.get$isHiddenNativeType( ) : false; 13708 return this.member != null ? this.member.declaringType.get$isHiddenNativeType( ) : false;
13730 } 13709 }
13731 VarMethodStub.prototype.get$returnType = function() { 13710 VarMethodStub.prototype.get$returnType = function() {
13732 return this.member != null ? this.member.get$returnType() : $globals.world.var Type; 13711 return this.member != null ? this.member.get$returnType() : $globals.world.var Type;
13733 } 13712 }
13734 VarMethodStub.prototype.get$declaringType = function() { 13713 VarMethodStub.prototype.get$declaringType = function() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
13780 return method.namesInHomePositions(args); 13759 return method.namesInHomePositions(args);
13781 } 13760 }
13782 else { 13761 else {
13783 return false; 13762 return false;
13784 } 13763 }
13785 } 13764 }
13786 VarMethodStub.prototype.generate$1 = VarMethodStub.prototype.generate; 13765 VarMethodStub.prototype.generate$1 = VarMethodStub.prototype.generate;
13787 // ********** Code for VarMethodSet ************** 13766 // ********** Code for VarMethodSet **************
13788 $inherits(VarMethodSet, VarMember); 13767 $inherits(VarMethodSet, VarMember);
13789 function VarMethodSet(baseName, name, members, callArgs, returnType) { 13768 function VarMethodSet(baseName, name, members, callArgs, returnType) {
13790 this.invoked = false 13769 this.args = callArgs.toCallStubArgs();
13770 this.invoked = false;
13791 this.baseName = baseName; 13771 this.baseName = baseName;
13792 this.members = members; 13772 this.members = members;
13793 this.returnType = returnType; 13773 this.returnType = returnType;
13794 this.args = callArgs.toCallStubArgs();
13795 // Initializers done
13796 VarMember.call(this, name); 13774 VarMember.call(this, name);
13797 } 13775 }
13798 VarMethodSet.prototype.get$members = function() { return this.members; }; 13776 VarMethodSet.prototype.get$members = function() { return this.members; };
13799 VarMethodSet.prototype.get$returnType = function() { return this.returnType; }; 13777 VarMethodSet.prototype.get$returnType = function() { return this.returnType; };
13800 VarMethodSet.prototype.invoke = function(context, node, target, args) { 13778 VarMethodSet.prototype.invoke = function(context, node, target, args) {
13801 this._invokeMembers(context, node); 13779 this._invokeMembers(context, node);
13802 return VarMember.prototype.invoke.call(this, context, node, target, args); 13780 return VarMember.prototype.invoke.call(this, context, node, target, args);
13803 } 13781 }
13804 VarMethodSet.prototype._invokeMembers = function(context, node) { 13782 VarMethodSet.prototype._invokeMembers = function(context, node) {
13805 if (this.invoked) return; 13783 if (this.invoked) return;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
13951 // 1 dynamic types. 13929 // 1 dynamic types.
13952 // 1 types 13930 // 1 types
13953 // 0 !leaf 13931 // 0 !leaf
13954 // ********** Globals ************** 13932 // ********** Globals **************
13955 function $static_init(){ 13933 function $static_init(){
13956 $globals._GREEN_COLOR = "\x1b[32m"; 13934 $globals._GREEN_COLOR = "\x1b[32m";
13957 $globals._MAGENTA_COLOR = "\x1b[35m"; 13935 $globals._MAGENTA_COLOR = "\x1b[35m";
13958 $globals._NO_COLOR = "\x1b[0m"; 13936 $globals._NO_COLOR = "\x1b[0m";
13959 $globals._RED_COLOR = "\x1b[31m"; 13937 $globals._RED_COLOR = "\x1b[31m";
13960 } 13938 }
13961 var const$1 = new EmptyQueueException(); 13939 var const$0000 = Object.create(EmptyQueueException.prototype, {});
13962 var const$126 = new IllegalAccessException(); 13940 var const$0001 = Object.create(_DeletedKeySentinel.prototype, {});
13963 var const$127 = ImmutableList.ImmutableList$from$factory([]); 13941 var const$0005 = Object.create(NoMoreElementsException.prototype, {});
13964 var const$2 = new _DeletedKeySentinel(); 13942 var const$0007 = Object.create(IllegalAccessException.prototype, {});
13965 var const$7 = new NoMoreElementsException(); 13943 var const$0008 = ImmutableList.ImmutableList$from$factory([]);
13966 var $globals = {}; 13944 var $globals = {};
13967 $static_init(); 13945 $static_init();
13968 main(); 13946 main();
OLDNEW
« frog/member.dart ('K') | « frog/member.dart ('k') | frog/value.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698