| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return (tmp < 0) ? Math.ceil(tmp) : Math.floor(tmp); | 128 return (tmp < 0) ? Math.ceil(tmp) : Math.floor(tmp); |
| 129 } else { | 129 } else { |
| 130 return x.$truncdiv(y); | 130 return x.$truncdiv(y); |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 // ********** Code for Object ************** | 133 // ********** Code for Object ************** |
| 134 $defProp(Object.prototype, "get$dynamic", function() { | 134 $defProp(Object.prototype, "get$dynamic", function() { |
| 135 "use strict"; return this; | 135 "use strict"; return this; |
| 136 }); | 136 }); |
| 137 $defProp(Object.prototype, "noSuchMethod", function(name, args) { | 137 $defProp(Object.prototype, "noSuchMethod", function(name, args) { |
| 138 $throw(new NoSuchMethodException(this, name, args)); | 138 $throw(new NoSuchMethodException(this, name, args, "")); |
| 139 }); | 139 }); |
| 140 $defProp(Object.prototype, "_pushBlock$1", function($0) { | 140 $defProp(Object.prototype, "_pushBlock$1", function($0) { |
| 141 return this.noSuchMethod("_pushBlock", [$0]); | 141 return this.noSuchMethod("_pushBlock", [$0]); |
| 142 }); | 142 }); |
| 143 $defProp(Object.prototype, "analyze$1", function($0) { | 143 $defProp(Object.prototype, "analyze$1", function($0) { |
| 144 return this.noSuchMethod("analyze", [$0]); | 144 return this.noSuchMethod("analyze", [$0]); |
| 145 }); | 145 }); |
| 146 $defProp(Object.prototype, "contains$1", function($0) { | 146 $defProp(Object.prototype, "contains$1", function($0) { |
| 147 return this.noSuchMethod("contains", [$0]); | 147 return this.noSuchMethod("contains", [$0]); |
| 148 }); | 148 }); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 }); | 190 }); |
| 191 $defProp(Object.prototype, "substring$1", function($0) { | 191 $defProp(Object.prototype, "substring$1", function($0) { |
| 192 return this.noSuchMethod("substring", [$0]); | 192 return this.noSuchMethod("substring", [$0]); |
| 193 }); | 193 }); |
| 194 $defProp(Object.prototype, "toString$0", function() { | 194 $defProp(Object.prototype, "toString$0", function() { |
| 195 return this.toString(); | 195 return this.toString(); |
| 196 }); | 196 }); |
| 197 $defProp(Object.prototype, "visitBinaryExpression$1", function($0) { | 197 $defProp(Object.prototype, "visitBinaryExpression$1", function($0) { |
| 198 return this.noSuchMethod("visitBinaryExpression", [$0]); | 198 return this.noSuchMethod("visitBinaryExpression", [$0]); |
| 199 }); | 199 }); |
| 200 $defProp(Object.prototype, "visitCallExpression$1", function($0) { |
| 201 return this.noSuchMethod("visitCallExpression", [$0]); |
| 202 }); |
| 200 $defProp(Object.prototype, "visitPostfixExpression$1", function($0) { | 203 $defProp(Object.prototype, "visitPostfixExpression$1", function($0) { |
| 201 return this.noSuchMethod("visitPostfixExpression", [$0]); | 204 return this.noSuchMethod("visitPostfixExpression", [$0]); |
| 202 }); | 205 }); |
| 203 $defProp(Object.prototype, "write$1", function($0) { | 206 $defProp(Object.prototype, "write$1", function($0) { |
| 204 return this.noSuchMethod("write", [$0]); | 207 return this.noSuchMethod("write", [$0]); |
| 205 }); | 208 }); |
| 206 // ********** Code for Clock ************** | 209 // ********** Code for Clock ************** |
| 207 function Clock() {} | 210 function Clock() {} |
| 208 Clock.now = function() { | 211 Clock.now = function() { |
| 209 return new Date().getTime(); | 212 return new Date().getTime(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 222 IndexOutOfRangeException.prototype.toString$0 = IndexOutOfRangeException.prototy
pe.toString; | 225 IndexOutOfRangeException.prototype.toString$0 = IndexOutOfRangeException.prototy
pe.toString; |
| 223 // ********** Code for IllegalAccessException ************** | 226 // ********** Code for IllegalAccessException ************** |
| 224 function IllegalAccessException() { | 227 function IllegalAccessException() { |
| 225 | 228 |
| 226 } | 229 } |
| 227 IllegalAccessException.prototype.toString = function() { | 230 IllegalAccessException.prototype.toString = function() { |
| 228 return "Attempt to modify an immutable object"; | 231 return "Attempt to modify an immutable object"; |
| 229 } | 232 } |
| 230 IllegalAccessException.prototype.toString$0 = IllegalAccessException.prototype.t
oString; | 233 IllegalAccessException.prototype.toString$0 = IllegalAccessException.prototype.t
oString; |
| 231 // ********** Code for NoSuchMethodException ************** | 234 // ********** Code for NoSuchMethodException ************** |
| 232 function NoSuchMethodException(_receiver, _functionName, _arguments) { | 235 function NoSuchMethodException(_receiver, _functionName, _arguments, _extraMessa
ge) { |
| 233 this._receiver = _receiver; | 236 this._receiver = _receiver; |
| 234 this._functionName = _functionName; | 237 this._functionName = _functionName; |
| 238 this._extraMessage = _extraMessage; |
| 235 this._arguments = _arguments; | 239 this._arguments = _arguments; |
| 236 } | 240 } |
| 237 NoSuchMethodException.prototype.toString = function() { | 241 NoSuchMethodException.prototype.toString = function() { |
| 238 var sb = new StringBufferImpl(""); | 242 var sb = new StringBufferImpl(""); |
| 239 for (var i = (0); | 243 for (var i = (0); |
| 240 i < this._arguments.get$length(); i++) { | 244 i < this._arguments.get$length(); i++) { |
| 241 if (i > (0)) { | 245 if (i > (0)) { |
| 242 sb.add(", "); | 246 sb.add(", "); |
| 243 } | 247 } |
| 244 sb.add(this._arguments.$index(i)); | 248 sb.add(this._arguments.$index(i)); |
| 245 } | 249 } |
| 246 sb.add("]"); | 250 sb.add("]"); |
| 247 return $add(("NoSuchMethodException - receiver: '" + this._receiver + "' "), (
"function name: '" + this._functionName + "' arguments: [" + sb + "]")); | 251 var x = this._extraMessage; |
| 252 return $add(("NoSuchMethodException - receiver: '" + this._receiver + "' "), (
"function name: '" + this._functionName + "' arguments: [" + sb + "]" + x)); |
| 248 } | 253 } |
| 249 NoSuchMethodException.prototype.toString$0 = NoSuchMethodException.prototype.toS
tring; | 254 NoSuchMethodException.prototype.toString$0 = NoSuchMethodException.prototype.toS
tring; |
| 250 // ********** Code for ClosureArgumentMismatchException ************** | 255 // ********** Code for ClosureArgumentMismatchException ************** |
| 251 function ClosureArgumentMismatchException() { | 256 function ClosureArgumentMismatchException() { |
| 252 | 257 |
| 253 } | 258 } |
| 254 ClosureArgumentMismatchException.prototype.toString = function() { | 259 ClosureArgumentMismatchException.prototype.toString = function() { |
| 255 return "Closure argument mismatch"; | 260 return "Closure argument mismatch"; |
| 256 } | 261 } |
| 257 ClosureArgumentMismatchException.prototype.toString$0 = ClosureArgumentMismatchE
xception.prototype.toString; | 262 ClosureArgumentMismatchException.prototype.toString$0 = ClosureArgumentMismatchE
xception.prototype.toString; |
| 258 // ********** Code for ObjectNotClosureException ************** | 263 // ********** Code for ObjectNotClosureException ************** |
| 259 function ObjectNotClosureException() { | 264 function ObjectNotClosureException() { |
| 260 | 265 |
| 261 } | 266 } |
| 262 ObjectNotClosureException.prototype.toString = function() { | 267 ObjectNotClosureException.prototype.toString = function() { |
| 263 return "Object is not closure"; | 268 return "Object is not closure"; |
| 264 } | 269 } |
| 265 ObjectNotClosureException.prototype.toString$0 = ObjectNotClosureException.proto
type.toString; | 270 ObjectNotClosureException.prototype.toString$0 = ObjectNotClosureException.proto
type.toString; |
| 266 // ********** Code for IllegalArgumentException ************** | 271 // ********** Code for IllegalArgumentException ************** |
| 267 function IllegalArgumentException(args) { | 272 function IllegalArgumentException(arg) { |
| 268 this._args = args; | 273 this._arg = arg; |
| 269 } | 274 } |
| 270 IllegalArgumentException.prototype.is$IllegalArgumentException = function(){retu
rn true}; | 275 IllegalArgumentException.prototype.is$IllegalArgumentException = function(){retu
rn true}; |
| 271 IllegalArgumentException.prototype.toString = function() { | 276 IllegalArgumentException.prototype.toString = function() { |
| 272 return ("Illegal argument(s): " + this._args); | 277 return ("Illegal argument(s): " + this._arg); |
| 273 } | 278 } |
| 274 IllegalArgumentException.prototype.toString$0 = IllegalArgumentException.prototy
pe.toString; | 279 IllegalArgumentException.prototype.toString$0 = IllegalArgumentException.prototy
pe.toString; |
| 275 // ********** Code for StackOverflowException ************** | 280 // ********** Code for StackOverflowException ************** |
| 276 function StackOverflowException() { | 281 function StackOverflowException() { |
| 277 | 282 |
| 278 } | 283 } |
| 279 StackOverflowException.prototype.toString = function() { | 284 StackOverflowException.prototype.toString = function() { |
| 280 return "Stack Overflow"; | 285 return "Stack Overflow"; |
| 281 } | 286 } |
| 282 StackOverflowException.prototype.toString$0 = StackOverflowException.prototype.t
oString; | 287 StackOverflowException.prototype.toString$0 = StackOverflowException.prototype.t
oString; |
| (...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1788 } | 1793 } |
| 1789 var values = []; | 1794 var values = []; |
| 1790 var $$list = this.method.parameters; | 1795 var $$list = this.method.parameters; |
| 1791 for (var $$i = $$list.iterator(); $$i.hasNext(); ) { | 1796 for (var $$i = $$list.iterator(); $$i.hasNext(); ) { |
| 1792 var p = $$i.next(); | 1797 var p = $$i.next(); |
| 1793 values.add(new PureStaticValue(p.get$type(), null, false, false)); | 1798 values.add(new PureStaticValue(p.get$type(), null, false, false)); |
| 1794 } | 1799 } |
| 1795 var args = new Arguments(null, values); | 1800 var args = new Arguments(null, values); |
| 1796 this._frame = new CallFrame(this, this.method, thisValue, args, context); | 1801 this._frame = new CallFrame(this, this.method, thisValue, args, context); |
| 1797 this._bindArguments(this._frame.args); | 1802 this._bindArguments(this._frame.args); |
| 1798 this.body.visit(this); | 1803 var declaredInitializers = this.method.definition.get$dynamic().get$initialize
rs(); |
| 1804 if ($ne(declaredInitializers)) { |
| 1805 for (var $$i = declaredInitializers.iterator(); $$i.hasNext(); ) { |
| 1806 var init = $$i.next(); |
| 1807 if ((init instanceof CallExpression)) { |
| 1808 this.visitCallExpression(init, true); |
| 1809 } |
| 1810 } |
| 1811 } |
| 1812 if (this.body != null) this.body.visit(this); |
| 1799 } | 1813 } |
| 1800 MethodAnalyzer.prototype._hasTypeParams = function(node) { | 1814 MethodAnalyzer.prototype._hasTypeParams = function(node) { |
| 1801 if ((node instanceof NameTypeReference)) { | 1815 if ((node instanceof NameTypeReference)) { |
| 1802 var name = node.get$name().get$name(); | 1816 var name = node.get$name().get$name(); |
| 1803 return (this.method.declaringType.lookupTypeParam(name) != null); | 1817 return (this.method.declaringType.lookupTypeParam(name) != null); |
| 1804 } | 1818 } |
| 1805 else if ((node instanceof GenericTypeReference)) { | 1819 else if ((node instanceof GenericTypeReference)) { |
| 1806 var $$list = node.get$typeArguments(); | 1820 var $$list = node.get$typeArguments(); |
| 1807 for (var $$i = $$list.iterator(); $$i.hasNext(); ) { | 1821 for (var $$i = $$list.iterator(); $$i.hasNext(); ) { |
| 1808 var typeArg = $$i.next(); | 1822 var typeArg = $$i.next(); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2065 } | 2079 } |
| 2066 MethodAnalyzer.prototype.visitEmptyStatement = function(node) { | 2080 MethodAnalyzer.prototype.visitEmptyStatement = function(node) { |
| 2067 | 2081 |
| 2068 } | 2082 } |
| 2069 MethodAnalyzer.prototype.visitLambdaExpression = function(node) { | 2083 MethodAnalyzer.prototype.visitLambdaExpression = function(node) { |
| 2070 var name = (node.func.name != null) ? node.func.name.name : ""; | 2084 var name = (node.func.name != null) ? node.func.name.name : ""; |
| 2071 var meth = this._makeLambdaMethod(name, node.func); | 2085 var meth = this._makeLambdaMethod(name, node.func); |
| 2072 meth.get$methodData().analyze(); | 2086 meth.get$methodData().analyze(); |
| 2073 return this._frame._makeValue($globals.world.functionType, node); | 2087 return this._frame._makeValue($globals.world.functionType, node); |
| 2074 } | 2088 } |
| 2075 MethodAnalyzer.prototype.visitCallExpression = function(node) { | 2089 MethodAnalyzer.prototype.analyzeInitializerConstructorCall = function(node, rece
iver, name) { |
| 2090 var type = this._frame.method.declaringType; |
| 2091 if ((receiver instanceof SuperExpression)) { |
| 2092 type = type.get$parent(); |
| 2093 } |
| 2094 var member = type.getConstructor(name == null ? "" : name); |
| 2095 if (null != member) { |
| 2096 return member.invoke(this._frame, node, this._frame.makeThisValue(node), thi
s._visitArgs(node.arguments)); |
| 2097 } |
| 2098 else { |
| 2099 var constructorName = name == null ? "" : ("." + name); |
| 2100 $globals.world.warning(("cannot find constructor \"" + type.get$name() + con
structorName + "\""), node.span); |
| 2101 return this._frame._makeValue($globals.world.varType, node); |
| 2102 } |
| 2103 } |
| 2104 MethodAnalyzer.prototype.isThisOrSuper = function(node) { |
| 2105 return (node instanceof ThisExpression) || (node instanceof SuperExpression); |
| 2106 } |
| 2107 MethodAnalyzer.prototype.visitCallExpression = function(node, visitingInitialize
rs) { |
| 2076 var target; | 2108 var target; |
| 2077 var position = node.target; | 2109 var position = node.target; |
| 2078 var name = ":call"; | 2110 var name = ":call"; |
| 2079 if ((node.target instanceof DotExpression)) { | 2111 if ((node.target instanceof DotExpression)) { |
| 2080 var dot = node.target; | 2112 var dot = node.target; |
| 2081 target = dot.self.visit(this); | 2113 target = dot.self.visit(this); |
| 2082 name = dot.name.name; | 2114 name = dot.name.name; |
| 2083 position = dot.name; | 2115 if (this.isThisOrSuper(dot.self) && visitingInitializers) { |
| 2116 return this.analyzeInitializerConstructorCall(node, dot.self, name); |
| 2117 } |
| 2118 else { |
| 2119 position = dot.name; |
| 2120 } |
| 2121 } |
| 2122 else if (this.isThisOrSuper(node.target) && visitingInitializers) { |
| 2123 return this.analyzeInitializerConstructorCall(node, node.target, null); |
| 2084 } | 2124 } |
| 2085 else if ((node.target instanceof VarExpression)) { | 2125 else if ((node.target instanceof VarExpression)) { |
| 2086 var varExpr = node.target; | 2126 var varExpr = node.target; |
| 2087 name = varExpr.name.name; | 2127 name = varExpr.name.name; |
| 2088 target = this._frame.lookup(name); | 2128 target = this._frame.lookup(name); |
| 2089 if ($ne(target)) { | 2129 if ($ne(target)) { |
| 2090 return target.get(position).invoke(this._frame, ":call", node, this._visit
Args(node.arguments)); | 2130 return target.get(position).invoke(this._frame, ":call", node, this._visit
Args(node.arguments)); |
| 2091 } | 2131 } |
| 2092 var member = this._resolveBare(name, varExpr.name); | 2132 var member = this._resolveBare(name, varExpr.name); |
| 2093 if (null != member) { | 2133 if (null != member) { |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2335 return new PureStaticValue(node.value.get$type(), node.span, true, false); | 2375 return new PureStaticValue(node.value.get$type(), node.span, true, false); |
| 2336 } | 2376 } |
| 2337 MethodAnalyzer.prototype.visitStringInterpExpression = function(node) { | 2377 MethodAnalyzer.prototype.visitStringInterpExpression = function(node) { |
| 2338 return this._frame._makeValue($globals.world.stringType, node); | 2378 return this._frame._makeValue($globals.world.stringType, node); |
| 2339 } | 2379 } |
| 2340 MethodAnalyzer.prototype._pushBlock$1 = MethodAnalyzer.prototype._pushBlock; | 2380 MethodAnalyzer.prototype._pushBlock$1 = MethodAnalyzer.prototype._pushBlock; |
| 2341 MethodAnalyzer.prototype.analyze$1 = MethodAnalyzer.prototype.analyze; | 2381 MethodAnalyzer.prototype.analyze$1 = MethodAnalyzer.prototype.analyze; |
| 2342 MethodAnalyzer.prototype.visitBinaryExpression$1 = function($0) { | 2382 MethodAnalyzer.prototype.visitBinaryExpression$1 = function($0) { |
| 2343 return this.visitBinaryExpression($0, false); | 2383 return this.visitBinaryExpression($0, false); |
| 2344 }; | 2384 }; |
| 2385 MethodAnalyzer.prototype.visitCallExpression$1 = function($0) { |
| 2386 return this.visitCallExpression($0, false); |
| 2387 }; |
| 2345 MethodAnalyzer.prototype.visitPostfixExpression$1 = function($0) { | 2388 MethodAnalyzer.prototype.visitPostfixExpression$1 = function($0) { |
| 2346 return this.visitPostfixExpression($0, false); | 2389 return this.visitPostfixExpression($0, false); |
| 2347 }; | 2390 }; |
| 2348 // ********** Code for CallFrame ************** | 2391 // ********** Code for CallFrame ************** |
| 2349 function CallFrame(analyzer, method, thisValue, args, enclosingFrame) { | 2392 function CallFrame(analyzer, method, thisValue, args, enclosingFrame) { |
| 2350 this.args = args; | 2393 this.args = args; |
| 2351 this.analyzer = analyzer; | 2394 this.analyzer = analyzer; |
| 2352 this.enclosingFrame = enclosingFrame; | 2395 this.enclosingFrame = enclosingFrame; |
| 2353 this.method = method; | 2396 this.method = method; |
| 2354 this.thisValue = thisValue; | 2397 this.thisValue = thisValue; |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3790 var p = this.method.get$parameters().$index(i); | 3833 var p = this.method.get$parameters().$index(i); |
| 3791 var currentArg = null; | 3834 var currentArg = null; |
| 3792 if (i < args.get$bareCount()) { | 3835 if (i < args.get$bareCount()) { |
| 3793 currentArg = args.values.$index(i); | 3836 currentArg = args.values.$index(i); |
| 3794 } | 3837 } |
| 3795 else { | 3838 else { |
| 3796 currentArg = args.getValue(p.get$name()); | 3839 currentArg = args.getValue(p.get$name()); |
| 3797 if (null == currentArg) { | 3840 if (null == currentArg) { |
| 3798 p.genValue(this.method, this); | 3841 p.genValue(this.method, this); |
| 3799 currentArg = p.get$value(); | 3842 currentArg = p.get$value(); |
| 3843 if (currentArg == null) { |
| 3844 return; |
| 3845 } |
| 3800 } | 3846 } |
| 3801 } | 3847 } |
| 3802 if (p.get$isInitializer()) { | 3848 if (p.get$isInitializer()) { |
| 3803 this._paramCode.add(p.get$name()); | 3849 this._paramCode.add(p.get$name()); |
| 3804 fieldsSet = true; | 3850 fieldsSet = true; |
| 3805 this._initField(newObject, p.get$name(), currentArg, p.get$definition().ge
t$span()); | 3851 this._initField(newObject, p.get$name(), currentArg, p.get$definition().ge
t$span()); |
| 3806 } | 3852 } |
| 3807 else { | 3853 else { |
| 3808 var paramValue = this._scope.declareParameter(p); | 3854 var paramValue = this._scope.declareParameter(p); |
| 3809 this._paramCode.add(paramValue.get$code()); | 3855 this._paramCode.add(paramValue.get$code()); |
| (...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4830 } | 4876 } |
| 4831 return new Value($globals.world.stringType, ("(" + Strings.join(items, " + ")
+ ")"), node.span); | 4877 return new Value($globals.world.stringType, ("(" + Strings.join(items, " + ")
+ ")"), node.span); |
| 4832 } | 4878 } |
| 4833 MethodGenerator.prototype._pushBlock$1 = function($0) { | 4879 MethodGenerator.prototype._pushBlock$1 = function($0) { |
| 4834 return this._pushBlock($0, false); | 4880 return this._pushBlock($0, false); |
| 4835 }; | 4881 }; |
| 4836 MethodGenerator.prototype.run$0 = MethodGenerator.prototype.run; | 4882 MethodGenerator.prototype.run$0 = MethodGenerator.prototype.run; |
| 4837 MethodGenerator.prototype.visitBinaryExpression$1 = function($0) { | 4883 MethodGenerator.prototype.visitBinaryExpression$1 = function($0) { |
| 4838 return this.visitBinaryExpression($0, false); | 4884 return this.visitBinaryExpression($0, false); |
| 4839 }; | 4885 }; |
| 4886 MethodGenerator.prototype.visitCallExpression$1 = MethodGenerator.prototype.visi
tCallExpression; |
| 4840 MethodGenerator.prototype.visitPostfixExpression$1 = function($0) { | 4887 MethodGenerator.prototype.visitPostfixExpression$1 = function($0) { |
| 4841 return this.visitPostfixExpression($0, false); | 4888 return this.visitPostfixExpression($0, false); |
| 4842 }; | 4889 }; |
| 4843 // ********** Code for Arguments ************** | 4890 // ********** Code for Arguments ************** |
| 4844 function Arguments(nodes, values) { | 4891 function Arguments(nodes, values) { |
| 4845 this.nodes = nodes; | 4892 this.nodes = nodes; |
| 4846 this.values = values; | 4893 this.values = values; |
| 4847 } | 4894 } |
| 4848 Arguments.Arguments$bare$factory = function(arity) { | 4895 Arguments.Arguments$bare$factory = function(arity) { |
| 4849 var values = []; | 4896 var values = []; |
| (...skipping 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6795 this.baseMethod = baseMethod; | 6842 this.baseMethod = baseMethod; |
| 6796 this.context = context; | 6843 this.context = context; |
| 6797 this.body = this.baseMethod.definition.body; | 6844 this.body = this.baseMethod.definition.body; |
| 6798 if (this.baseMethod.get$isConstructor()) { | 6845 if (this.baseMethod.get$isConstructor()) { |
| 6799 this.needsTypeParams = true; | 6846 this.needsTypeParams = true; |
| 6800 } | 6847 } |
| 6801 } | 6848 } |
| 6802 MethodData.prototype.get$body = function() { return this.body; }; | 6849 MethodData.prototype.get$body = function() { return this.body; }; |
| 6803 MethodData.prototype.set$body = function(value) { return this.body = value; }; | 6850 MethodData.prototype.set$body = function(value) { return this.body = value; }; |
| 6804 MethodData.prototype.analyze = function() { | 6851 MethodData.prototype.analyze = function() { |
| 6805 if (null == this.body) return; | |
| 6806 var ma = new MethodAnalyzer(this.baseMethod, this.body); | 6852 var ma = new MethodAnalyzer(this.baseMethod, this.body); |
| 6807 ma.analyze$1(this.context); | 6853 ma.analyze$1(this.context); |
| 6808 } | 6854 } |
| 6809 MethodData.prototype.eval = function(method, newObject, args) { | 6855 MethodData.prototype.eval = function(method, newObject, args) { |
| 6810 if ((null == method ? null != (this.baseMethod) : method !== this.baseMethod))
{ | 6856 if ((null == method ? null != (this.baseMethod) : method !== this.baseMethod))
{ |
| 6811 if (!this.needsTypeParams) method = this.baseMethod; | 6857 if (!this.needsTypeParams) method = this.baseMethod; |
| 6812 } | 6858 } |
| 6813 var gen = new MethodGenerator(method, this.context); | 6859 var gen = new MethodGenerator(method, this.context); |
| 6814 return gen.evalBody(newObject, args); | 6860 return gen.evalBody(newObject, args); |
| 6815 } | 6861 } |
| (...skipping 3924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10740 return visitor.visitLambdaExpression(this); | 10786 return visitor.visitLambdaExpression(this); |
| 10741 } | 10787 } |
| 10742 // ********** Code for CallExpression ************** | 10788 // ********** Code for CallExpression ************** |
| 10743 $inherits(CallExpression, Expression); | 10789 $inherits(CallExpression, Expression); |
| 10744 function CallExpression(target, arguments, span) { | 10790 function CallExpression(target, arguments, span) { |
| 10745 this.target = target; | 10791 this.target = target; |
| 10746 this.arguments = arguments; | 10792 this.arguments = arguments; |
| 10747 Expression.call(this, span); | 10793 Expression.call(this, span); |
| 10748 } | 10794 } |
| 10749 CallExpression.prototype.visit = function(visitor) { | 10795 CallExpression.prototype.visit = function(visitor) { |
| 10750 return visitor.visitCallExpression(this); | 10796 return visitor.visitCallExpression$1(this); |
| 10751 } | 10797 } |
| 10752 // ********** Code for IndexExpression ************** | 10798 // ********** Code for IndexExpression ************** |
| 10753 $inherits(IndexExpression, Expression); | 10799 $inherits(IndexExpression, Expression); |
| 10754 function IndexExpression(target, index, span) { | 10800 function IndexExpression(target, index, span) { |
| 10755 this.target = target; | 10801 this.target = target; |
| 10756 this.index = index; | 10802 this.index = index; |
| 10757 Expression.call(this, span); | 10803 Expression.call(this, span); |
| 10758 } | 10804 } |
| 10759 IndexExpression.prototype.visit = function(visitor) { | 10805 IndexExpression.prototype.visit = function(visitor) { |
| 10760 return visitor.visitIndexExpression(this); | 10806 return visitor.visitIndexExpression(this); |
| (...skipping 3818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14579 } | 14625 } |
| 14580 var const$0000 = Object.create(_DeletedKeySentinel.prototype, {}); | 14626 var const$0000 = Object.create(_DeletedKeySentinel.prototype, {}); |
| 14581 var const$0001 = Object.create(NoMoreElementsException.prototype, {}); | 14627 var const$0001 = Object.create(NoMoreElementsException.prototype, {}); |
| 14582 var const$0002 = Object.create(EmptyQueueException.prototype, {}); | 14628 var const$0002 = Object.create(EmptyQueueException.prototype, {}); |
| 14583 var const$0006 = Object.create(IllegalAccessException.prototype, {}); | 14629 var const$0006 = Object.create(IllegalAccessException.prototype, {}); |
| 14584 var const$0007 = ImmutableList.ImmutableList$from$factory([]); | 14630 var const$0007 = ImmutableList.ImmutableList$from$factory([]); |
| 14585 var const$0009 = new JSSyntaxRegExp("^[a-zA-Z]:/"); | 14631 var const$0009 = new JSSyntaxRegExp("^[a-zA-Z]:/"); |
| 14586 var $globals = {}; | 14632 var $globals = {}; |
| 14587 $static_init(); | 14633 $static_init(); |
| 14588 main(); | 14634 main(); |
| OLD | NEW |