| 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 analyzer.src.generated.resolver; | 5 library analyzer.src.generated.resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 4199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4210 */ | 4210 */ |
| 4211 InheritanceManager _manager; | 4211 InheritanceManager _manager; |
| 4212 | 4212 |
| 4213 GatherUsedLocalElementsVisitor _usedLocalElementsVisitor; | 4213 GatherUsedLocalElementsVisitor _usedLocalElementsVisitor; |
| 4214 | 4214 |
| 4215 HintGenerator(this._compilationUnits, this._context, this._errorListener) { | 4215 HintGenerator(this._compilationUnits, this._context, this._errorListener) { |
| 4216 _library = _compilationUnits[0].element.library; | 4216 _library = _compilationUnits[0].element.library; |
| 4217 _usedImportedElementsVisitor = | 4217 _usedImportedElementsVisitor = |
| 4218 new GatherUsedImportedElementsVisitor(_library); | 4218 new GatherUsedImportedElementsVisitor(_library); |
| 4219 _enableDart2JSHints = _context.analysisOptions.dart2jsHint; | 4219 _enableDart2JSHints = _context.analysisOptions.dart2jsHint; |
| 4220 _manager = new InheritanceManager(_library); | 4220 _manager = |
| 4221 new InheritanceManager(_library, includeAbstractFromSuperclasses: true); |
| 4221 _usedLocalElementsVisitor = new GatherUsedLocalElementsVisitor(_library); | 4222 _usedLocalElementsVisitor = new GatherUsedLocalElementsVisitor(_library); |
| 4222 } | 4223 } |
| 4223 | 4224 |
| 4224 void generateForLibrary() { | 4225 void generateForLibrary() { |
| 4225 PerformanceStatistics.hints.makeCurrentWhile(() { | 4226 PerformanceStatistics.hints.makeCurrentWhile(() { |
| 4226 int length = _compilationUnits.length; | 4227 int length = _compilationUnits.length; |
| 4227 for (int i = 0; i < length; i++) { | 4228 for (int i = 0; i < length; i++) { |
| 4228 CompilationUnit unit = _compilationUnits[i]; | 4229 CompilationUnit unit = _compilationUnits[i]; |
| 4229 CompilationUnitElement element = unit.element; | 4230 CompilationUnitElement element = unit.element; |
| 4230 if (element != null) { | 4231 if (element != null) { |
| (...skipping 6807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11038 return null; | 11039 return null; |
| 11039 } | 11040 } |
| 11040 if (identical(node.staticElement, variable)) { | 11041 if (identical(node.staticElement, variable)) { |
| 11041 if (node.inSetterContext()) { | 11042 if (node.inSetterContext()) { |
| 11042 result = true; | 11043 result = true; |
| 11043 } | 11044 } |
| 11044 } | 11045 } |
| 11045 return null; | 11046 return null; |
| 11046 } | 11047 } |
| 11047 } | 11048 } |
| OLD | NEW |