| 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 $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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 return this.some(to$call$1($0)); | 628 return this.some(to$call$1($0)); |
| 629 }, enumerable: false, configurable: true }); | 629 }, enumerable: false, configurable: true }); |
| 630 Object.defineProperty(ListFactory.prototype, "sort$1", { value: function($0) { | 630 Object.defineProperty(ListFactory.prototype, "sort$1", { value: function($0) { |
| 631 return this.sort(to$call$2($0)); | 631 return this.sort(to$call$2($0)); |
| 632 }, enumerable: false, configurable: true }); | 632 }, enumerable: false, configurable: true }); |
| 633 ListFactory_E = ListFactory; | 633 ListFactory_E = ListFactory; |
| 634 ListFactory_Expression = ListFactory; | 634 ListFactory_Expression = ListFactory; |
| 635 ListFactory_K = ListFactory; | 635 ListFactory_K = ListFactory; |
| 636 ListFactory_dart_core_String = ListFactory; | 636 ListFactory_dart_core_String = ListFactory; |
| 637 ListFactory_V = ListFactory; | 637 ListFactory_V = ListFactory; |
| 638 ListFactory_Value = ListFactory; | |
| 639 ListFactory_int = ListFactory; | 638 ListFactory_int = ListFactory; |
| 640 // ********** Code for ListIterator ************** | 639 // ********** Code for ListIterator ************** |
| 641 function ListIterator(array) { | 640 function ListIterator(array) { |
| 642 this._array = array; | 641 this._array = array; |
| 643 this._pos = (0); | 642 this._pos = (0); |
| 644 } | 643 } |
| 645 ListIterator.prototype.hasNext = function() { | 644 ListIterator.prototype.hasNext = function() { |
| 646 return this._array.get$length() > this._pos; | 645 return this._array.get$length() > this._pos; |
| 647 } | 646 } |
| 648 ListIterator.prototype.next = function() { | 647 ListIterator.prototype.next = function() { |
| (...skipping 3554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4203 } | 4202 } |
| 4204 $globals.world.listFactoryType.markUsed(); | 4203 $globals.world.listFactoryType.markUsed(); |
| 4205 var ret = new ListValue(argValues, node.isConst, listType, node.span); | 4204 var ret = new ListValue(argValues, node.isConst, listType, node.span); |
| 4206 if (ret.get$isConst()) return ret.getGlobalValue$0(); | 4205 if (ret.get$isConst()) return ret.getGlobalValue$0(); |
| 4207 return ret; | 4206 return ret; |
| 4208 } | 4207 } |
| 4209 MethodGenerator.prototype.visitMapExpression = function(node) { | 4208 MethodGenerator.prototype.visitMapExpression = function(node) { |
| 4210 if (node.items.get$length() == (0) && !node.isConst) { | 4209 if (node.items.get$length() == (0) && !node.isConst) { |
| 4211 return $globals.world.mapType.getConstructor("").invoke$4(this, node, new Va
lue.type$ctor($globals.world.mapType, node.span), Arguments.get$EMPTY()); | 4210 return $globals.world.mapType.getConstructor("").invoke$4(this, node, new Va
lue.type$ctor($globals.world.mapType, node.span), Arguments.get$EMPTY()); |
| 4212 } | 4211 } |
| 4213 var values = new Array(); | 4212 var values = []; |
| 4214 var valueType = $globals.world.varType, keyType = $globals.world.stringType; | 4213 var valueType = $globals.world.varType, keyType = $globals.world.stringType; |
| 4215 var mapType = $globals.world.mapType; | 4214 var mapType = $globals.world.mapType; |
| 4216 if (node.valueType != null) { | 4215 if (node.valueType != null) { |
| 4217 if (node.keyType != null) { | 4216 if (node.keyType != null) { |
| 4218 keyType = this.method.resolveType(node.keyType, true); | 4217 keyType = this.method.resolveType(node.keyType, true); |
| 4219 if (!keyType.get$isString()) { | 4218 if (!keyType.get$isString()) { |
| 4220 $globals.world.error("the key type of a map literal must be \"String\"",
keyType.get$span()); | 4219 $globals.world.error("the key type of a map literal must be \"String\"",
keyType.get$span()); |
| 4221 } | 4220 } |
| 4222 if (node.isConst && ((keyType instanceof ParameterType) || keyType.get$has
TypeParams())) { | 4221 if (node.isConst && ((keyType instanceof ParameterType) || keyType.get$has
TypeParams())) { |
| 4223 $globals.world.error("type parameter cannot be used in const map literal
s"); | 4222 $globals.world.error("type parameter cannot be used in const map literal
s"); |
| (...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6767 return this._finishToken(kind); | 6766 return this._finishToken(kind); |
| 6768 } | 6767 } |
| 6769 TokenizerBase.prototype._makeStringToken = function(buf, isPart) { | 6768 TokenizerBase.prototype._makeStringToken = function(buf, isPart) { |
| 6770 var s = Strings.String$fromCharCodes$factory(buf); | 6769 var s = Strings.String$fromCharCodes$factory(buf); |
| 6771 var kind = isPart ? (59) : (58); | 6770 var kind = isPart ? (59) : (58); |
| 6772 return new LiteralToken(kind, this._source, this._startIndex, this._lang_index
, s); | 6771 return new LiteralToken(kind, this._source, this._startIndex, this._lang_index
, s); |
| 6773 } | 6772 } |
| 6774 TokenizerBase.prototype._makeRawStringToken = function(isMultiline) { | 6773 TokenizerBase.prototype._makeRawStringToken = function(isMultiline) { |
| 6775 var s; | 6774 var s; |
| 6776 if (isMultiline) { | 6775 if (isMultiline) { |
| 6777 if (this._source.get$text()[this._startIndex + (4)] == "\n") { | 6776 var start = this._startIndex + (4); |
| 6778 s = this._source.get$text().substring(this._startIndex + (5), this._lang_i
ndex - (3)); | 6777 if (this._source.get$text()[start] == "\n") start++; |
| 6779 } | 6778 s = this._source.get$text().substring(start, this._lang_index - (3)); |
| 6780 else { | |
| 6781 s = this._source.get$text().substring(this._startIndex + (4), this._lang_i
ndex - (3)); | |
| 6782 } | |
| 6783 } | 6779 } |
| 6784 else { | 6780 else { |
| 6785 s = this._source.get$text().substring(this._startIndex + (2), this._lang_ind
ex - (1)); | 6781 s = this._source.get$text().substring(this._startIndex + (2), this._lang_ind
ex - (1)); |
| 6786 } | 6782 } |
| 6787 return new LiteralToken((58), this._source, this._startIndex, this._lang_index
, s); | 6783 return new LiteralToken((58), this._source, this._startIndex, this._lang_index
, s); |
| 6788 } | 6784 } |
| 6789 TokenizerBase.prototype.finishMultilineString = function(quote) { | 6785 TokenizerBase.prototype.finishMultilineString = function(quote) { |
| 6790 var buf = new Array(); | 6786 var buf = []; |
| 6791 while (true) { | 6787 while (true) { |
| 6792 var ch = this._nextChar(); | 6788 var ch = this._nextChar(); |
| 6793 if (ch == (0)) { | 6789 if (ch == (0)) { |
| 6794 return this._errorToken(); | 6790 return this._errorToken(); |
| 6795 } | 6791 } |
| 6796 else if (ch == quote) { | 6792 else if (ch == quote) { |
| 6797 if (this._maybeEatChar(quote)) { | 6793 if (this._maybeEatChar(quote)) { |
| 6798 if (this._maybeEatChar(quote)) { | 6794 if (this._maybeEatChar(quote)) { |
| 6799 return this._makeStringToken(buf, false); | 6795 return this._makeStringToken(buf, false); |
| 6800 } | 6796 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6850 } | 6846 } |
| 6851 } | 6847 } |
| 6852 return this.finishStringBody(quote); | 6848 return this.finishStringBody(quote); |
| 6853 } | 6849 } |
| 6854 TokenizerBase.prototype.finishRawString = function(quote) { | 6850 TokenizerBase.prototype.finishRawString = function(quote) { |
| 6855 if (this._maybeEatChar(quote)) { | 6851 if (this._maybeEatChar(quote)) { |
| 6856 if (this._maybeEatChar(quote)) { | 6852 if (this._maybeEatChar(quote)) { |
| 6857 return this.finishMultilineRawString(quote); | 6853 return this.finishMultilineRawString(quote); |
| 6858 } | 6854 } |
| 6859 else { | 6855 else { |
| 6860 return this._makeStringToken(new Array(), false); | 6856 return this._makeStringToken([], false); |
| 6861 } | 6857 } |
| 6862 } | 6858 } |
| 6863 while (true) { | 6859 while (true) { |
| 6864 var ch = this._nextChar(); | 6860 var ch = this._nextChar(); |
| 6865 if (ch == quote) { | 6861 if (ch == quote) { |
| 6866 return this._makeRawStringToken(false); | 6862 return this._makeRawStringToken(false); |
| 6867 } | 6863 } |
| 6868 else if (ch == (0)) { | 6864 else if (ch == (0)) { |
| 6869 return this._errorToken(); | 6865 return this._errorToken(); |
| 6870 } | 6866 } |
| (...skipping 5480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12351 Value.prototype.unop$3 = Value.prototype.unop; | 12347 Value.prototype.unop$3 = Value.prototype.unop; |
| 12352 // ********** Code for EvaluatedValue ************** | 12348 // ********** Code for EvaluatedValue ************** |
| 12353 $inherits(EvaluatedValue, Value); | 12349 $inherits(EvaluatedValue, Value); |
| 12354 function EvaluatedValue(isConst, type, span) { | 12350 function EvaluatedValue(isConst, type, span) { |
| 12355 this.isConst = isConst; | 12351 this.isConst = isConst; |
| 12356 Value.call(this, type, "@@@", span, false); | 12352 Value.call(this, type, "@@@", span, false); |
| 12357 } | 12353 } |
| 12358 EvaluatedValue.prototype.get$isConst = function() { return this.isConst; }; | 12354 EvaluatedValue.prototype.get$isConst = function() { return this.isConst; }; |
| 12359 EvaluatedValue.prototype.set$isConst = function(value) { return this.isConst = v
alue; }; | 12355 EvaluatedValue.prototype.set$isConst = function(value) { return this.isConst = v
alue; }; |
| 12360 EvaluatedValue.prototype.get$code = function() { | 12356 EvaluatedValue.prototype.get$code = function() { |
| 12361 return "@@@"; | 12357 $globals.world.internalError("Should not be getting code from raw EvaluatedVal
ue", this.span); |
| 12362 } | 12358 } |
| 12363 EvaluatedValue.prototype.hashCode = function() { | 12359 EvaluatedValue.prototype.hashCode = function() { |
| 12364 return this.get$code().hashCode(); | 12360 return this.get$code().hashCode(); |
| 12365 } | 12361 } |
| 12366 EvaluatedValue.prototype.$eq = function(other) { | 12362 EvaluatedValue.prototype.$eq = function(other) { |
| 12367 return (other instanceof EvaluatedValue) && $eq(other.get$type(), this.get$typ
e()) && $eq(other.get$code(), this.get$code()); | 12363 return (other instanceof EvaluatedValue) && $eq(other.get$type(), this.get$typ
e()) && $eq(other.get$code(), this.get$code()); |
| 12368 } | 12364 } |
| 12369 EvaluatedValue.prototype.hashCode$0 = EvaluatedValue.prototype.hashCode; | 12365 EvaluatedValue.prototype.hashCode$0 = EvaluatedValue.prototype.hashCode; |
| 12370 // ********** Code for NullValue ************** | 12366 // ********** Code for NullValue ************** |
| 12371 $inherits(NullValue, EvaluatedValue); | 12367 $inherits(NullValue, EvaluatedValue); |
| (...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13978 $globals._RED_COLOR = "\x1b[31m"; | 13974 $globals._RED_COLOR = "\x1b[31m"; |
| 13979 } | 13975 } |
| 13980 var const$0000 = Object.create(EmptyQueueException.prototype, {}); | 13976 var const$0000 = Object.create(EmptyQueueException.prototype, {}); |
| 13981 var const$0001 = Object.create(_DeletedKeySentinel.prototype, {}); | 13977 var const$0001 = Object.create(_DeletedKeySentinel.prototype, {}); |
| 13982 var const$0005 = Object.create(NoMoreElementsException.prototype, {}); | 13978 var const$0005 = Object.create(NoMoreElementsException.prototype, {}); |
| 13983 var const$0007 = Object.create(IllegalAccessException.prototype, {}); | 13979 var const$0007 = Object.create(IllegalAccessException.prototype, {}); |
| 13984 var const$0008 = ImmutableList.ImmutableList$from$factory([]); | 13980 var const$0008 = ImmutableList.ImmutableList$from$factory([]); |
| 13985 var $globals = {}; | 13981 var $globals = {}; |
| 13986 $static_init(); | 13982 $static_init(); |
| 13987 main(); | 13983 main(); |
| OLD | NEW |