| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import '../compiler.dart' show Compiler; | 5 import '../compiler.dart' show Compiler; |
| 6 import '../constants/values.dart'; | 6 import '../constants/values.dart'; |
| 7 import '../elements/resolution_types.dart'; | 7 import '../elements/resolution_types.dart'; |
| 8 import '../elements/elements.dart'; | 8 import '../elements/elements.dart'; |
| 9 import '../universe/use.dart' show StaticUse; | 9 import '../universe/use.dart' show StaticUse; |
| 10 import '../universe/world_impact.dart' | 10 import '../universe/world_impact.dart' |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 * const Component<FancyButton>('x-fancy-button').register(); | 47 * const Component<FancyButton>('x-fancy-button').register(); |
| 48 * | 48 * |
| 49 * In these cases we conservatively generate all viable entries in the table. | 49 * In these cases we conservatively generate all viable entries in the table. |
| 50 */ | 50 */ |
| 51 class CustomElementsAnalysis { | 51 class CustomElementsAnalysis { |
| 52 final JavaScriptBackend backend; | 52 final JavaScriptBackend backend; |
| 53 final Compiler compiler; | 53 final Compiler compiler; |
| 54 final CustomElementsAnalysisJoin resolutionJoin; | 54 final CustomElementsAnalysisJoin resolutionJoin; |
| 55 final CustomElementsAnalysisJoin codegenJoin; | 55 final CustomElementsAnalysisJoin codegenJoin; |
| 56 bool fetchedTableAccessorMethod = false; | 56 bool fetchedTableAccessorMethod = false; |
| 57 Element tableAccessorMethod; | 57 MethodElement tableAccessorMethod; |
| 58 | 58 |
| 59 CustomElementsAnalysis(JavaScriptBackend backend) | 59 CustomElementsAnalysis(JavaScriptBackend backend) |
| 60 : this.backend = backend, | 60 : this.backend = backend, |
| 61 this.compiler = backend.compiler, | 61 this.compiler = backend.compiler, |
| 62 resolutionJoin = new CustomElementsAnalysisJoin(backend), | 62 resolutionJoin = new CustomElementsAnalysisJoin(backend), |
| 63 codegenJoin = new CustomElementsAnalysisJoin(backend) { | 63 codegenJoin = new CustomElementsAnalysisJoin(backend) { |
| 64 // TODO(sra): Remove this work-around. We should mark allClassesSelected in | 64 // TODO(sra): Remove this work-around. We should mark allClassesSelected in |
| 65 // both joins only when we see a construct generating an unknown [Type] but | 65 // both joins only when we see a construct generating an unknown [Type] but |
| 66 // we can't currently recognize all cases. In particular, the work-around | 66 // we can't currently recognize all cases. In particular, the work-around |
| 67 // for the unimplemented `ClassMirror.reflectedType` is not recognizable. | 67 // for the unimplemented `ClassMirror.reflectedType` is not recognizable. |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 result.add(member); | 210 result.add(member); |
| 211 } | 211 } |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 | 214 |
| 215 classElement.forEachMember(selectGenerativeConstructors, | 215 classElement.forEachMember(selectGenerativeConstructors, |
| 216 includeBackendMembers: false, includeSuperAndInjectedMembers: false); | 216 includeBackendMembers: false, includeSuperAndInjectedMembers: false); |
| 217 return result; | 217 return result; |
| 218 } | 218 } |
| 219 } | 219 } |
| OLD | NEW |