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.common.resolution; | 5 library dart2js.common.resolution; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../compile_time_constants.dart'; | 8 import '../compile_time_constants.dart'; |
9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
10 import '../constants/expressions.dart' show ConstantExpression; | 10 import '../constants/expressions.dart' show ConstantExpression; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 MethodElement resolveExternalFunction(MethodElement element) => element; | 91 MethodElement resolveExternalFunction(MethodElement element) => element; |
92 | 92 |
93 /// Called when resolving a call to a foreign function. If a non-null value | 93 /// Called when resolving a call to a foreign function. If a non-null value |
94 /// is returned, this is stored as native data for [node] in the resolved | 94 /// is returned, this is stored as native data for [node] in the resolved |
95 /// AST. | 95 /// AST. |
96 dynamic resolveForeignCall(Send node, Element element, | 96 dynamic resolveForeignCall(Send node, Element element, |
97 CallStructure callStructure, ForeignResolver resolver) { | 97 CallStructure callStructure, ForeignResolver resolver) { |
98 return null; | 98 return null; |
99 } | 99 } |
100 | 100 |
| 101 /// Returns `true` if [element] is a default implementation of `noSuchMethod` |
| 102 /// used by the target. |
| 103 bool isDefaultNoSuchMethod(MethodElement element); |
| 104 |
101 /// Returns the default superclass for the given [element] in this target. | 105 /// Returns the default superclass for the given [element] in this target. |
102 ClassElement defaultSuperclass(ClassElement element); | 106 ClassElement defaultSuperclass(ClassElement element); |
103 | 107 |
104 /// Returns `true` if [element] is a native element, that is, that the | 108 /// Returns `true` if [element] is a native element, that is, that the |
105 /// corresponding entity already exists in the target language. | 109 /// corresponding entity already exists in the target language. |
106 bool isNative(Element element) => false; | 110 bool isNative(Element element) => false; |
107 | 111 |
108 /// Returns `true` if [element] is a foreign element, that is, that the | 112 /// Returns `true` if [element] is a foreign element, that is, that the |
109 /// backend has specialized handling for the element. | 113 /// backend has specialized handling for the element. |
110 bool isForeign(Element element) => false; | 114 bool isForeign(Element element) => false; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 if (cls.isPatch) { | 250 if (cls.isPatch) { |
247 patchParser.parsePatchClassNode(cls); | 251 patchParser.parsePatchClassNode(cls); |
248 } | 252 } |
249 }); | 253 }); |
250 } | 254 } |
251 | 255 |
252 @override | 256 @override |
253 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( | 257 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( |
254 canUseNative: backend.canLibraryUseNative(element.library)); | 258 canUseNative: backend.canLibraryUseNative(element.library)); |
255 } | 259 } |
OLD | NEW |