| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 analyzer2dart.closedWorld; | 5 library analyzer2dart.closedWorld; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/analyzer.dart'; | 9 import 'package:analyzer/analyzer.dart'; |
| 10 import 'package:analyzer/src/generated/element.dart'; | 10 import 'package:analyzer/src/generated/element.dart'; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 Map<ExecutableElement, Declaration> executableElements = | 26 Map<ExecutableElement, Declaration> executableElements = |
| 27 new HashMap<ExecutableElement, Declaration>(); | 27 new HashMap<ExecutableElement, Declaration>(); |
| 28 | 28 |
| 29 /** | 29 /** |
| 30 * Fields that are reachable. | 30 * Fields that are reachable. |
| 31 */ | 31 */ |
| 32 Map<FieldElement, VariableDeclaration> fields = | 32 Map<FieldElement, VariableDeclaration> fields = |
| 33 new HashMap<FieldElement, VariableDeclaration>(); | 33 new HashMap<FieldElement, VariableDeclaration>(); |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * Top-level variables that are reachable. |
| 37 */ |
| 38 // TODO(johnniwinther): Is there value in splitting fields and top-level |
| 39 // variables? |
| 40 Map<TopLevelVariableElement, VariableDeclaration> variables = |
| 41 new HashMap<TopLevelVariableElement, VariableDeclaration>(); |
| 42 |
| 43 /** |
| 36 * Classes that are instantiated from reachable code. | 44 * Classes that are instantiated from reachable code. |
| 37 * | 45 * |
| 38 * TODO(paulberry): Also keep track of classes that are reachable but not | 46 * TODO(paulberry): Also keep track of classes that are reachable but not |
| 39 * instantiated (because they are extended or mixed in) | 47 * instantiated (because they are extended or mixed in) |
| 40 */ | 48 */ |
| 41 Map<ClassElement, ClassDeclaration> instantiatedClasses = | 49 Map<ClassElement, ClassDeclaration> instantiatedClasses = |
| 42 new HashMap<ClassElement, ClassDeclaration>(); | 50 new HashMap<ClassElement, ClassDeclaration>(); |
| 43 | 51 |
| 44 ClosedWorld(this.mainFunction); | 52 ClosedWorld(this.mainFunction); |
| 45 } | 53 } |
| OLD | NEW |