| 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.treeShaker; | 5 library analyzer2dart.treeShaker; |
| 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 26 matching lines...) Expand all Loading... |
| 37 final List<PropertyInducingElement> accesses = <PropertyInducingElement>[]; | 37 final List<PropertyInducingElement> accesses = <PropertyInducingElement>[]; |
| 38 | 38 |
| 39 /** | 39 /** |
| 40 * The selectors used by the method to perform dynamic invocation. | 40 * The selectors used by the method to perform dynamic invocation. |
| 41 */ | 41 */ |
| 42 final List<Selector> invokes = <Selector>[]; | 42 final List<Selector> invokes = <Selector>[]; |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * The classes that are instantiated by the method. | 45 * The classes that are instantiated by the method. |
| 46 */ | 46 */ |
| 47 // TODO(johnniwinther,paulberry): Register instantiated types. |
| 48 // TODO(johnniwinther,paulberry): Register checked types from is/as checks, |
| 49 // catch clauses and (checked) type annotations. |
| 47 final List<ClassElement> instantiates = <ClassElement>[]; | 50 final List<ClassElement> instantiates = <ClassElement>[]; |
| 48 | 51 |
| 49 MethodAnalysis(this.declaration); | 52 MethodAnalysis(this.declaration); |
| 50 } | 53 } |
| 51 | 54 |
| 52 /** | 55 /** |
| 53 * The result of performing local reachability analysis on a class. | 56 * The result of performing local reachability analysis on a class. |
| 54 * | 57 * |
| 55 * TODO(paulberry): Do we need to do any other analysis of classes? (For | 58 * TODO(paulberry): Do we need to do any other analysis of classes? (For |
| 56 * example, detect annotations that are relevant to mirrors, detect that a | 59 * example, detect annotations that are relevant to mirrors, detect that a |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 // null, because that would have been detected by the analyzer and | 388 // null, because that would have been detected by the analyzer and |
| 386 // reported as a compile time error. | 389 // reported as a compile time error. |
| 387 analysis.calls.add(node.staticElement); | 390 analysis.calls.add(node.staticElement); |
| 388 } | 391 } |
| 389 | 392 |
| 390 @override | 393 @override |
| 391 void handleAssignmentExpression(AssignmentExpression node) { | 394 void handleAssignmentExpression(AssignmentExpression node) { |
| 392 // Don't special-case assignment expressions. | 395 // Don't special-case assignment expressions. |
| 393 } | 396 } |
| 394 } | 397 } |
| OLD | NEW |