OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.mirrors_handler; | 5 library dart2js.mirrors_handler; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../common/resolution.dart'; | 8 import '../common/resolution.dart'; |
9 import '../compiler.dart'; | 9 import '../compiler.dart'; |
10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // Use [enclosingElement] instead of [enclosingClass] to ensure that | 184 // Use [enclosingElement] instead of [enclosingClass] to ensure that |
185 // we process patch class metadata for patch and injected members. | 185 // we process patch class metadata for patch and injected members. |
186 processElementMetadata(element.enclosingElement); | 186 processElementMetadata(element.enclosingElement); |
187 } | 187 } |
188 } else { | 188 } else { |
189 processLibraryMetadata(element.library); | 189 processLibraryMetadata(element.library); |
190 } | 190 } |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 entities.forEach(processElementMetadata); | 194 entities.forEach((MemberElement member) => processElementMetadata(member)); |
195 } | 195 } |
196 | 196 |
197 void onResolutionComplete() { | 197 void onResolutionComplete() { |
198 _registeredMetadata.clear(); | 198 _registeredMetadata.clear(); |
199 } | 199 } |
200 | 200 |
201 MirrorsCodegenAnalysis close() => new MirrorsCodegenAnalysisImpl( | 201 MirrorsCodegenAnalysis close() => new MirrorsCodegenAnalysisImpl( |
202 _backend, handler._resolution, _metadataConstants); | 202 _backend, handler._resolution, _metadataConstants); |
203 } | 203 } |
204 | 204 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 | 475 |
476 /// Records that [constant] is used by the element behind [registry]. | 476 /// Records that [constant] is used by the element behind [registry]. |
477 class Dependency { | 477 class Dependency { |
478 final ConstantValue constant; | 478 final ConstantValue constant; |
479 final Element annotatedElement; | 479 final Element annotatedElement; |
480 | 480 |
481 const Dependency(this.constant, this.annotatedElement); | 481 const Dependency(this.constant, this.annotatedElement); |
482 | 482 |
483 String toString() => '$annotatedElement:${constant.toStructuredText()}'; | 483 String toString() => '$annotatedElement:${constant.toStructuredText()}'; |
484 } | 484 } |
OLD | NEW |