| OLD | NEW |
| 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 $defProp(obj, prop, value) { | 4 function $defProp(obj, prop, value) { |
| 5 Object.defineProperty(obj, prop, | 5 Object.defineProperty(obj, prop, |
| 6 {value: value, enumerable: false, writable: true, configurable: true}); | 6 {value: value, enumerable: false, writable: true, configurable: true}); |
| 7 } | 7 } |
| 8 Function.prototype.bind = Function.prototype.bind || | 8 Function.prototype.bind = Function.prototype.bind || |
| 9 function(thisObj) { | 9 function(thisObj) { |
| 10 var func = this; | 10 var func = this; |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 BadNumberFormatException.prototype.toString = function() { | 533 BadNumberFormatException.prototype.toString = function() { |
| 534 return ("BadNumberFormatException: '" + this._s + "'"); | 534 return ("BadNumberFormatException: '" + this._s + "'"); |
| 535 } | 535 } |
| 536 BadNumberFormatException.prototype.toString$0 = BadNumberFormatException.prototy
pe.toString; | 536 BadNumberFormatException.prototype.toString$0 = BadNumberFormatException.prototy
pe.toString; |
| 537 // ********** Code for NullPointerException ************** | 537 // ********** Code for NullPointerException ************** |
| 538 function NullPointerException(functionName, arguments) { | 538 function NullPointerException(functionName, arguments) { |
| 539 this.functionName = functionName; | 539 this.functionName = functionName; |
| 540 this.arguments = arguments; | 540 this.arguments = arguments; |
| 541 } | 541 } |
| 542 NullPointerException.prototype.toString = function() { | 542 NullPointerException.prototype.toString = function() { |
| 543 var sb = new StringBufferImpl(""); | |
| 544 if (this.arguments != null) { | |
| 545 var $$list = this.arguments; | |
| 546 for (var $$i = $$list.iterator(); $$i.hasNext(); ) { | |
| 547 var arg = $$i.next(); | |
| 548 if (!sb.isEmpty()) sb.add(", "); | |
| 549 sb.add(arg); | |
| 550 } | |
| 551 } | |
| 552 if (this.functionName == null) { | 543 if (this.functionName == null) { |
| 553 return this.get$exceptionName(); | 544 return this.get$exceptionName(); |
| 554 } | 545 } |
| 555 else { | 546 else { |
| 556 return (("" + this.get$exceptionName() + " : method: '" + this.functionName
+ "'\n") + "Receiver: null\n" + ("Arguments: [" + sb + "]")); | 547 return (("" + this.get$exceptionName() + " : method: '" + this.functionName
+ "'\n") + "Receiver: null\n" + ("Arguments: " + this.arguments)); |
| 557 } | 548 } |
| 558 } | 549 } |
| 559 NullPointerException.prototype.get$exceptionName = function() { | 550 NullPointerException.prototype.get$exceptionName = function() { |
| 560 return "NullPointerException"; | 551 return "NullPointerException"; |
| 561 } | 552 } |
| 562 NullPointerException.prototype.toString$0 = NullPointerException.prototype.toStr
ing; | 553 NullPointerException.prototype.toString$0 = NullPointerException.prototype.toStr
ing; |
| 563 // ********** Code for NoMoreElementsException ************** | 554 // ********** Code for NoMoreElementsException ************** |
| 564 function NoMoreElementsException() { | 555 function NoMoreElementsException() { |
| 565 | 556 |
| 566 } | 557 } |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 } | 666 } |
| 676 dartEx.stack = stack; | 667 dartEx.stack = stack; |
| 677 return dartEx; | 668 return dartEx; |
| 678 } | 669 } |
| 679 | 670 |
| 680 if (e instanceof TypeError) { | 671 if (e instanceof TypeError) { |
| 681 switch(e.type) { | 672 switch(e.type) { |
| 682 case 'property_not_function': | 673 case 'property_not_function': |
| 683 case 'called_non_callable': | 674 case 'called_non_callable': |
| 684 if (e.arguments[0] == null) { | 675 if (e.arguments[0] == null) { |
| 685 return attachStack(new NullPointerException()); | 676 return attachStack(new NullPointerException(null, [])); |
| 686 } else { | 677 } else { |
| 687 return attachStack(new ObjectNotClosureException()); | 678 return attachStack(new ObjectNotClosureException()); |
| 688 } | 679 } |
| 689 break; | 680 break; |
| 690 case 'non_object_property_call': | 681 case 'non_object_property_call': |
| 691 case 'non_object_property_load': | 682 case 'non_object_property_load': |
| 692 return attachStack(new NullPointerException()); | 683 return attachStack(new NullPointerException(null, [])); |
| 693 break; | 684 break; |
| 694 case 'undefined_method': | 685 case 'undefined_method': |
| 695 var mname = e.arguments[0]; | 686 var mname = e.arguments[0]; |
| 696 if (typeof(mname) == 'string' && (mname.indexOf('call$') == 0 | 687 if (typeof(mname) == 'string' && (mname.indexOf('call$') == 0 |
| 697 || mname == 'call' || mname == 'apply')) { | 688 || mname == 'call' || mname == 'apply')) { |
| 698 return attachStack(new ObjectNotClosureException()); | 689 return attachStack(new ObjectNotClosureException()); |
| 699 } else { | 690 } else { |
| 700 // TODO(jmesserly): fix noSuchMethod on operators so we don't hit this | 691 // TODO(jmesserly): fix noSuchMethod on operators so we don't hit this |
| 701 return attachStack(new NoSuchMethodException('', e.arguments[0], [])); | 692 return attachStack(new NoSuchMethodException('', e.arguments[0], [])); |
| 702 } | 693 } |
| (...skipping 14483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15186 var $globals = {}; | 15177 var $globals = {}; |
| 15187 $static_init(); | 15178 $static_init(); |
| 15188 if (typeof window != 'undefined' && typeof document != 'undefined' && | 15179 if (typeof window != 'undefined' && typeof document != 'undefined' && |
| 15189 window.addEventListener && document.readyState == 'loading') { | 15180 window.addEventListener && document.readyState == 'loading') { |
| 15190 window.addEventListener('DOMContentLoaded', function(e) { | 15181 window.addEventListener('DOMContentLoaded', function(e) { |
| 15191 main(); | 15182 main(); |
| 15192 }); | 15183 }); |
| 15193 } else { | 15184 } else { |
| 15194 main(); | 15185 main(); |
| 15195 } | 15186 } |
| OLD | NEW |