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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/universe/universe.dart

Issue 14260012: Do not infer types of arguments of closures and methods named "call". (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 months 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library universe; 5 library universe;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../dart2jslib.dart'; 9 import '../dart2jslib.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 Selector.callClosure(int arity, [List<SourceString> named = const []]) 169 Selector.callClosure(int arity, [List<SourceString> named = const []])
170 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null, 170 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null,
171 arity, named); 171 arity, named);
172 172
173 Selector.callClosureFrom(Selector selector) 173 Selector.callClosureFrom(Selector selector)
174 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null, 174 : this(SelectorKind.CALL, Compiler.CALL_OPERATOR_NAME, null,
175 selector.argumentCount, selector.namedArguments); 175 selector.argumentCount, selector.namedArguments);
176 176
177 Selector.callConstructor(SourceString constructorName, 177 Selector.callConstructor(SourceString constructorName,
178 LibraryElement library) 178 LibraryElement library,
179 [int arity = 0,
180 List<SourceString> named = const []])
179 : this(SelectorKind.CALL, 181 : this(SelectorKind.CALL,
180 constructorName, 182 constructorName,
181 library, 183 library,
182 0, 184 arity,
183 const []); 185 named);
184 186
185 Selector.callDefaultConstructor(LibraryElement library) 187 Selector.callDefaultConstructor(LibraryElement library)
186 : this(SelectorKind.CALL, const SourceString(""), library, 0, const []); 188 : this(SelectorKind.CALL, const SourceString(""), library, 0, const []);
187 189
188 bool isGetter() => identical(kind, SelectorKind.GETTER); 190 bool isGetter() => identical(kind, SelectorKind.GETTER);
189 bool isSetter() => identical(kind, SelectorKind.SETTER); 191 bool isSetter() => identical(kind, SelectorKind.SETTER);
190 bool isCall() => identical(kind, SelectorKind.CALL); 192 bool isCall() => identical(kind, SelectorKind.CALL);
191 bool isClosureCall() { 193 bool isClosureCall() {
192 SourceString callName = Compiler.CALL_OPERATOR_NAME; 194 SourceString callName = Compiler.CALL_OPERATOR_NAME;
193 return isCall() && name == callName; 195 return isCall() && name == callName;
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 // bar() => foo(); // The call to 'foo' is a typed selector. 450 // bar() => foo(); // The call to 'foo' is a typed selector.
449 // } 451 // }
450 if (element.getEnclosingClass().isClosure()) { 452 if (element.getEnclosingClass().isClosure()) {
451 return appliesUntyped(element, compiler); 453 return appliesUntyped(element, compiler);
452 } 454 }
453 455
454 if (!mask.canHit(element, this, compiler)) return false; 456 if (!mask.canHit(element, this, compiler)) return false;
455 return appliesUntyped(element, compiler); 457 return appliesUntyped(element, compiler);
456 } 458 }
457 } 459 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698