| 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 dart2js.world; | 5 library dart2js.world; |
| 6 | 6 |
| 7 import 'closure.dart' show SynthesizedCallMethodElementX; | 7 import 'closure.dart' show SynthesizedCallMethodElementX; |
| 8 import 'common/backend_api.dart' show Backend; | 8 import 'common/backend_api.dart' show Backend; |
| 9 import 'common.dart'; | 9 import 'common.dart'; |
| 10 import 'compiler.dart' show Compiler; | 10 import 'compiler.dart' show Compiler; |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 } | 720 } |
| 721 } | 721 } |
| 722 | 722 |
| 723 VariableElement locateSingleField(Selector selector, TypeMask mask) { | 723 VariableElement locateSingleField(Selector selector, TypeMask mask) { |
| 724 Element result = locateSingleElement(selector, mask); | 724 Element result = locateSingleElement(selector, mask); |
| 725 return (result != null && result.isField) ? result : null; | 725 return (result != null && result.isField) ? result : null; |
| 726 } | 726 } |
| 727 | 727 |
| 728 Element locateSingleElement(Selector selector, TypeMask mask) { | 728 Element locateSingleElement(Selector selector, TypeMask mask) { |
| 729 mask ??= compiler.commonMasks.dynamicType; | 729 mask ??= compiler.commonMasks.dynamicType; |
| 730 return mask.locateSingleElement(selector, mask, compiler); | 730 return mask.locateSingleElement(selector, compiler); |
| 731 } | 731 } |
| 732 | 732 |
| 733 TypeMask extendMaskIfReachesAll(Selector selector, TypeMask mask) { | 733 TypeMask extendMaskIfReachesAll(Selector selector, TypeMask mask) { |
| 734 bool canReachAll = true; | 734 bool canReachAll = true; |
| 735 if (mask != null) { | 735 if (mask != null) { |
| 736 canReachAll = compiler.enabledInvokeOn && | 736 canReachAll = compiler.enabledInvokeOn && |
| 737 mask.needsNoSuchMethodHandling(selector, this); | 737 mask.needsNoSuchMethodHandling(selector, this); |
| 738 } | 738 } |
| 739 return canReachAll ? compiler.commonMasks.dynamicType : mask; | 739 return canReachAll ? compiler.commonMasks.dynamicType : mask; |
| 740 } | 740 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 // function expressions's element. | 835 // function expressions's element. |
| 836 // TODO(herhut): Generate classes for function expressions earlier. | 836 // TODO(herhut): Generate classes for function expressions earlier. |
| 837 if (element is SynthesizedCallMethodElementX) { | 837 if (element is SynthesizedCallMethodElementX) { |
| 838 return getMightBePassedToApply(element.expression); | 838 return getMightBePassedToApply(element.expression); |
| 839 } | 839 } |
| 840 return functionsThatMightBePassedToApply.contains(element); | 840 return functionsThatMightBePassedToApply.contains(element); |
| 841 } | 841 } |
| 842 | 842 |
| 843 bool get hasClosedWorldAssumption => !compiler.options.hasIncrementalSupport; | 843 bool get hasClosedWorldAssumption => !compiler.options.hasIncrementalSupport; |
| 844 } | 844 } |
| OLD | NEW |