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 '../constants/expressions.dart' show ConstantExpression; | 9 import '../constants/expressions.dart' show ConstantExpression; |
10 import '../constants/values.dart' show ConstantValue; | 10 import '../constants/values.dart' show ConstantValue; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 /// Interface defining target-specific behavior for resolution. | 86 /// Interface defining target-specific behavior for resolution. |
87 abstract class Target { | 87 abstract class Target { |
88 /// Returns `true` if [library] is a target specific library whose members | 88 /// Returns `true` if [library] is a target specific library whose members |
89 /// have special treatment, such as being allowed to extends blacklisted | 89 /// have special treatment, such as being allowed to extends blacklisted |
90 /// classes or members being eagerly resolved. | 90 /// classes or members being eagerly resolved. |
91 bool isTargetSpecificLibrary(LibraryElement element); | 91 bool isTargetSpecificLibrary(LibraryElement element); |
92 | 92 |
93 /// Resolve target specific information for [element] and register it with | 93 /// Resolve target specific information for [element] and register it with |
94 /// [registry]. | 94 /// [registry]. |
95 void resolveNativeElement(Element element, NativeRegistry registry) {} | 95 void resolveNativeMember(MemberElement element, NativeRegistry registry) {} |
96 | 96 |
97 /// Processes [element] for resolution and returns the [MethodElement] that | 97 /// Processes [element] for resolution and returns the [MethodElement] that |
98 /// defines the implementation of [element]. | 98 /// defines the implementation of [element]. |
99 MethodElement resolveExternalFunction(MethodElement element) => element; | 99 MethodElement resolveExternalFunction(MethodElement element) => element; |
100 | 100 |
101 /// Called when resolving a call to a foreign function. If a non-null value | 101 /// Called when resolving a call to a foreign function. If a non-null value |
102 /// is returned, this is stored as native data for [node] in the resolved | 102 /// is returned, this is stored as native data for [node] in the resolved |
103 /// AST. | 103 /// AST. |
104 dynamic resolveForeignCall(Send node, Element element, | 104 dynamic resolveForeignCall(Send node, Element element, |
105 CallStructure callStructure, ForeignResolver resolver) { | 105 CallStructure callStructure, ForeignResolver resolver) { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 if (cls.isPatch) { | 258 if (cls.isPatch) { |
259 patchParser.parsePatchClassNode(cls); | 259 patchParser.parsePatchClassNode(cls); |
260 } | 260 } |
261 }); | 261 }); |
262 } | 262 } |
263 | 263 |
264 @override | 264 @override |
265 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( | 265 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( |
266 canUseNative: backend.canLibraryUseNative(element.library)); | 266 canUseNative: backend.canLibraryUseNative(element.library)); |
267 } | 267 } |
OLD | NEW |