| 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 $throw(e) { | 8 function $throw(e) { |
| 9 // If e is not a value, we can use V8's captureStackTrace utility method. | 9 // If e is not a value, we can use V8's captureStackTrace utility method. |
| 10 // TODO(jmesserly): capture the stack trace on other JS engines. | 10 // TODO(jmesserly): capture the stack trace on other JS engines. |
| (...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1690 table.push({tag: tag, tags: tags, map: map}); | 1690 table.push({tag: tag, tags: tags, map: map}); |
| 1691 } | 1691 } |
| 1692 $dynamicMetadata = table; | 1692 $dynamicMetadata = table; |
| 1693 } | 1693 } |
| 1694 $dynamic("end$0").WriteStream = function() { | 1694 $dynamic("end$0").WriteStream = function() { |
| 1695 return this.end(); | 1695 return this.end(); |
| 1696 }; | 1696 }; |
| 1697 $dynamic("write$1").WriteStream = function($0) { | 1697 $dynamic("write$1").WriteStream = function($0) { |
| 1698 return this.write($0, "utf8"); | 1698 return this.write($0, "utf8"); |
| 1699 }; | 1699 }; |
| 1700 // ********** Code for Fs ************** |
| 1701 Fs.from$ctor = function(_fs) { |
| 1702 this._fs = _fs; |
| 1703 } |
| 1704 Fs.from$ctor.prototype = Fs.prototype; |
| 1705 function Fs() {} |
| 1706 Fs.prototype.realpathSync = function(path) { |
| 1707 return this._fs.realpathSync(path); |
| 1708 } |
| 1709 Fs.prototype.readFileSync = function(filename, encoding) { |
| 1710 return this._fs.readFileSync(filename, encoding); |
| 1711 } |
| 1712 Fs.prototype.writeFileSync = function(filename, data, encoding) { |
| 1713 this._fs.writeFileSync(filename, data, encoding); |
| 1714 } |
| 1700 // ********** Code for fs_FSWatcher ************** | 1715 // ********** Code for fs_FSWatcher ************** |
| 1701 // ********** Code for top level ************** | 1716 // ********** Code for top level ************** |
| 1702 function get$fs() { | 1717 function get$fs() { |
| 1703 return require("fs"); | 1718 return new Fs.from$ctor(require("fs")); |
| 1704 } | 1719 } |
| 1705 // ********** Library node ************** | 1720 // ********** Library node ************** |
| 1706 // ********** Code for Process ************** | 1721 // ********** Code for Process ************** |
| 1707 function Process(_process) { | 1722 function Process(_process) { |
| 1708 this.SIGSYS = "SIGSYS"; | 1723 this.SIGSYS = "SIGSYS"; |
| 1709 this.SIGALRM = "SIGALRM"; | 1724 this.SIGALRM = "SIGALRM"; |
| 1710 this.SIGXCPU = "SIGXCPU"; | 1725 this.SIGXCPU = "SIGXCPU"; |
| 1711 this.SIGTSTP = "SIGTSTP"; | 1726 this.SIGTSTP = "SIGTSTP"; |
| 1712 this.SIGSEGV = "SIGSEGV"; | 1727 this.SIGSEGV = "SIGSEGV"; |
| 1713 this.SIGQUIT = "SIGQUIT"; | 1728 this.SIGQUIT = "SIGQUIT"; |
| (...skipping 9568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11282 } | 11297 } |
| 11283 Type.prototype.get$isJsGlobalObject = function() { | 11298 Type.prototype.get$isJsGlobalObject = function() { |
| 11284 return (this.get$nativeType() != null && this.get$nativeType().isJsGlobalObjec
t); | 11299 return (this.get$nativeType() != null && this.get$nativeType().isJsGlobalObjec
t); |
| 11285 } | 11300 } |
| 11286 Type.prototype.get$hasTypeParams = function() { | 11301 Type.prototype.get$hasTypeParams = function() { |
| 11287 return false; | 11302 return false; |
| 11288 } | 11303 } |
| 11289 Type.prototype.get$typeofName = function() { | 11304 Type.prototype.get$typeofName = function() { |
| 11290 return null; | 11305 return null; |
| 11291 } | 11306 } |
| 11307 Type.prototype.get$fullname = function() { |
| 11308 return this.get$library().name != null ? ("" + this.get$library().name + "." +
this.name) : this.name; |
| 11309 } |
| 11292 Type.prototype.get$members = function() { | 11310 Type.prototype.get$members = function() { |
| 11293 return null; | 11311 return null; |
| 11294 } | 11312 } |
| 11295 Type.prototype.get$definition = function() { | 11313 Type.prototype.get$definition = function() { |
| 11296 return null; | 11314 return null; |
| 11297 } | 11315 } |
| 11298 Type.prototype.get$factories = function() { | 11316 Type.prototype.get$factories = function() { |
| 11299 return null; | 11317 return null; |
| 11300 } | 11318 } |
| 11301 Type.prototype.get$typeArgsInOrder = function() { | 11319 Type.prototype.get$typeArgsInOrder = function() { |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12134 } | 12152 } |
| 12135 if (!typeArg.get$isVar()) allVar = false; | 12153 if (!typeArg.get$isVar()) allVar = false; |
| 12136 var paramName = this.typeParameters.$index(i).get$name(); | 12154 var paramName = this.typeParameters.$index(i).get$name(); |
| 12137 typeMap.$setindex(paramName, typeArg); | 12155 typeMap.$setindex(paramName, typeArg); |
| 12138 names.add(typeArg.get$name()); | 12156 names.add(typeArg.get$name()); |
| 12139 jsnames.add(typeArg.get$jsname()); | 12157 jsnames.add(typeArg.get$jsname()); |
| 12140 } | 12158 } |
| 12141 if (allVar) return this; | 12159 if (allVar) return this; |
| 12142 var jsname = ("" + this.get$jsname() + "_" + Strings.join(jsnames, "$")); | 12160 var jsname = ("" + this.get$jsname() + "_" + Strings.join(jsnames, "$")); |
| 12143 var simpleName = ("" + this.name + "<" + Strings.join(names, ", ") + ">"); | 12161 var simpleName = ("" + this.name + "<" + Strings.join(names, ", ") + ">"); |
| 12144 var key = Strings.join(names, "$"); | 12162 var ret = this._concreteTypes.$index(jsname); |
| 12145 var ret = this._concreteTypes.$index(key); | |
| 12146 if ($eq(ret)) { | 12163 if ($eq(ret)) { |
| 12147 ret = new DefinedType(simpleName, this.library, this.definition, this.isClas
s); | 12164 ret = new DefinedType(simpleName, this.library, this.definition, this.isClas
s); |
| 12148 ret.set$baseGenericType(this); | 12165 ret.set$baseGenericType(this); |
| 12149 ret.set$typeArgsInOrder(typeArgs); | 12166 ret.set$typeArgsInOrder(typeArgs); |
| 12150 ret.set$_jsname(jsname); | 12167 ret.set$_jsname(jsname); |
| 12151 this._concreteTypes.$setindex(key, ret); | 12168 this._concreteTypes.$setindex(jsname, ret); |
| 12152 ret.resolve(); | 12169 ret.resolve(); |
| 12153 } | 12170 } |
| 12154 return ret; | 12171 return ret; |
| 12155 } | 12172 } |
| 12156 DefinedType.prototype.getCallStub = function(args) { | 12173 DefinedType.prototype.getCallStub = function(args) { |
| 12157 var name = _getCallStubName("call", args); | 12174 var name = _getCallStubName("call", args); |
| 12158 var stub = this.varStubs.$index(name); | 12175 var stub = this.varStubs.$index(name); |
| 12159 if ($eq(stub)) { | 12176 if ($eq(stub)) { |
| 12160 stub = new VarFunctionStub(name, args); | 12177 stub = new VarFunctionStub(name, args); |
| 12161 this.varStubs.$setindex(name, stub); | 12178 this.varStubs.$setindex(name, stub); |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12704 testCode = $add("!", testCode); | 12721 testCode = $add("!", testCode); |
| 12705 } | 12722 } |
| 12706 if ($ne(this, temp)) context.freeTemp(temp); | 12723 if ($ne(this, temp)) context.freeTemp(temp); |
| 12707 if (!$globals.world.objectType.varStubs.containsKey(checkName)) { | 12724 if (!$globals.world.objectType.varStubs.containsKey(checkName)) { |
| 12708 $globals.world.objectType.varStubs.$setindex(checkName, new VarMethodStub(
checkName, null, Arguments.get$EMPTY(), "return false")); | 12725 $globals.world.objectType.varStubs.$setindex(checkName, new VarMethodStub(
checkName, null, Arguments.get$EMPTY(), "return false")); |
| 12709 } | 12726 } |
| 12710 } | 12727 } |
| 12711 return new Value($globals.world.nonNullBool, testCode, span); | 12728 return new Value($globals.world.nonNullBool, testCode, span); |
| 12712 } | 12729 } |
| 12713 Value.prototype.convertWarning = function(toType) { | 12730 Value.prototype.convertWarning = function(toType) { |
| 12714 $globals.world.warning(("type \"" + this.get$type().name + "\" is not assignab
le to \"" + toType.name + "\""), this.span); | 12731 $globals.world.warning(("type \"" + this.get$type().get$fullname() + "\" is no
t assignable to \"" + toType.get$fullname() + "\""), this.span); |
| 12715 } | 12732 } |
| 12716 Value.prototype.invokeNoSuchMethod = function(context, name, node, args) { | 12733 Value.prototype.invokeNoSuchMethod = function(context, name, node, args) { |
| 12717 if (this.get$isType()) { | 12734 if (this.get$isType()) { |
| 12718 $globals.world.error(("member lookup failed for \"" + name + "\""), node.spa
n); | 12735 $globals.world.error(("member lookup failed for \"" + name + "\""), node.spa
n); |
| 12719 } | 12736 } |
| 12720 var pos = ""; | 12737 var pos = ""; |
| 12721 if (args != null) { | 12738 if (args != null) { |
| 12722 var argsCode = []; | 12739 var argsCode = []; |
| 12723 for (var i = (0); | 12740 for (var i = (0); |
| 12724 i < args.get$length(); i++) { | 12741 i < args.get$length(); i++) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12787 } | 12804 } |
| 12788 PureStaticValue.prototype.set_ = function(context, name, node, value, kind, retu
rnKind) { | 12805 PureStaticValue.prototype.set_ = function(context, name, node, value, kind, retu
rnKind) { |
| 12789 if (this.get$type().get$isVar()) return new PureStaticValue($globals.world.var
Type, node.span, false, false); | 12806 if (this.get$type().get$isVar()) return new PureStaticValue($globals.world.var
Type, node.span, false, false); |
| 12790 var member = this.getMem(context, name, node); | 12807 var member = this.getMem(context, name, node); |
| 12791 if ($ne(member)) { | 12808 if ($ne(member)) { |
| 12792 member._set(context, node, this, value); | 12809 member._set(context, node, this, value); |
| 12793 } | 12810 } |
| 12794 return new PureStaticValue(value.get$type(), node.span, false, false); | 12811 return new PureStaticValue(value.get$type(), node.span, false, false); |
| 12795 } | 12812 } |
| 12796 PureStaticValue.prototype.setIndex = function(context, index, node, value, kind,
returnKind) { | 12813 PureStaticValue.prototype.setIndex = function(context, index, node, value, kind,
returnKind) { |
| 12797 return this.invoke(context, ":setindex", node, new Arguments(null, [index, val
ue])); | 12814 var tmp = this.invoke(context, ":setindex", node, new Arguments(null, [index,
value])); |
| 12815 return new PureStaticValue(value.get$type(), node.span, false, false); |
| 12798 } | 12816 } |
| 12799 PureStaticValue.prototype.unop = function(kind, context, node) { | 12817 PureStaticValue.prototype.unop = function(kind, context, node) { |
| 12800 switch (kind) { | 12818 switch (kind) { |
| 12801 case (19): | 12819 case (19): |
| 12802 | 12820 |
| 12803 return new PureStaticValue($globals.world.boolType, node.get$span(), false
, false); | 12821 return new PureStaticValue($globals.world.boolType, node.get$span(), false
, false); |
| 12804 | 12822 |
| 12805 case (42): | 12823 case (42): |
| 12806 | 12824 |
| 12807 if (!this.isConst && !this.get$type().get$isNum()) { | 12825 if (!this.isConst && !this.get$type().get$isNum()) { |
| (...skipping 1799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14607 } | 14625 } |
| 14608 var const$0000 = Object.create(_DeletedKeySentinel.prototype, {}); | 14626 var const$0000 = Object.create(_DeletedKeySentinel.prototype, {}); |
| 14609 var const$0001 = Object.create(NoMoreElementsException.prototype, {}); | 14627 var const$0001 = Object.create(NoMoreElementsException.prototype, {}); |
| 14610 var const$0002 = Object.create(EmptyQueueException.prototype, {}); | 14628 var const$0002 = Object.create(EmptyQueueException.prototype, {}); |
| 14611 var const$0006 = Object.create(IllegalAccessException.prototype, {}); | 14629 var const$0006 = Object.create(IllegalAccessException.prototype, {}); |
| 14612 var const$0007 = ImmutableList.ImmutableList$from$factory([]); | 14630 var const$0007 = ImmutableList.ImmutableList$from$factory([]); |
| 14613 var const$0009 = new JSSyntaxRegExp("^[a-zA-Z]:/"); | 14631 var const$0009 = new JSSyntaxRegExp("^[a-zA-Z]:/"); |
| 14614 var $globals = {}; | 14632 var $globals = {}; |
| 14615 $static_init(); | 14633 $static_init(); |
| 14616 main(); | 14634 main(); |
| OLD | NEW |