Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 '../elements/elements.dart'; | 7 import '../elements/elements.dart'; |
| 8 import '../dart2jslib.dart'; | 8 import '../dart2jslib.dart'; |
| 9 import '../dart_types.dart'; | 9 import '../dart_types.dart'; |
| 10 import '../types/types.dart'; | 10 import '../types/types.dart'; |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 314 } | 314 } |
| 315 return kind; | 315 return kind; |
| 316 } | 316 } |
| 317 | 317 |
| 318 bool appliesUnnamed(Element element, Compiler compiler) { | 318 bool appliesUnnamed(Element element, Compiler compiler) { |
| 319 assert(sameNameHack(element, compiler)); | 319 assert(sameNameHack(element, compiler)); |
| 320 return appliesUntyped(element, compiler); | 320 return appliesUntyped(element, compiler); |
| 321 } | 321 } |
| 322 | 322 |
| 323 bool appliesUntyped(Element element, Compiler compiler) { | 323 bool appliesUntyped(Element element, Compiler compiler) { |
| 324 assert(sameNameHack(element, compiler)); | |
|
ngeoffray
2013/12/10 17:11:02
This is now also being called for closure calls, w
kasperl
2013/12/11 07:35:35
Should we get rid of all the sameNameHack stuff?
ngeoffray
2013/12/16 11:47:43
I'll try, but some call sites do tricky things har
| |
| 325 if (Elements.isUnresolved(element)) return false; | 324 if (Elements.isUnresolved(element)) return false; |
| 326 if (isPrivateName(name) && library != element.getLibrary()) return false; | 325 if (isPrivateName(name) && library != element.getLibrary()) return false; |
| 327 if (element.isForeign(compiler)) return true; | 326 if (element.isForeign(compiler)) return true; |
| 328 if (element.isSetter()) return isSetter(); | 327 if (element.isSetter()) return isSetter(); |
| 329 if (element.isGetter()) return isGetter() || isCall(); | 328 if (element.isGetter()) return isGetter() || isCall(); |
| 330 if (element.isField()) { | 329 if (element.isField()) { |
| 331 return isSetter() | 330 return isSetter() |
| 332 ? !element.modifiers.isFinalOrConst() | 331 ? !element.modifiers.isFinalOrConst() |
| 333 : isGetter() || isCall(); | 332 : isGetter() || isCall(); |
| 334 } | 333 } |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 671 } | 670 } |
| 672 | 671 |
| 673 Selector extendIfReachesAll(Compiler compiler) { | 672 Selector extendIfReachesAll(Compiler compiler) { |
| 674 bool canReachAll = compiler.enabledInvokeOn | 673 bool canReachAll = compiler.enabledInvokeOn |
| 675 && mask.needsNoSuchMethodHandling(this, compiler); | 674 && mask.needsNoSuchMethodHandling(this, compiler); |
| 676 return canReachAll | 675 return canReachAll |
| 677 ? new TypedSelector(compiler.typesTask.dynamicType, this) | 676 ? new TypedSelector(compiler.typesTask.dynamicType, this) |
| 678 : this; | 677 : this; |
| 679 } | 678 } |
| 680 } | 679 } |
| OLD | NEW |