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

Side by Side Diff: frog/minfrog

Issue 8802025: Simple fix to get noSuchMethod working on private members (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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
« no previous file with comments | « frog/library.dart ('k') | tests/language/language.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 4 /**
5 * Generates a dynamic call stub for a function. 5 * Generates a dynamic call stub for a function.
6 * Our goal is to create a stub method like this on-the-fly: 6 * Our goal is to create a stub method like this on-the-fly:
7 * function($0, $1, capture) { return this($0, $1, true, capture); } 7 * function($0, $1, capture) { return this($0, $1, true, capture); }
8 * 8 *
9 * This stub then replaces the dynamic one on Function, with one that is 9 * This stub then replaces the dynamic one on Function, with one that is
10 * specialized for that particular function, taking into account its default 10 * specialized for that particular function, taking into account its default
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 Clock.frequency = function() { 132 Clock.frequency = function() {
133 return 1000; 133 return 1000;
134 } 134 }
135 // ********** Code for Object ************** 135 // ********** Code for Object **************
136 Object.prototype.get$dynamic = function() { 136 Object.prototype.get$dynamic = function() {
137 return this; 137 return this;
138 } 138 }
139 Object.prototype.noSuchMethod = function(name, args) { 139 Object.prototype.noSuchMethod = function(name, args) {
140 $throw(new NoSuchMethodException(this, name, args)); 140 $throw(new NoSuchMethodException(this, name, args));
141 } 141 }
142 Object.prototype._checkExtends$0 = function() {
143 return this.noSuchMethod("_checkExtends", []);
144 };
145 Object.prototype._checkNonStatic$1 = function($0) {
146 return this.noSuchMethod("_checkNonStatic", [$0]);
147 };
142 Object.prototype._get$3 = function($0, $1, $2) { 148 Object.prototype._get$3 = function($0, $1, $2) {
143 return this.noSuchMethod("_get", [$0, $1, $2]); 149 return this.noSuchMethod("_get", [$0, $1, $2]);
144 }; 150 };
151 Object.prototype._get$3$isDynamic = function($0, $1, $2, isDynamic) {
152 return this.noSuchMethod("_get", [$0, $1, $2, isDynamic]);
153 };
154 Object.prototype._get$4 = function($0, $1, $2, $3) {
155 return this.noSuchMethod("_get", [$0, $1, $2, $3]);
156 };
145 Object.prototype._set$4 = function($0, $1, $2, $3) { 157 Object.prototype._set$4 = function($0, $1, $2, $3) {
146 return this.noSuchMethod("_set", [$0, $1, $2, $3]); 158 return this.noSuchMethod("_set", [$0, $1, $2, $3]);
147 }; 159 };
160 Object.prototype._set$4$isDynamic = function($0, $1, $2, $3, isDynamic) {
161 return this.noSuchMethod("_set", [$0, $1, $2, $3, isDynamic]);
162 };
163 Object.prototype._set$5 = function($0, $1, $2, $3, $4) {
164 return this.noSuchMethod("_set", [$0, $1, $2, $3, $4]);
165 };
166 Object.prototype._wrapDomCallback$2 = function($0, $1) {
167 return this.noSuchMethod("_wrapDomCallback", [$0, $1]);
168 };
148 Object.prototype.add$1 = function($0) { 169 Object.prototype.add$1 = function($0) {
149 return this.noSuchMethod("add", [$0]); 170 return this.noSuchMethod("add", [$0]);
150 }; 171 };
151 Object.prototype.addAll$1 = function($0) { 172 Object.prototype.addAll$1 = function($0) {
152 return this.noSuchMethod("addAll", [$0]); 173 return this.noSuchMethod("addAll", [$0]);
153 }; 174 };
154 Object.prototype.addDirectSubtype$1 = function($0) { 175 Object.prototype.addDirectSubtype$1 = function($0) {
155 return this.noSuchMethod("addDirectSubtype", [$0]); 176 return this.noSuchMethod("addDirectSubtype", [$0]);
156 }; 177 };
157 Object.prototype.addMethod$2 = function($0, $1) { 178 Object.prototype.addMethod$2 = function($0, $1) {
(...skipping 13 matching lines...) Expand all
171 }; 192 };
172 Object.prototype.compareTo$1 = function($0) { 193 Object.prototype.compareTo$1 = function($0) {
173 return this.noSuchMethod("compareTo", [$0]); 194 return this.noSuchMethod("compareTo", [$0]);
174 }; 195 };
175 Object.prototype.computeValue$0 = function() { 196 Object.prototype.computeValue$0 = function() {
176 return this.noSuchMethod("computeValue", []); 197 return this.noSuchMethod("computeValue", []);
177 }; 198 };
178 Object.prototype.contains$1 = function($0) { 199 Object.prototype.contains$1 = function($0) {
179 return this.noSuchMethod("contains", [$0]); 200 return this.noSuchMethod("contains", [$0]);
180 }; 201 };
202 Object.prototype.containsKey$1 = function($0) {
203 return this.noSuchMethod("containsKey", [$0]);
204 };
181 Object.prototype.convertTo$3 = function($0, $1, $2) { 205 Object.prototype.convertTo$3 = function($0, $1, $2) {
182 return this.noSuchMethod("convertTo", [$0, $1, $2]); 206 return this.noSuchMethod("convertTo", [$0, $1, $2]);
183 }; 207 };
184 Object.prototype.convertTo$4 = function($0, $1, $2, $3) { 208 Object.prototype.convertTo$4 = function($0, $1, $2, $3) {
185 return this.noSuchMethod("convertTo", [$0, $1, $2, $3]); 209 return this.noSuchMethod("convertTo", [$0, $1, $2, $3]);
186 }; 210 };
187 Object.prototype.copyWithNewType$2 = function($0, $1) { 211 Object.prototype.copyWithNewType$2 = function($0, $1) {
188 return this.noSuchMethod("copyWithNewType", [$0, $1]); 212 return this.noSuchMethod("copyWithNewType", [$0, $1]);
189 }; 213 };
190 Object.prototype.end$0 = function() { 214 Object.prototype.end$0 = function() {
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 var i = 0; 864 var i = 0;
841 this.forEach(function _(key, value) { 865 this.forEach(function _(key, value) {
842 list.$setindex(i++, value); 866 list.$setindex(i++, value);
843 } 867 }
844 ); 868 );
845 return list; 869 return list;
846 } 870 }
847 HashMapImplementation.prototype.containsKey = function(key) { 871 HashMapImplementation.prototype.containsKey = function(key) {
848 return (this._probeForLookup(key) != -1); 872 return (this._probeForLookup(key) != -1);
849 } 873 }
874 HashMapImplementation.prototype.containsKey$1 = HashMapImplementation.prototype. containsKey;
850 HashMapImplementation.prototype.forEach$1 = function($0) { 875 HashMapImplementation.prototype.forEach$1 = function($0) {
851 return this.forEach(to$call$2($0)); 876 return this.forEach(to$call$2($0));
852 }; 877 };
853 HashMapImplementation.prototype.getKeys$0 = HashMapImplementation.prototype.getK eys; 878 HashMapImplementation.prototype.getKeys$0 = HashMapImplementation.prototype.getK eys;
854 HashMapImplementation.prototype.getValues$0 = HashMapImplementation.prototype.ge tValues; 879 HashMapImplementation.prototype.getValues$0 = HashMapImplementation.prototype.ge tValues;
855 HashMapImplementation.prototype.isEmpty$0 = HashMapImplementation.prototype.isEm pty; 880 HashMapImplementation.prototype.isEmpty$0 = HashMapImplementation.prototype.isEm pty;
856 // ********** Code for HashMapImplementation_E$E ************** 881 // ********** Code for HashMapImplementation_E$E **************
857 function HashMapImplementation_E$E() { 882 function HashMapImplementation_E$E() {
858 // Initializers done 883 // Initializers done
859 this._numberOfEntries = 0; 884 this._numberOfEntries = 0;
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 } 1237 }
1213 LinkedHashMapImplementation.prototype.get$length = function() { 1238 LinkedHashMapImplementation.prototype.get$length = function() {
1214 return this._map.get$length(); 1239 return this._map.get$length();
1215 } 1240 }
1216 Object.defineProperty(LinkedHashMapImplementation.prototype, "length", { 1241 Object.defineProperty(LinkedHashMapImplementation.prototype, "length", {
1217 get: LinkedHashMapImplementation.prototype.get$length 1242 get: LinkedHashMapImplementation.prototype.get$length
1218 }); 1243 });
1219 LinkedHashMapImplementation.prototype.isEmpty = function() { 1244 LinkedHashMapImplementation.prototype.isEmpty = function() {
1220 return this.get$length() == 0; 1245 return this.get$length() == 0;
1221 } 1246 }
1247 LinkedHashMapImplementation.prototype.containsKey$1 = LinkedHashMapImplementatio n.prototype.containsKey;
1222 LinkedHashMapImplementation.prototype.forEach$1 = function($0) { 1248 LinkedHashMapImplementation.prototype.forEach$1 = function($0) {
1223 return this.forEach(to$call$2($0)); 1249 return this.forEach(to$call$2($0));
1224 }; 1250 };
1225 LinkedHashMapImplementation.prototype.getKeys$0 = LinkedHashMapImplementation.pr ototype.getKeys; 1251 LinkedHashMapImplementation.prototype.getKeys$0 = LinkedHashMapImplementation.pr ototype.getKeys;
1226 LinkedHashMapImplementation.prototype.getValues$0 = LinkedHashMapImplementation. prototype.getValues; 1252 LinkedHashMapImplementation.prototype.getValues$0 = LinkedHashMapImplementation. prototype.getValues;
1227 LinkedHashMapImplementation.prototype.isEmpty$0 = LinkedHashMapImplementation.pr ototype.isEmpty; 1253 LinkedHashMapImplementation.prototype.isEmpty$0 = LinkedHashMapImplementation.pr ototype.isEmpty;
1228 // ********** Code for DoubleLinkedQueueEntry ************** 1254 // ********** Code for DoubleLinkedQueueEntry **************
1229 function DoubleLinkedQueueEntry(e) { 1255 function DoubleLinkedQueueEntry(e) {
1230 // Initializers done 1256 // Initializers done
1231 this._element = e; 1257 this._element = e;
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 CoreJs.prototype.generate$1 = CoreJs.prototype.generate; 1964 CoreJs.prototype.generate$1 = CoreJs.prototype.generate;
1939 // ********** Code for Element ************** 1965 // ********** Code for Element **************
1940 function Element(name, _enclosingElement) { 1966 function Element(name, _enclosingElement) {
1941 this.name = name; 1967 this.name = name;
1942 this._enclosingElement = _enclosingElement; 1968 this._enclosingElement = _enclosingElement;
1943 // Initializers done 1969 // Initializers done
1944 this._jsname = $globals.world.toJsIdentifier(this.name); 1970 this._jsname = $globals.world.toJsIdentifier(this.name);
1945 } 1971 }
1946 Element.prototype.get$name = function() { return this.name; }; 1972 Element.prototype.get$name = function() { return this.name; };
1947 Element.prototype.set$name = function(value) { return this.name = value; }; 1973 Element.prototype.set$name = function(value) { return this.name = value; };
1974 Element.prototype.get$_jsname = function() { return this._jsname; };
1975 Element.prototype.set$_jsname = function(value) { return this._jsname = value; } ;
1948 Element.prototype.get$library = function() { 1976 Element.prototype.get$library = function() {
1949 return null; 1977 return null;
1950 } 1978 }
1951 Element.prototype.get$span = function() { 1979 Element.prototype.get$span = function() {
1952 return null; 1980 return null;
1953 } 1981 }
1954 Element.prototype.get$isNative = function() { 1982 Element.prototype.get$isNative = function() {
1955 return false; 1983 return false;
1956 } 1984 }
1957 Element.prototype.hashCode = function() { 1985 Element.prototype.hashCode = function() {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2139 this.writer.comment(('// ********** Natives ' + filename + ' ************** ')); 2167 this.writer.comment(('// ********** Natives ' + filename + ' ************** '));
2140 this.writer.writeln(file.get$text()); 2168 this.writer.writeln(file.get$text());
2141 } 2169 }
2142 lib.topType.markUsed(); 2170 lib.topType.markUsed();
2143 var $$list = this._orderValues(lib.types); 2171 var $$list = this._orderValues(lib.types);
2144 for (var $$i = 0;$$i < $$list.length; $$i++) { 2172 for (var $$i = 0;$$i < $$list.length; $$i++) {
2145 var type = $$list.$index($$i); 2173 var type = $$list.$index($$i);
2146 if ((type.get$isUsed() || type.get$isHiddenNativeType()) && type.get$isClass ()) { 2174 if ((type.get$isUsed() || type.get$isHiddenNativeType()) && type.get$isClass ()) {
2147 this.writeType(type); 2175 this.writeType(type);
2148 if (type.get$isGeneric()) { 2176 if (type.get$isGeneric()) {
2149 var $list0 = this._orderValues(type._concreteTypes); 2177 var $list0 = this._orderValues(type.get$_concreteTypes());
2150 for (var $i0 = 0;$i0 < $list0.length; $i0++) { 2178 for (var $i0 = 0;$i0 < $list0.length; $i0++) {
2151 var ct = $list0.$index($i0); 2179 var ct = $list0.$index($i0);
2152 this.writeType(ct); 2180 this.writeType(ct);
2153 } 2181 }
2154 } 2182 }
2155 } 2183 }
2156 else if (type.get$isFunction() && type.get$varStubs().length > 0) { 2184 else if (type.get$isFunction() && type.get$varStubs().length > 0) {
2157 this.writer.comment(('// ********** Code for ' + type.get$jsname() + ' *** ***********')); 2185 this.writer.comment(('// ********** Code for ' + type.get$jsname() + ' *** ***********'));
2158 this._writeDynamicStubs(type); 2186 this._writeDynamicStubs(type);
2159 } 2187 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
2236 c.get$generator().writeDefinition$2(this.writer); 2264 c.get$generator().writeDefinition$2(this.writer);
2237 } 2265 }
2238 } 2266 }
2239 } 2267 }
2240 if (!type.get$isTop()) { 2268 if (!type.get$isTop()) {
2241 if ((type instanceof ConcreteType)) { 2269 if ((type instanceof ConcreteType)) {
2242 var c = type; 2270 var c = type;
2243 this.corejs.ensureInheritsHelper(); 2271 this.corejs.ensureInheritsHelper();
2244 this.writer.writeln(('\$inherits(' + c.get$jsname() + ', ' + c.genericType .get$jsname() + ');')); 2272 this.writer.writeln(('\$inherits(' + c.get$jsname() + ', ' + c.genericType .get$jsname() + ');'));
2245 for (var p = c._parent; 2273 for (var p = c._parent;
2246 (p instanceof ConcreteType); p = p._parent) { 2274 (p instanceof ConcreteType); p = p.get$_parent()) {
2247 this._ensureInheritMembersHelper(); 2275 this._ensureInheritMembersHelper();
2248 this._mixins.writeln(('\$inheritsMembers(' + c.get$jsname() + ', ' + p.g et$jsname() + ');')); 2276 this._mixins.writeln(('\$inheritsMembers(' + c.get$jsname() + ', ' + p.g et$jsname() + ');'));
2249 } 2277 }
2250 } 2278 }
2251 else if (!type.get$isNative()) { 2279 else if (!type.get$isNative()) {
2252 if (type.get$parent() != null && !type.get$parent().get$isObject()) { 2280 if (type.get$parent() != null && !type.get$parent().get$isObject()) {
2253 this.corejs.ensureInheritsHelper(); 2281 this.corejs.ensureInheritsHelper();
2254 this.writer.writeln(('\$inherits(' + type.get$jsname() + ', ' + type.get $parent().get$jsname() + ');')); 2282 this.writer.writeln(('\$inherits(' + type.get$jsname() + ', ' + type.get $parent().get$jsname() + ');'));
2255 } 2283 }
2256 } 2284 }
2257 } 2285 }
2258 if (!(type instanceof ConcreteType)) { 2286 if (!(type instanceof ConcreteType)) {
2259 this._maybeIsTest(type, type); 2287 this._maybeIsTest(type, type);
2260 } 2288 }
2261 if (type.get$genericType()._concreteTypes != null) { 2289 if (type.get$genericType()._concreteTypes != null) {
2262 var $$list = this._orderValues(type.get$genericType()._concreteTypes); 2290 var $$list = this._orderValues(type.get$genericType()._concreteTypes);
2263 for (var $$i = 0;$$i < $$list.length; $$i++) { 2291 for (var $$i = 0;$$i < $$list.length; $$i++) {
2264 var ct = $$list.$index($$i); 2292 var ct = $$list.$index($$i);
2265 this._maybeIsTest(type, ct); 2293 this._maybeIsTest(type, ct);
2266 } 2294 }
2267 } 2295 }
2268 if (type.get$interfaces() != null) { 2296 if (type.get$interfaces() != null) {
2269 var seen = new HashSetImplementation(); 2297 var seen = new HashSetImplementation();
2270 var worklist = []; 2298 var worklist = [];
2271 worklist.addAll(type.get$interfaces()); 2299 worklist.addAll(type.get$interfaces());
2272 seen.addAll(type.get$interfaces()); 2300 seen.addAll(type.get$interfaces());
2273 while (!worklist.isEmpty()) { 2301 while (!worklist.isEmpty()) {
2274 var interface_ = worklist.removeLast(); 2302 var interface_ = worklist.removeLast();
2275 this._maybeIsTest(type, interface_.get$genericType()); 2303 this._maybeIsTest(type, interface_.get$genericType());
2276 if (interface_.get$genericType()._concreteTypes != null) { 2304 if ($ne(interface_.get$genericType().get$_concreteTypes(), null)) {
2277 var $$list = this._orderValues(interface_.get$genericType()._concreteTyp es); 2305 var $$list = this._orderValues(interface_.get$genericType().get$_concret eTypes());
2278 for (var $$i = 0;$$i < $$list.length; $$i++) { 2306 for (var $$i = 0;$$i < $$list.length; $$i++) {
2279 var ct = $$list.$index($$i); 2307 var ct = $$list.$index($$i);
2280 this._maybeIsTest(type, ct); 2308 this._maybeIsTest(type, ct);
2281 } 2309 }
2282 } 2310 }
2283 var $$list = interface_.get$interfaces(); 2311 var $$list = interface_.get$interfaces();
2284 for (var $$i = interface_.get$interfaces().iterator$0(); $$i.hasNext$0(); ) { 2312 for (var $$i = interface_.get$interfaces().iterator$0(); $$i.hasNext$0(); ) {
2285 var other = $$i.next$0(); 2313 var other = $$i.next$0();
2286 if (!seen.contains(other)) { 2314 if (!seen.contains(other)) {
2287 worklist.addLast(other); 2315 worklist.addLast(other);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2427 this._closedOver = new HashSetImplementation(); 2455 this._closedOver = new HashSetImplementation();
2428 } 2456 }
2429 else { 2457 else {
2430 this.reentrant = reentrant || this.parent.reentrant; 2458 this.reentrant = reentrant || this.parent.reentrant;
2431 } 2459 }
2432 } 2460 }
2433 BlockScope.prototype.get$enclosingMethod = function() { return this.enclosingMet hod; }; 2461 BlockScope.prototype.get$enclosingMethod = function() { return this.enclosingMet hod; };
2434 BlockScope.prototype.set$enclosingMethod = function(value) { return this.enclosi ngMethod = value; }; 2462 BlockScope.prototype.set$enclosingMethod = function(value) { return this.enclosi ngMethod = value; };
2435 BlockScope.prototype.get$parent = function() { return this.parent; }; 2463 BlockScope.prototype.get$parent = function() { return this.parent; };
2436 BlockScope.prototype.set$parent = function(value) { return this.parent = value; }; 2464 BlockScope.prototype.set$parent = function(value) { return this.parent = value; };
2465 BlockScope.prototype.get$_vars = function() { return this._vars; };
2466 BlockScope.prototype.set$_vars = function(value) { return this._vars = value; };
2467 BlockScope.prototype.get$_jsNames = function() { return this._jsNames; };
2468 BlockScope.prototype.set$_jsNames = function(value) { return this._jsNames = val ue; };
2469 BlockScope.prototype.get$_closedOver = function() { return this._closedOver; };
2470 BlockScope.prototype.set$_closedOver = function(value) { return this._closedOver = value; };
2437 BlockScope.prototype.get$rethrow = function() { return this.rethrow; }; 2471 BlockScope.prototype.get$rethrow = function() { return this.rethrow; };
2438 BlockScope.prototype.set$rethrow = function(value) { return this.rethrow = value ; }; 2472 BlockScope.prototype.set$rethrow = function(value) { return this.rethrow = value ; };
2439 BlockScope.prototype.get$reentrant = function() { return this.reentrant; }; 2473 BlockScope.prototype.get$reentrant = function() { return this.reentrant; };
2440 BlockScope.prototype.set$reentrant = function(value) { return this.reentrant = v alue; }; 2474 BlockScope.prototype.set$reentrant = function(value) { return this.reentrant = v alue; };
2441 BlockScope.prototype.get$isMethodScope = function() { 2475 BlockScope.prototype.get$isMethodScope = function() {
2442 return this.parent == null || $ne(this.parent.enclosingMethod, this.enclosingM ethod); 2476 return this.parent == null || $ne(this.parent.enclosingMethod, this.enclosingM ethod);
2443 } 2477 }
2444 BlockScope.prototype.get$methodScope = function() { 2478 BlockScope.prototype.get$methodScope = function() {
2445 var s = this; 2479 var s = this;
2446 while (!s.get$isMethodScope()) s = s.get$parent(); 2480 while (!s.get$isMethodScope()) s = s.get$parent();
2447 return s; 2481 return s;
2448 } 2482 }
2449 BlockScope.prototype.lookup = function(name) { 2483 BlockScope.prototype.lookup = function(name) {
2450 var ret = this._vars.$index(name); 2484 var ret = this._vars.$index(name);
2451 if ($ne(ret, null)) return ret; 2485 if ($ne(ret, null)) return ret;
2452 for (var s = this.parent; 2486 for (var s = this.parent;
2453 $ne(s, null); s = s.get$parent()) { 2487 $ne(s, null); s = s.get$parent()) {
2454 ret = s._vars.$index(name); 2488 ret = s.get$_vars().$index(name);
2455 if ($ne(ret, null)) { 2489 if ($ne(ret, null)) {
2456 if ($ne(s.get$enclosingMethod(), this.enclosingMethod)) { 2490 if ($ne(s.get$enclosingMethod(), this.enclosingMethod)) {
2457 s.get$methodScope()._closedOver.add(ret.get$code()); 2491 s.get$methodScope().get$_closedOver().add$1(ret.get$code());
2458 if (this.enclosingMethod.captures != null && s.get$reentrant()) { 2492 if (this.enclosingMethod.captures != null && s.get$reentrant()) {
2459 this.enclosingMethod.captures.add(ret.get$code()); 2493 this.enclosingMethod.captures.add(ret.get$code());
2460 } 2494 }
2461 } 2495 }
2462 return ret; 2496 return ret;
2463 } 2497 }
2464 } 2498 }
2465 } 2499 }
2466 BlockScope.prototype._isDefinedInParent = function(name) { 2500 BlockScope.prototype._isDefinedInParent = function(name) {
2467 if (this.get$isMethodScope() && this._closedOver.contains(name)) return true; 2501 if (this.get$isMethodScope() && this._closedOver.contains(name)) return true;
2468 for (var s = this.parent; 2502 for (var s = this.parent;
2469 $ne(s, null); s = s.get$parent()) { 2503 $ne(s, null); s = s.get$parent()) {
2470 if (s._vars.containsKey(name)) return true; 2504 if (s.get$_vars().containsKey$1(name)) return true;
2471 if (s._jsNames.contains(name)) return true; 2505 if (s.get$_jsNames().contains$1(name)) return true;
2472 if (s.get$isMethodScope() && s._closedOver.contains(name)) return true; 2506 if (s.get$isMethodScope() && s.get$_closedOver().contains$1(name)) return tr ue;
2473 } 2507 }
2474 var type = this.enclosingMethod.method.declaringType; 2508 var type = this.enclosingMethod.method.declaringType;
2475 if (type.get$library().lookup(name, null) != null) return true; 2509 if (type.get$library().lookup(name, null) != null) return true;
2476 return false; 2510 return false;
2477 } 2511 }
2478 BlockScope.prototype.create = function(name, type, span, isFinal, isParameter) { 2512 BlockScope.prototype.create = function(name, type, span, isFinal, isParameter) {
2479 var jsName = $globals.world.toJsIdentifier(name); 2513 var jsName = $globals.world.toJsIdentifier(name);
2480 if (this._vars.containsKey(name)) { 2514 if (this._vars.containsKey(name)) {
2481 $globals.world.error(('duplicate name "' + name + '"'), span); 2515 $globals.world.error(('duplicate name "' + name + '"'), span);
2482 } 2516 }
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
3343 this._getOutermostMethod().set$needsThis(true); 3377 this._getOutermostMethod().set$needsThis(true);
3344 return '\$this'; 3378 return '\$this';
3345 } 3379 }
3346 else { 3380 else {
3347 return 'this'; 3381 return 'this';
3348 } 3382 }
3349 } 3383 }
3350 MethodGenerator.prototype._makeThisValue = function(node) { 3384 MethodGenerator.prototype._makeThisValue = function(node) {
3351 if (this.enclosingMethod != null) { 3385 if (this.enclosingMethod != null) {
3352 var outermostMethod = this._getOutermostMethod(); 3386 var outermostMethod = this._getOutermostMethod();
3353 outermostMethod._checkNonStatic(node); 3387 outermostMethod._checkNonStatic$1(node);
3354 outermostMethod.set$needsThis(true); 3388 outermostMethod.set$needsThis(true);
3355 return new Value(outermostMethod.method.get$declaringType(), '\$this', node != null ? node.span : null, false); 3389 return new Value(outermostMethod.method.get$declaringType(), '\$this', node != null ? node.span : null, false);
3356 } 3390 }
3357 else { 3391 else {
3358 this._checkNonStatic(node); 3392 this._checkNonStatic(node);
3359 return new Value(this.method.declaringType, 'this', node != null ? node.span : null, false); 3393 return new Value(this.method.declaringType, 'this', node != null ? node.span : null, false);
3360 } 3394 }
3361 } 3395 }
3362 MethodGenerator.prototype.visitLambdaExpression = function(node) { 3396 MethodGenerator.prototype.visitLambdaExpression = function(node) {
3363 var name = (node.func.name != null) ? node.func.name.name : ''; 3397 var name = (node.func.name != null) ? node.func.name.name : '';
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
3858 text = toDoubleQuote(text); 3892 text = toDoubleQuote(text);
3859 text = ('"' + text + '"'); 3893 text = ('"' + text + '"');
3860 } 3894 }
3861 if (text !== node.text) { 3895 if (text !== node.text) {
3862 node.value = text; 3896 node.value = text;
3863 node.text = text; 3897 node.text = text;
3864 } 3898 }
3865 } 3899 }
3866 return EvaluatedValue.EvaluatedValue$factory(type, node.value, node.text, null ); 3900 return EvaluatedValue.EvaluatedValue$factory(type, node.value, node.text, null );
3867 } 3901 }
3902 MethodGenerator.prototype._checkNonStatic$1 = MethodGenerator.prototype._checkNo nStatic;
3868 MethodGenerator.prototype.visitPostfixExpression$1 = function($0) { 3903 MethodGenerator.prototype.visitPostfixExpression$1 = function($0) {
3869 return this.visitPostfixExpression($0, false); 3904 return this.visitPostfixExpression($0, false);
3870 }; 3905 };
3871 MethodGenerator.prototype.writeDefinition$2 = MethodGenerator.prototype.writeDef inition; 3906 MethodGenerator.prototype.writeDefinition$2 = MethodGenerator.prototype.writeDef inition;
3872 // ********** Code for Arguments ************** 3907 // ********** Code for Arguments **************
3873 function Arguments(nodes, values) { 3908 function Arguments(nodes, values) {
3874 this.nodes = nodes; 3909 this.nodes = nodes;
3875 this.values = values; 3910 this.values = values;
3876 // Initializers done 3911 // Initializers done
3877 } 3912 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
3992 this.types = _map(['', this.topType]); 4027 this.types = _map(['', this.topType]);
3993 this.imports = []; 4028 this.imports = [];
3994 this.natives = []; 4029 this.natives = [];
3995 this.sources = []; 4030 this.sources = [];
3996 this._privateMembers = new HashMapImplementation(); 4031 this._privateMembers = new HashMapImplementation();
3997 } 4032 }
3998 $inherits(Library, Element); 4033 $inherits(Library, Element);
3999 Library.prototype.get$baseSource = function() { return this.baseSource; }; 4034 Library.prototype.get$baseSource = function() { return this.baseSource; };
4000 Library.prototype.get$types = function() { return this.types; }; 4035 Library.prototype.get$types = function() { return this.types; };
4001 Library.prototype.set$types = function(value) { return this.types = value; }; 4036 Library.prototype.set$types = function(value) { return this.types = value; };
4037 Library.prototype.get$_privateMembers = function() { return this._privateMembers ; };
4038 Library.prototype.set$_privateMembers = function(value) { return this._privateMe mbers = value; };
4002 Library.prototype.get$topType = function() { return this.topType; }; 4039 Library.prototype.get$topType = function() { return this.topType; };
4003 Library.prototype.set$topType = function(value) { return this.topType = value; } ; 4040 Library.prototype.set$topType = function(value) { return this.topType = value; } ;
4004 Library.prototype.get$enclosingElement = function() { 4041 Library.prototype.get$enclosingElement = function() {
4005 return null; 4042 return null;
4006 } 4043 }
4007 Library.prototype.get$library = function() { 4044 Library.prototype.get$library = function() {
4008 return this; 4045 return this;
4009 } 4046 }
4010 Library.prototype.get$isNative = function() { 4047 Library.prototype.get$isNative = function() {
4011 return this.topType.isNative; 4048 return this.topType.isNative;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
4048 if (member.declaringType.get$isTop()) { 4085 if (member.declaringType.get$isTop()) {
4049 $globals.world._addTopName(member); 4086 $globals.world._addTopName(member);
4050 } 4087 }
4051 return; 4088 return;
4052 } 4089 }
4053 var mset = this._privateMembers.$index(member.name); 4090 var mset = this._privateMembers.$index(member.name);
4054 if (mset == null) { 4091 if (mset == null) {
4055 var $$list = $globals.world.libraries.getValues(); 4092 var $$list = $globals.world.libraries.getValues();
4056 for (var $$i = $globals.world.libraries.getValues().iterator$0(); $$i.hasN ext$0(); ) { 4093 for (var $$i = $globals.world.libraries.getValues().iterator$0(); $$i.hasN ext$0(); ) {
4057 var lib = $$i.next$0(); 4094 var lib = $$i.next$0();
4058 if (lib._privateMembers.containsKey(member.get$jsname())) { 4095 if (lib.get$_privateMembers().containsKey$1(member.get$jsname())) {
4059 member._jsname = ('_' + this.get$jsname() + member.get$jsname()); 4096 member._jsname = ('_' + this.get$jsname() + member.get$jsname());
4060 break; 4097 break;
4061 } 4098 }
4062 } 4099 }
4063 mset = new MemberSet(member, false); 4100 mset = new MemberSet(member, true);
4064 this._privateMembers.$setindex(member.name, mset); 4101 this._privateMembers.$setindex(member.name, mset);
4065 } 4102 }
4066 else { 4103 else {
4067 mset.get$members().add$1(member); 4104 mset.get$members().add$1(member);
4068 } 4105 }
4069 } 4106 }
4070 else { 4107 else {
4071 $globals.world._addMember(member); 4108 $globals.world._addMember(member);
4072 } 4109 }
4073 } 4110 }
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
4595 return ('' + prefix + 'factory'); 4632 return ('' + prefix + 'factory');
4596 } 4633 }
4597 else { 4634 else {
4598 return ('' + prefix + this.name + '\$factory'); 4635 return ('' + prefix + this.name + '\$factory');
4599 } 4636 }
4600 } 4637 }
4601 Member.prototype.hashCode = function() { 4638 Member.prototype.hashCode = function() {
4602 return (this.declaringType.hashCode() << 4) ^ this.name.hashCode(); 4639 return (this.declaringType.hashCode() << 4) ^ this.name.hashCode();
4603 } 4640 }
4604 Member.prototype._get$3 = Member.prototype._get; 4641 Member.prototype._get$3 = Member.prototype._get;
4642 Member.prototype._get$3$isDynamic = Member.prototype._get;
4643 Member.prototype._get$4 = Member.prototype._get;
4605 Member.prototype._set$4 = Member.prototype._set; 4644 Member.prototype._set$4 = Member.prototype._set;
4645 Member.prototype._set$4$isDynamic = Member.prototype._set;
4646 Member.prototype._set$5 = Member.prototype._set;
4606 Member.prototype.canInvoke$2 = Member.prototype.canInvoke; 4647 Member.prototype.canInvoke$2 = Member.prototype.canInvoke;
4607 Member.prototype.computeValue$0 = Member.prototype.computeValue; 4648 Member.prototype.computeValue$0 = Member.prototype.computeValue;
4608 Member.prototype.hashCode$0 = Member.prototype.hashCode; 4649 Member.prototype.hashCode$0 = Member.prototype.hashCode;
4609 Member.prototype.invoke$4 = function($0, $1, $2, $3) { 4650 Member.prototype.invoke$4 = function($0, $1, $2, $3) {
4610 return this.invoke($0, $1, $2, $3, false); 4651 return this.invoke($0, $1, $2, $3, false);
4611 }; 4652 };
4612 Member.prototype.invoke$4$isDynamic = Member.prototype.invoke; 4653 Member.prototype.invoke$4$isDynamic = Member.prototype.invoke;
4613 Member.prototype.invoke$5 = Member.prototype.invoke; 4654 Member.prototype.invoke$5 = Member.prototype.invoke;
4614 Member.prototype.provideFieldSyntax$0 = Member.prototype.provideFieldSyntax; 4655 Member.prototype.provideFieldSyntax$0 = Member.prototype.provideFieldSyntax;
4615 Member.prototype.providePropertySyntax$0 = Member.prototype.providePropertySynta x; 4656 Member.prototype.providePropertySyntax$0 = Member.prototype.providePropertySynta x;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
4647 } 4688 }
4648 TypeMember.prototype._set = function(context, node, target, value, isDynamic) { 4689 TypeMember.prototype._set = function(context, node, target, value, isDynamic) {
4649 $globals.world.error('cannot set type', node.span); 4690 $globals.world.error('cannot set type', node.span);
4650 } 4691 }
4651 TypeMember.prototype.invoke = function(context, node, target, args, isDynamic) { 4692 TypeMember.prototype.invoke = function(context, node, target, args, isDynamic) {
4652 $globals.world.error('cannot invoke type', node.span); 4693 $globals.world.error('cannot invoke type', node.span);
4653 } 4694 }
4654 TypeMember.prototype._get$3 = function($0, $1, $2) { 4695 TypeMember.prototype._get$3 = function($0, $1, $2) {
4655 return this._get($0, $1, $2, false); 4696 return this._get($0, $1, $2, false);
4656 }; 4697 };
4698 TypeMember.prototype._get$3$isDynamic = TypeMember.prototype._get;
4699 TypeMember.prototype._get$4 = TypeMember.prototype._get;
4657 TypeMember.prototype._set$4 = function($0, $1, $2, $3) { 4700 TypeMember.prototype._set$4 = function($0, $1, $2, $3) {
4658 return this._set($0, $1, $2, $3, false); 4701 return this._set($0, $1, $2, $3, false);
4659 }; 4702 };
4703 TypeMember.prototype._set$4$isDynamic = TypeMember.prototype._set;
4704 TypeMember.prototype._set$5 = TypeMember.prototype._set;
4660 TypeMember.prototype.canInvoke$2 = TypeMember.prototype.canInvoke; 4705 TypeMember.prototype.canInvoke$2 = TypeMember.prototype.canInvoke;
4661 TypeMember.prototype.invoke$4 = function($0, $1, $2, $3) { 4706 TypeMember.prototype.invoke$4 = function($0, $1, $2, $3) {
4662 return this.invoke($0, $1, $2, $3, false); 4707 return this.invoke($0, $1, $2, $3, false);
4663 }; 4708 };
4664 TypeMember.prototype.invoke$4$isDynamic = TypeMember.prototype.invoke; 4709 TypeMember.prototype.invoke$4$isDynamic = TypeMember.prototype.invoke;
4665 TypeMember.prototype.invoke$5 = TypeMember.prototype.invoke; 4710 TypeMember.prototype.invoke$5 = TypeMember.prototype.invoke;
4666 // ********** Code for FieldMember ************** 4711 // ********** Code for FieldMember **************
4667 function FieldMember(name, declaringType, definition, value) { 4712 function FieldMember(name, declaringType, definition, value) {
4668 this._providePropertySyntax = false 4713 this._providePropertySyntax = false
4669 this._computing = false 4714 this._computing = false
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
4828 return new Value(this.type, ('' + target.code + '.' + this.get$jsname()), node .span, true); 4873 return new Value(this.type, ('' + target.code + '.' + this.get$jsname()), node .span, true);
4829 } 4874 }
4830 FieldMember.prototype._set = function(context, node, target, value, isDynamic) { 4875 FieldMember.prototype._set = function(context, node, target, value, isDynamic) {
4831 var lhs = this._get(context, node, target, isDynamic); 4876 var lhs = this._get(context, node, target, isDynamic);
4832 value = value.convertTo(context, this.type, node, isDynamic); 4877 value = value.convertTo(context, this.type, node, isDynamic);
4833 return new Value(this.type, ('' + lhs.get$code() + ' = ' + value.code), node.s pan, true); 4878 return new Value(this.type, ('' + lhs.get$code() + ' = ' + value.code), node.s pan, true);
4834 } 4879 }
4835 FieldMember.prototype._get$3 = function($0, $1, $2) { 4880 FieldMember.prototype._get$3 = function($0, $1, $2) {
4836 return this._get($0, $1, $2, false); 4881 return this._get($0, $1, $2, false);
4837 }; 4882 };
4883 FieldMember.prototype._get$3$isDynamic = FieldMember.prototype._get;
4884 FieldMember.prototype._get$4 = FieldMember.prototype._get;
4838 FieldMember.prototype._set$4 = function($0, $1, $2, $3) { 4885 FieldMember.prototype._set$4 = function($0, $1, $2, $3) {
4839 return this._set($0, $1, $2, $3, false); 4886 return this._set($0, $1, $2, $3, false);
4840 }; 4887 };
4888 FieldMember.prototype._set$4$isDynamic = FieldMember.prototype._set;
4889 FieldMember.prototype._set$5 = FieldMember.prototype._set;
4841 FieldMember.prototype.computeValue$0 = FieldMember.prototype.computeValue; 4890 FieldMember.prototype.computeValue$0 = FieldMember.prototype.computeValue;
4842 FieldMember.prototype.provideFieldSyntax$0 = FieldMember.prototype.provideFieldS yntax; 4891 FieldMember.prototype.provideFieldSyntax$0 = FieldMember.prototype.provideFieldS yntax;
4843 FieldMember.prototype.providePropertySyntax$0 = FieldMember.prototype.providePro pertySyntax; 4892 FieldMember.prototype.providePropertySyntax$0 = FieldMember.prototype.providePro pertySyntax;
4844 FieldMember.prototype.resolve$0 = FieldMember.prototype.resolve; 4893 FieldMember.prototype.resolve$0 = FieldMember.prototype.resolve;
4845 // ********** Code for PropertyMember ************** 4894 // ********** Code for PropertyMember **************
4846 function PropertyMember(name, declaringType) { 4895 function PropertyMember(name, declaringType) {
4847 this._provideFieldSyntax = false 4896 this._provideFieldSyntax = false
4848 // Initializers done 4897 // Initializers done
4849 Member.call(this, name, declaringType); 4898 Member.call(this, name, declaringType);
4850 } 4899 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
4926 if (this.setter == null) this.setter = parent.setter; 4975 if (this.setter == null) this.setter = parent.setter;
4927 } 4976 }
4928 PropertyMember.prototype.resolve = function() { 4977 PropertyMember.prototype.resolve = function() {
4929 if (this.getter != null) this.getter.resolve(); 4978 if (this.getter != null) this.getter.resolve();
4930 if (this.setter != null) this.setter.resolve(); 4979 if (this.setter != null) this.setter.resolve();
4931 this.get$library()._addMember(this); 4980 this.get$library()._addMember(this);
4932 } 4981 }
4933 PropertyMember.prototype._get$3 = function($0, $1, $2) { 4982 PropertyMember.prototype._get$3 = function($0, $1, $2) {
4934 return this._get($0, $1, $2, false); 4983 return this._get($0, $1, $2, false);
4935 }; 4984 };
4985 PropertyMember.prototype._get$3$isDynamic = PropertyMember.prototype._get;
4986 PropertyMember.prototype._get$4 = PropertyMember.prototype._get;
4936 PropertyMember.prototype._set$4 = function($0, $1, $2, $3) { 4987 PropertyMember.prototype._set$4 = function($0, $1, $2, $3) {
4937 return this._set($0, $1, $2, $3, false); 4988 return this._set($0, $1, $2, $3, false);
4938 }; 4989 };
4990 PropertyMember.prototype._set$4$isDynamic = PropertyMember.prototype._set;
4991 PropertyMember.prototype._set$5 = PropertyMember.prototype._set;
4939 PropertyMember.prototype.provideFieldSyntax$0 = PropertyMember.prototype.provide FieldSyntax; 4992 PropertyMember.prototype.provideFieldSyntax$0 = PropertyMember.prototype.provide FieldSyntax;
4940 PropertyMember.prototype.providePropertySyntax$0 = PropertyMember.prototype.prov idePropertySyntax; 4993 PropertyMember.prototype.providePropertySyntax$0 = PropertyMember.prototype.prov idePropertySyntax;
4941 PropertyMember.prototype.resolve$0 = PropertyMember.prototype.resolve; 4994 PropertyMember.prototype.resolve$0 = PropertyMember.prototype.resolve;
4942 // ********** Code for ConcreteMember ************** 4995 // ********** Code for ConcreteMember **************
4943 function ConcreteMember(name, declaringType, baseMember) { 4996 function ConcreteMember(name, declaringType, baseMember) {
4944 this.baseMember = baseMember; 4997 this.baseMember = baseMember;
4945 // Initializers done 4998 // Initializers done
4946 Member.call(this, name, declaringType); 4999 Member.call(this, name, declaringType);
4947 this.parameters = []; 5000 this.parameters = [];
4948 this.returnType = this.baseMember.get$returnType().resolveTypeParams(declaring Type); 5001 this.returnType = this.baseMember.get$returnType().resolveTypeParams(declaring Type);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
5057 code = code.replaceFirst$2(this.declaringType.get$genericType().get$jsname() , this.declaringType.get$jsname()); 5110 code = code.replaceFirst$2(this.declaringType.get$genericType().get$jsname() , this.declaringType.get$jsname());
5058 } 5111 }
5059 if ((this.baseMember instanceof MethodMember)) { 5112 if ((this.baseMember instanceof MethodMember)) {
5060 this.declaringType.genMethod(this); 5113 this.declaringType.genMethod(this);
5061 } 5114 }
5062 return new Value(this.get$inferredResult(), code, node.span, true); 5115 return new Value(this.get$inferredResult(), code, node.span, true);
5063 } 5116 }
5064 ConcreteMember.prototype._get$3 = function($0, $1, $2) { 5117 ConcreteMember.prototype._get$3 = function($0, $1, $2) {
5065 return this._get($0, $1, $2, false); 5118 return this._get($0, $1, $2, false);
5066 }; 5119 };
5120 ConcreteMember.prototype._get$3$isDynamic = ConcreteMember.prototype._get;
5121 ConcreteMember.prototype._get$4 = ConcreteMember.prototype._get;
5067 ConcreteMember.prototype._set$4 = function($0, $1, $2, $3) { 5122 ConcreteMember.prototype._set$4 = function($0, $1, $2, $3) {
5068 return this._set($0, $1, $2, $3, false); 5123 return this._set($0, $1, $2, $3, false);
5069 }; 5124 };
5125 ConcreteMember.prototype._set$4$isDynamic = ConcreteMember.prototype._set;
5126 ConcreteMember.prototype._set$5 = ConcreteMember.prototype._set;
5070 ConcreteMember.prototype.canInvoke$2 = ConcreteMember.prototype.canInvoke; 5127 ConcreteMember.prototype.canInvoke$2 = ConcreteMember.prototype.canInvoke;
5071 ConcreteMember.prototype.computeValue$0 = ConcreteMember.prototype.computeValue; 5128 ConcreteMember.prototype.computeValue$0 = ConcreteMember.prototype.computeValue;
5072 ConcreteMember.prototype.invoke$4 = function($0, $1, $2, $3) { 5129 ConcreteMember.prototype.invoke$4 = function($0, $1, $2, $3) {
5073 return this.invoke($0, $1, $2, $3, false); 5130 return this.invoke($0, $1, $2, $3, false);
5074 }; 5131 };
5075 ConcreteMember.prototype.invoke$4$isDynamic = ConcreteMember.prototype.invoke; 5132 ConcreteMember.prototype.invoke$4$isDynamic = ConcreteMember.prototype.invoke;
5076 ConcreteMember.prototype.invoke$5 = ConcreteMember.prototype.invoke; 5133 ConcreteMember.prototype.invoke$5 = ConcreteMember.prototype.invoke;
5077 ConcreteMember.prototype.provideFieldSyntax$0 = ConcreteMember.prototype.provide FieldSyntax; 5134 ConcreteMember.prototype.provideFieldSyntax$0 = ConcreteMember.prototype.provide FieldSyntax;
5078 ConcreteMember.prototype.providePropertySyntax$0 = ConcreteMember.prototype.prov idePropertySyntax; 5135 ConcreteMember.prototype.providePropertySyntax$0 = ConcreteMember.prototype.prov idePropertySyntax;
5079 // ********** Code for MethodMember ************** 5136 // ********** Code for MethodMember **************
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
5779 param.resolve$0(); 5836 param.resolve$0();
5780 this.parameters.add(param); 5837 this.parameters.add(param);
5781 } 5838 }
5782 if (!this.isLambda) { 5839 if (!this.isLambda) {
5783 this.get$library()._addMember(this); 5840 this.get$library()._addMember(this);
5784 } 5841 }
5785 } 5842 }
5786 MethodMember.prototype._get$3 = function($0, $1, $2) { 5843 MethodMember.prototype._get$3 = function($0, $1, $2) {
5787 return this._get($0, $1, $2, false); 5844 return this._get($0, $1, $2, false);
5788 }; 5845 };
5846 MethodMember.prototype._get$3$isDynamic = MethodMember.prototype._get;
5847 MethodMember.prototype._get$4 = MethodMember.prototype._get;
5789 MethodMember.prototype._set$4 = function($0, $1, $2, $3) { 5848 MethodMember.prototype._set$4 = function($0, $1, $2, $3) {
5790 return this._set($0, $1, $2, $3, false); 5849 return this._set($0, $1, $2, $3, false);
5791 }; 5850 };
5851 MethodMember.prototype._set$4$isDynamic = MethodMember.prototype._set;
5852 MethodMember.prototype._set$5 = MethodMember.prototype._set;
5792 MethodMember.prototype.canInvoke$2 = MethodMember.prototype.canInvoke; 5853 MethodMember.prototype.canInvoke$2 = MethodMember.prototype.canInvoke;
5793 MethodMember.prototype.invoke$4 = function($0, $1, $2, $3) { 5854 MethodMember.prototype.invoke$4 = function($0, $1, $2, $3) {
5794 return this.invoke($0, $1, $2, $3, false); 5855 return this.invoke($0, $1, $2, $3, false);
5795 }; 5856 };
5796 MethodMember.prototype.invoke$4$isDynamic = MethodMember.prototype.invoke; 5857 MethodMember.prototype.invoke$4$isDynamic = MethodMember.prototype.invoke;
5797 MethodMember.prototype.invoke$5 = MethodMember.prototype.invoke; 5858 MethodMember.prototype.invoke$5 = MethodMember.prototype.invoke;
5798 MethodMember.prototype.namesInOrder$1 = MethodMember.prototype.namesInOrder; 5859 MethodMember.prototype.namesInOrder$1 = MethodMember.prototype.namesInOrder;
5799 MethodMember.prototype.provideFieldSyntax$0 = MethodMember.prototype.provideFiel dSyntax; 5860 MethodMember.prototype.provideFieldSyntax$0 = MethodMember.prototype.provideFiel dSyntax;
5800 MethodMember.prototype.providePropertySyntax$0 = MethodMember.prototype.provideP ropertySyntax; 5861 MethodMember.prototype.providePropertySyntax$0 = MethodMember.prototype.provideP ropertySyntax;
5801 MethodMember.prototype.resolve$0 = MethodMember.prototype.resolve; 5862 MethodMember.prototype.resolve$0 = MethodMember.prototype.resolve;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
5869 return this._treatAsField; 5930 return this._treatAsField;
5870 } 5931 }
5871 MemberSet.prototype._get = function(context, node, target, isDynamic) { 5932 MemberSet.prototype._get = function(context, node, target, isDynamic) {
5872 var returnValue; 5933 var returnValue;
5873 var targets = this.members.filter((function (m) { 5934 var targets = this.members.filter((function (m) {
5874 return m.get$canGet(); 5935 return m.get$canGet();
5875 }) 5936 })
5876 ); 5937 );
5877 if (this.isVar) { 5938 if (this.isVar) {
5878 targets.forEach$1((function (m) { 5939 targets.forEach$1((function (m) {
5879 return m._get(context, node, target, true); 5940 return m._get$3$isDynamic(context, node, target, true);
5880 }) 5941 })
5881 ); 5942 );
5882 returnValue = new Value(this._foldTypes(targets), null, node.span, true); 5943 returnValue = new Value(this._foldTypes(targets), null, node.span, true);
5883 } 5944 }
5884 else { 5945 else {
5885 if (this.members.length == 1) { 5946 if (this.members.length == 1) {
5886 return this.members.$index(0)._get(context, node, target, isDynamic); 5947 return this.members.$index(0)._get$4(context, node, target, isDynamic);
5887 } 5948 }
5888 else if ($eq(targets.length, 1)) { 5949 else if ($eq(targets.length, 1)) {
5889 return targets.$index(0)._get(context, node, target, isDynamic); 5950 return targets.$index(0)._get$4(context, node, target, isDynamic);
5890 } 5951 }
5891 for (var $$i = targets.iterator$0(); $$i.hasNext$0(); ) { 5952 for (var $$i = targets.iterator$0(); $$i.hasNext$0(); ) {
5892 var member = $$i.next$0(); 5953 var member = $$i.next$0();
5893 var value = member._get(context, node, target, true); 5954 var value = member._get$3$isDynamic(context, node, target, true);
5894 returnValue = this._tryUnion(returnValue, value, node); 5955 returnValue = this._tryUnion(returnValue, value, node);
5895 } 5956 }
5896 if (returnValue == null) { 5957 if (returnValue == null) {
5897 return this._makeError(node, target, 'getter'); 5958 return this._makeError(node, target, 'getter');
5898 } 5959 }
5899 } 5960 }
5900 if (returnValue.code == null) { 5961 if (returnValue.code == null) {
5901 if (this.get$treatAsField()) { 5962 if (this.get$treatAsField()) {
5902 return new Value(returnValue.get$type(), ('' + target.code + '.' + this.js name), node.span, true); 5963 return new Value(returnValue.get$type(), ('' + target.code + '.' + this.js name), node.span, true);
5903 } 5964 }
5904 else { 5965 else {
5905 return new Value(returnValue.get$type(), ('' + target.code + '.get\$' + th is.jsname + '()'), node.span, true); 5966 return new Value(returnValue.get$type(), ('' + target.code + '.get\$' + th is.jsname + '()'), node.span, true);
5906 } 5967 }
5907 } 5968 }
5908 return returnValue; 5969 return returnValue;
5909 } 5970 }
5910 MemberSet.prototype._set = function(context, node, target, value, isDynamic) { 5971 MemberSet.prototype._set = function(context, node, target, value, isDynamic) {
5911 var returnValue; 5972 var returnValue;
5912 var targets = this.members.filter((function (m) { 5973 var targets = this.members.filter((function (m) {
5913 return m.get$canSet(); 5974 return m.get$canSet();
5914 }) 5975 })
5915 ); 5976 );
5916 if (this.isVar) { 5977 if (this.isVar) {
5917 targets.forEach$1((function (m) { 5978 targets.forEach$1((function (m) {
5918 return m._set(context, node, target, value, true); 5979 return m._set$4$isDynamic(context, node, target, value, true);
5919 }) 5980 })
5920 ); 5981 );
5921 returnValue = new Value(this._foldTypes(targets), null, node.span, true); 5982 returnValue = new Value(this._foldTypes(targets), null, node.span, true);
5922 } 5983 }
5923 else { 5984 else {
5924 if (this.members.length == 1) { 5985 if (this.members.length == 1) {
5925 return this.members.$index(0)._set(context, node, target, value, isDynamic ); 5986 return this.members.$index(0)._set$5(context, node, target, value, isDynam ic);
5926 } 5987 }
5927 else if ($eq(targets.length, 1)) { 5988 else if ($eq(targets.length, 1)) {
5928 return targets.$index(0)._set(context, node, target, value, isDynamic); 5989 return targets.$index(0)._set$5(context, node, target, value, isDynamic);
5929 } 5990 }
5930 for (var $$i = targets.iterator$0(); $$i.hasNext$0(); ) { 5991 for (var $$i = targets.iterator$0(); $$i.hasNext$0(); ) {
5931 var member = $$i.next$0(); 5992 var member = $$i.next$0();
5932 var res = member._set(context, node, target, value, true); 5993 var res = member._set$4$isDynamic(context, node, target, value, true);
5933 returnValue = this._tryUnion(returnValue, res, node); 5994 returnValue = this._tryUnion(returnValue, res, node);
5934 } 5995 }
5935 if (returnValue == null) { 5996 if (returnValue == null) {
5936 return this._makeError(node, target, 'setter'); 5997 return this._makeError(node, target, 'setter');
5937 } 5998 }
5938 } 5999 }
5939 if (returnValue.code == null) { 6000 if (returnValue.code == null) {
5940 if (this.get$treatAsField()) { 6001 if (this.get$treatAsField()) {
5941 return new Value(returnValue.get$type(), ('' + target.code + '.' + this.js name + ' = ' + value.code), node.span, true); 6002 return new Value(returnValue.get$type(), ('' + target.code + '.' + this.js name + ' = ' + value.code), node.span, true);
5942 } 6003 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
6038 } 6099 }
6039 MemberSet.prototype._foldTypes = function(targets) { 6100 MemberSet.prototype._foldTypes = function(targets) {
6040 return reduce(map(targets, (function (t) { 6101 return reduce(map(targets, (function (t) {
6041 return t.get$returnType(); 6102 return t.get$returnType();
6042 }) 6103 })
6043 ), Type.union, $globals.world.varType); 6104 ), Type.union, $globals.world.varType);
6044 } 6105 }
6045 MemberSet.prototype._get$3 = function($0, $1, $2) { 6106 MemberSet.prototype._get$3 = function($0, $1, $2) {
6046 return this._get($0, $1, $2, false); 6107 return this._get($0, $1, $2, false);
6047 }; 6108 };
6109 MemberSet.prototype._get$3$isDynamic = MemberSet.prototype._get;
6110 MemberSet.prototype._get$4 = MemberSet.prototype._get;
6048 MemberSet.prototype._set$4 = function($0, $1, $2, $3) { 6111 MemberSet.prototype._set$4 = function($0, $1, $2, $3) {
6049 return this._set($0, $1, $2, $3, false); 6112 return this._set($0, $1, $2, $3, false);
6050 }; 6113 };
6114 MemberSet.prototype._set$4$isDynamic = MemberSet.prototype._set;
6115 MemberSet.prototype._set$5 = MemberSet.prototype._set;
6051 MemberSet.prototype.add$1 = MemberSet.prototype.add; 6116 MemberSet.prototype.add$1 = MemberSet.prototype.add;
6052 MemberSet.prototype.canInvoke$2 = MemberSet.prototype.canInvoke; 6117 MemberSet.prototype.canInvoke$2 = MemberSet.prototype.canInvoke;
6053 MemberSet.prototype.invoke$4 = function($0, $1, $2, $3) { 6118 MemberSet.prototype.invoke$4 = function($0, $1, $2, $3) {
6054 return this.invoke($0, $1, $2, $3, false); 6119 return this.invoke($0, $1, $2, $3, false);
6055 }; 6120 };
6056 MemberSet.prototype.invoke$4$isDynamic = MemberSet.prototype.invoke; 6121 MemberSet.prototype.invoke$4$isDynamic = MemberSet.prototype.invoke;
6057 MemberSet.prototype.invoke$5 = MemberSet.prototype.invoke; 6122 MemberSet.prototype.invoke$5 = MemberSet.prototype.invoke;
6058 MemberSet.prototype.toString$0 = MemberSet.prototype.toString; 6123 MemberSet.prototype.toString$0 = MemberSet.prototype.toString;
6059 // ********** Code for FactoryMap ************** 6124 // ********** Code for FactoryMap **************
6060 function FactoryMap() { 6125 function FactoryMap() {
(...skipping 4436 matching lines...) Expand 10 before | Expand all | Expand 10 after
10497 var typeArg = args.next$0(); 10562 var typeArg = args.next$0();
10498 if ($ne(typeParam.get$extendsType(), null) && $ne(typeArg, null)) { 10563 if ($ne(typeParam.get$extendsType(), null) && $ne(typeArg, null)) {
10499 typeArg.ensureSubtypeOf$3(typeParam.get$extendsType(), typeParam.get$spa n(), true); 10564 typeArg.ensureSubtypeOf$3(typeParam.get$extendsType(), typeParam.get$spa n(), true);
10500 } 10565 }
10501 } 10566 }
10502 } 10567 }
10503 if (this.get$interfaces() != null) { 10568 if (this.get$interfaces() != null) {
10504 var $$list = this.get$interfaces(); 10569 var $$list = this.get$interfaces();
10505 for (var $$i = 0;$$i < $$list.length; $$i++) { 10570 for (var $$i = 0;$$i < $$list.length; $$i++) {
10506 var i = $$list.$index($$i); 10571 var i = $$list.$index($$i);
10507 i._checkExtends(); 10572 i._checkExtends$0();
10508 } 10573 }
10509 } 10574 }
10510 } 10575 }
10511 Type.prototype._checkOverride = function(member) { 10576 Type.prototype._checkOverride = function(member) {
10512 var parentMember = this._getMemberInParents(member.name); 10577 var parentMember = this._getMemberInParents(member.name);
10513 if ($ne(parentMember, null)) { 10578 if ($ne(parentMember, null)) {
10514 if (!member.get$isPrivate() || $eq(member.get$library(), parentMember.get$li brary())) { 10579 if (!member.get$isPrivate() || $eq(member.get$library(), parentMember.get$li brary())) {
10515 member.override(parentMember); 10580 member.override(parentMember);
10516 } 10581 }
10517 } 10582 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
10680 if (tp.length < sp.length) return false; 10745 if (tp.length < sp.length) return false;
10681 for (var i = 0; 10746 for (var i = 0;
10682 i < sp.length; i++) { 10747 i < sp.length; i++) {
10683 if ($ne(tp.$index(i).get$isOptional(), sp.$index(i).get$isOptional())) retur n false; 10748 if ($ne(tp.$index(i).get$isOptional(), sp.$index(i).get$isOptional())) retur n false;
10684 if (tp.$index(i).get$isOptional() && $ne(tp.$index(i).get$name(), sp.$index( i).get$name())) return false; 10749 if (tp.$index(i).get$isOptional() && $ne(tp.$index(i).get$name(), sp.$index( i).get$name())) return false;
10685 if (!tp.$index(i).get$type().isAssignable$1(sp.$index(i).get$type())) return false; 10750 if (!tp.$index(i).get$type().isAssignable$1(sp.$index(i).get$type())) return false;
10686 } 10751 }
10687 if (tp.length > sp.length && !tp.$index(sp.length).get$isOptional()) return fa lse; 10752 if (tp.length > sp.length && !tp.$index(sp.length).get$isOptional()) return fa lse;
10688 return true; 10753 return true;
10689 } 10754 }
10755 Type.prototype._checkExtends$0 = Type.prototype._checkExtends;
10690 Type.prototype.addDirectSubtype$1 = Type.prototype.addDirectSubtype; 10756 Type.prototype.addDirectSubtype$1 = Type.prototype.addDirectSubtype;
10691 Type.prototype.ensureSubtypeOf$3 = Type.prototype.ensureSubtypeOf; 10757 Type.prototype.ensureSubtypeOf$3 = Type.prototype.ensureSubtypeOf;
10692 Type.prototype.getConstructor$1 = Type.prototype.getConstructor; 10758 Type.prototype.getConstructor$1 = Type.prototype.getConstructor;
10693 Type.prototype.getFactory$2 = Type.prototype.getFactory; 10759 Type.prototype.getFactory$2 = Type.prototype.getFactory;
10694 Type.prototype.getMember$1 = Type.prototype.getMember; 10760 Type.prototype.getMember$1 = Type.prototype.getMember;
10695 Type.prototype.getOrMakeConcreteType$1 = Type.prototype.getOrMakeConcreteType; 10761 Type.prototype.getOrMakeConcreteType$1 = Type.prototype.getOrMakeConcreteType;
10696 Type.prototype.isAssignable$1 = Type.prototype.isAssignable; 10762 Type.prototype.isAssignable$1 = Type.prototype.isAssignable;
10697 Type.prototype.isSubtypeOf$1 = Type.prototype.isSubtypeOf; 10763 Type.prototype.isSubtypeOf$1 = Type.prototype.isSubtypeOf;
10698 Type.prototype.markUsed$0 = Type.prototype.markUsed; 10764 Type.prototype.markUsed$0 = Type.prototype.markUsed;
10699 Type.prototype.resolveTypeParams$1 = Type.prototype.resolveTypeParams; 10765 Type.prototype.resolveTypeParams$1 = Type.prototype.resolveTypeParams;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
10877 this.typeArguments = typeArguments; 10943 this.typeArguments = typeArguments;
10878 this.typeArgsInOrder = typeArgsInOrder; 10944 this.typeArgsInOrder = typeArgsInOrder;
10879 this.constructors = new HashMapImplementation(); 10945 this.constructors = new HashMapImplementation();
10880 this.members = new HashMapImplementation(); 10946 this.members = new HashMapImplementation();
10881 this.factories = new FactoryMap(); 10947 this.factories = new FactoryMap();
10882 // Initializers done 10948 // Initializers done
10883 Type.call(this, name); 10949 Type.call(this, name);
10884 } 10950 }
10885 $inherits(ConcreteType, Type); 10951 $inherits(ConcreteType, Type);
10886 ConcreteType.prototype.get$genericType = function() { return this.genericType; } ; 10952 ConcreteType.prototype.get$genericType = function() { return this.genericType; } ;
10953 ConcreteType.prototype.get$_parent = function() { return this._parent; };
10954 ConcreteType.prototype.set$_parent = function(value) { return this._parent = val ue; };
10887 ConcreteType.prototype.get$typeArgsInOrder = function() { return this.typeArgsIn Order; }; 10955 ConcreteType.prototype.get$typeArgsInOrder = function() { return this.typeArgsIn Order; };
10888 ConcreteType.prototype.set$typeArgsInOrder = function(value) { return this.typeA rgsInOrder = value; }; 10956 ConcreteType.prototype.set$typeArgsInOrder = function(value) { return this.typeA rgsInOrder = value; };
10889 ConcreteType.prototype.get$isList = function() { 10957 ConcreteType.prototype.get$isList = function() {
10890 return this.genericType.get$isList(); 10958 return this.genericType.get$isList();
10891 } 10959 }
10892 ConcreteType.prototype.get$isClass = function() { 10960 ConcreteType.prototype.get$isClass = function() {
10893 return this.genericType.isClass; 10961 return this.genericType.isClass;
10894 } 10962 }
10895 ConcreteType.prototype.get$library = function() { 10963 ConcreteType.prototype.get$library = function() {
10896 return this.genericType.library; 10964 return this.genericType.library;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
11047 this.factories = new FactoryMap(); 11115 this.factories = new FactoryMap();
11048 // Initializers done 11116 // Initializers done
11049 Type.call(this, name); 11117 Type.call(this, name);
11050 this.setDefinition(definition); 11118 this.setDefinition(definition);
11051 } 11119 }
11052 $inherits(DefinedType, Type); 11120 $inherits(DefinedType, Type);
11053 DefinedType.prototype.get$definition = function() { return this.definition; }; 11121 DefinedType.prototype.get$definition = function() { return this.definition; };
11054 DefinedType.prototype.set$definition = function(value) { return this.definition = value; }; 11122 DefinedType.prototype.set$definition = function(value) { return this.definition = value; };
11055 DefinedType.prototype.get$library = function() { return this.library; }; 11123 DefinedType.prototype.get$library = function() { return this.library; };
11056 DefinedType.prototype.get$isClass = function() { return this.isClass; }; 11124 DefinedType.prototype.get$isClass = function() { return this.isClass; };
11125 DefinedType.prototype.get$_parent = function() { return this._parent; };
11126 DefinedType.prototype.set$_parent = function(value) { return this._parent = valu e; };
11057 DefinedType.prototype.get$parent = function() { 11127 DefinedType.prototype.get$parent = function() {
11058 return this._parent; 11128 return this._parent;
11059 } 11129 }
11060 DefinedType.prototype.set$parent = function(p) { 11130 DefinedType.prototype.set$parent = function(p) {
11061 this._parent = p; 11131 this._parent = p;
11062 } 11132 }
11063 DefinedType.prototype.get$interfaces = function() { return this.interfaces; }; 11133 DefinedType.prototype.get$interfaces = function() { return this.interfaces; };
11064 DefinedType.prototype.set$interfaces = function(value) { return this.interfaces = value; }; 11134 DefinedType.prototype.set$interfaces = function(value) { return this.interfaces = value; };
11065 DefinedType.prototype.get$typeParameters = function() { return this.typeParamete rs; }; 11135 DefinedType.prototype.get$typeParameters = function() { return this.typeParamete rs; };
11066 DefinedType.prototype.set$typeParameters = function(value) { return this.typePar ameters = value; }; 11136 DefinedType.prototype.set$typeParameters = function(value) { return this.typePar ameters = value; };
11067 DefinedType.prototype.get$constructors = function() { return this.constructors; }; 11137 DefinedType.prototype.get$constructors = function() { return this.constructors; };
11068 DefinedType.prototype.set$constructors = function(value) { return this.construct ors = value; }; 11138 DefinedType.prototype.set$constructors = function(value) { return this.construct ors = value; };
11069 DefinedType.prototype.get$members = function() { return this.members; }; 11139 DefinedType.prototype.get$members = function() { return this.members; };
11070 DefinedType.prototype.set$members = function(value) { return this.members = valu e; }; 11140 DefinedType.prototype.set$members = function(value) { return this.members = valu e; };
11071 DefinedType.prototype.get$factories = function() { return this.factories; }; 11141 DefinedType.prototype.get$factories = function() { return this.factories; };
11072 DefinedType.prototype.set$factories = function(value) { return this.factories = value; }; 11142 DefinedType.prototype.set$factories = function(value) { return this.factories = value; };
11143 DefinedType.prototype.get$_concreteTypes = function() { return this._concreteTyp es; };
11144 DefinedType.prototype.set$_concreteTypes = function(value) { return this._concre teTypes = value; };
11073 DefinedType.prototype.get$isUsed = function() { return this.isUsed; }; 11145 DefinedType.prototype.get$isUsed = function() { return this.isUsed; };
11074 DefinedType.prototype.set$isUsed = function(value) { return this.isUsed = value; }; 11146 DefinedType.prototype.set$isUsed = function(value) { return this.isUsed = value; };
11075 DefinedType.prototype.get$isNative = function() { return this.isNative; }; 11147 DefinedType.prototype.get$isNative = function() { return this.isNative; };
11076 DefinedType.prototype.set$isNative = function(value) { return this.isNative = va lue; }; 11148 DefinedType.prototype.set$isNative = function(value) { return this.isNative = va lue; };
11077 DefinedType.prototype.setDefinition = function(def) { 11149 DefinedType.prototype.setDefinition = function(def) {
11078 this.definition = def; 11150 this.definition = def;
11079 if ((this.definition instanceof TypeDefinition) && $ne(this.definition.get$nat iveType(), null)) { 11151 if ((this.definition instanceof TypeDefinition) && $ne(this.definition.get$nat iveType(), null)) {
11080 this.isNative = true; 11152 this.isNative = true;
11081 } 11153 }
11082 if (this.definition != null && $ne(this.definition.get$typeParameters(), null) ) { 11154 if (this.definition != null && $ne(this.definition.get$typeParameters(), null) ) {
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
11456 typeMap.$setindex(paramName, typeArgs.$index(i)); 11528 typeMap.$setindex(paramName, typeArgs.$index(i));
11457 names.add$1(typeArgs.$index(i).get$name()); 11529 names.add$1(typeArgs.$index(i).get$name());
11458 jsnames.add$1(typeArgs.$index(i).get$jsname()); 11530 jsnames.add$1(typeArgs.$index(i).get$jsname());
11459 } 11531 }
11460 var jsname = ('' + this.get$jsname() + '_' + Strings.join(jsnames, '\$')); 11532 var jsname = ('' + this.get$jsname() + '_' + Strings.join(jsnames, '\$'));
11461 var simpleName = ('' + this.name + '<' + Strings.join(names, ', ') + '>'); 11533 var simpleName = ('' + this.name + '<' + Strings.join(names, ', ') + '>');
11462 var key = Strings.join(names, '\$'); 11534 var key = Strings.join(names, '\$');
11463 var ret = this._concreteTypes.$index(key); 11535 var ret = this._concreteTypes.$index(key);
11464 if (ret == null) { 11536 if (ret == null) {
11465 ret = new ConcreteType(simpleName, this, typeMap, typeArgs); 11537 ret = new ConcreteType(simpleName, this, typeMap, typeArgs);
11466 ret._jsname = jsname; 11538 ret.set$_jsname(jsname);
11467 this._concreteTypes.$setindex(key, ret); 11539 this._concreteTypes.$setindex(key, ret);
11468 } 11540 }
11469 return ret; 11541 return ret;
11470 } 11542 }
11471 DefinedType.prototype.getCallStub = function(args) { 11543 DefinedType.prototype.getCallStub = function(args) {
11472 var name = _getCallStubName('call', args); 11544 var name = _getCallStubName('call', args);
11473 var stub = this.varStubs.$index(name); 11545 var stub = this.varStubs.$index(name);
11474 if (stub == null) { 11546 if (stub == null) {
11475 stub = new VarFunctionStub(name, args); 11547 stub = new VarFunctionStub(name, args);
11476 this.varStubs.$setindex(name, stub); 11548 this.varStubs.$setindex(name, stub);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
11643 if ($ne(member, null)) { 11715 if ($ne(member, null)) {
11644 return member._get$3(context, node, this); 11716 return member._get$3(context, node, this);
11645 } 11717 }
11646 else { 11718 else {
11647 return this.invokeNoSuchMethod(context, ('get:' + name), node); 11719 return this.invokeNoSuchMethod(context, ('get:' + name), node);
11648 } 11720 }
11649 } 11721 }
11650 Value.prototype.set_ = function(context, name, node, value, isDynamic) { 11722 Value.prototype.set_ = function(context, name, node, value, isDynamic) {
11651 var member = this._resolveMember(context, name, node, isDynamic); 11723 var member = this._resolveMember(context, name, node, isDynamic);
11652 if ($ne(member, null)) { 11724 if ($ne(member, null)) {
11653 return member._set(context, node, this, value, isDynamic); 11725 return member._set$5(context, node, this, value, isDynamic);
11654 } 11726 }
11655 else { 11727 else {
11656 return this.invokeNoSuchMethod(context, ('set:' + name), node, new Arguments (null, [value])); 11728 return this.invokeNoSuchMethod(context, ('set:' + name), node, new Arguments (null, [value]));
11657 } 11729 }
11658 } 11730 }
11659 Value.prototype.invoke = function(context, name, node, args, isDynamic) { 11731 Value.prototype.invoke = function(context, name, node, args, isDynamic) {
11660 if (this.get$_typeIsVarOrParameterType() && name == ':ne') { 11732 if (this.get$_typeIsVarOrParameterType() && name == ':ne') {
11661 if (args.values.length != 1) { 11733 if (args.values.length != 1) {
11662 $globals.world.warning('wrong number of arguments for !=', node.span); 11734 $globals.world.warning('wrong number of arguments for !=', node.span);
11663 } 11735 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
11775 var callMethod = toType.getCallMethod(); 11847 var callMethod = toType.getCallMethod();
11776 if ($ne(callMethod, null)) { 11848 if ($ne(callMethod, null)) {
11777 if (checked && !toType.isAssignable(this.get$type())) { 11849 if (checked && !toType.isAssignable(this.get$type())) {
11778 this.convertWarning(toType, node); 11850 this.convertWarning(toType, node);
11779 } 11851 }
11780 var arity = callMethod.get$parameters().length; 11852 var arity = callMethod.get$parameters().length;
11781 var myCall = this.get$type().getCallMethod(); 11853 var myCall = this.get$type().getCallMethod();
11782 if (myCall == null || $ne(myCall.get$parameters().length, arity)) { 11854 if (myCall == null || $ne(myCall.get$parameters().length, arity)) {
11783 var stub = $globals.world.functionType.getCallStub(Arguments.Arguments$bar e$factory(arity)); 11855 var stub = $globals.world.functionType.getCallStub(Arguments.Arguments$bar e$factory(arity));
11784 var val = new Value(toType, ('to\$' + stub.name + '(' + this.code + ')'), node.span, true); 11856 var val = new Value(toType, ('to\$' + stub.name + '(' + this.code + ')'), node.span, true);
11785 return this._isDomCallback(toType) && !this._isDomCallback(this.get$type() ) ? val._wrapDomCallback(toType, arity) : val; 11857 return this._isDomCallback(toType) && !this._isDomCallback(this.get$type() ) ? val._wrapDomCallback$2(toType, arity) : val;
11786 } 11858 }
11787 else if (this._isDomCallback(toType) && !this._isDomCallback(this.get$type() )) { 11859 else if (this._isDomCallback(toType) && !this._isDomCallback(this.get$type() )) {
11788 return this._wrapDomCallback(toType, arity); 11860 return this._wrapDomCallback(toType, arity);
11789 } 11861 }
11790 } 11862 }
11791 var fromType = this.get$type(); 11863 var fromType = this.get$type();
11792 if (this.get$type().get$isVar() && (this.code != 'null' || !toType.get$isNulla ble())) { 11864 if (this.get$type().get$isVar() && (this.code != 'null' || !toType.get$isNulla ble())) {
11793 fromType = $globals.world.objectType; 11865 fromType = $globals.world.objectType;
11794 } 11866 }
11795 var bothNum = this.get$type().get$isNum() && toType.get$isNum(); 11867 var bothNum = this.get$type().get$isNum() && toType.get$isNum();
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
11922 var argsCode = []; 11994 var argsCode = [];
11923 for (var i = 0; 11995 for (var i = 0;
11924 i < args.get$length(); i++) { 11996 i < args.get$length(); i++) {
11925 argsCode.add$1(args.values.$index(i).get$code()); 11997 argsCode.add$1(args.values.$index(i).get$code());
11926 } 11998 }
11927 pos = Strings.join(argsCode, ", "); 11999 pos = Strings.join(argsCode, ", ");
11928 } 12000 }
11929 var noSuchArgs = [new Value($globals.world.stringType, ('"' + name + '"'), nod e.span, true), new Value($globals.world.listType, ('[' + pos + ']'), node.span, true)]; 12001 var noSuchArgs = [new Value($globals.world.stringType, ('"' + name + '"'), nod e.span, true), new Value($globals.world.listType, ('[' + pos + ']'), node.span, true)];
11930 return this._resolveMember(context, 'noSuchMethod', node, false).invoke$4(cont ext, node, this, new Arguments(null, noSuchArgs)); 12002 return this._resolveMember(context, 'noSuchMethod', node, false).invoke$4(cont ext, node, this, new Arguments(null, noSuchArgs));
11931 } 12003 }
12004 Value.prototype._wrapDomCallback$2 = Value.prototype._wrapDomCallback;
11932 Value.prototype.checkFirstClass$1 = Value.prototype.checkFirstClass; 12005 Value.prototype.checkFirstClass$1 = Value.prototype.checkFirstClass;
11933 Value.prototype.convertTo$3 = function($0, $1, $2) { 12006 Value.prototype.convertTo$3 = function($0, $1, $2) {
11934 return this.convertTo($0, $1, $2, false); 12007 return this.convertTo($0, $1, $2, false);
11935 }; 12008 };
11936 Value.prototype.convertTo$4 = Value.prototype.convertTo; 12009 Value.prototype.convertTo$4 = Value.prototype.convertTo;
11937 Value.prototype.get_$3 = Value.prototype.get_; 12010 Value.prototype.get_$3 = Value.prototype.get_;
11938 Value.prototype.instanceOf$3$isTrue$forceCheck = Value.prototype.instanceOf; 12011 Value.prototype.instanceOf$3$isTrue$forceCheck = Value.prototype.instanceOf;
11939 Value.prototype.instanceOf$4 = function($0, $1, $2, $3) { 12012 Value.prototype.instanceOf$4 = function($0, $1, $2, $3) {
11940 return this.instanceOf($0, $1, $2, $3, false); 12013 return this.instanceOf($0, $1, $2, $3, false);
11941 }; 12014 };
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
12973 $inheritsMembers(_DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V, DoubleLinkedQ ueueEntry_KeyValuePair_K$V); 13046 $inheritsMembers(_DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V, DoubleLinkedQ ueueEntry_KeyValuePair_K$V);
12974 // ********** Globals ************** 13047 // ********** Globals **************
12975 function $static_init(){ 13048 function $static_init(){
12976 } 13049 }
12977 var const$0 = new NoMoreElementsException()/*const NoMoreElementsException()*/; 13050 var const$0 = new NoMoreElementsException()/*const NoMoreElementsException()*/;
12978 var const$2 = new EmptyQueueException()/*const EmptyQueueException()*/; 13051 var const$2 = new EmptyQueueException()/*const EmptyQueueException()*/;
12979 var const$3 = new _DeletedKeySentinel()/*const _DeletedKeySentinel()*/; 13052 var const$3 = new _DeletedKeySentinel()/*const _DeletedKeySentinel()*/;
12980 var $globals = {}; 13053 var $globals = {};
12981 $static_init(); 13054 $static_init();
12982 main(); 13055 main();
OLDNEW
« no previous file with comments | « frog/library.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698