| 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 engine.resolver; | 5 library engine.resolver; |
| 6 | 6 |
| 7 import "dart:math" as math; | 7 import "dart:math" as math; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/utilities_collection.dart'; | 10 import 'package:analyzer/src/generated/utilities_collection.dart'; |
| (...skipping 4513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4524 } | 4524 } |
| 4525 Element element = node.staticElement; | 4525 Element element = node.staticElement; |
| 4526 bool isIdentifierRead = _isReadIdentifier(node); | 4526 bool isIdentifierRead = _isReadIdentifier(node); |
| 4527 if (element is LocalVariableElement) { | 4527 if (element is LocalVariableElement) { |
| 4528 if (isIdentifierRead) { | 4528 if (isIdentifierRead) { |
| 4529 usedElements.addElement(element); | 4529 usedElements.addElement(element); |
| 4530 } | 4530 } |
| 4531 } else { | 4531 } else { |
| 4532 _useIdentifierElement(node); | 4532 _useIdentifierElement(node); |
| 4533 if (element == null || | 4533 if (element == null || |
| 4534 element is! LocalElement && !identical(element, _enclosingExec)) { | 4534 element.enclosingElement is ClassElement && |
| 4535 !identical(element, _enclosingExec)) { |
| 4535 usedElements.members.add(node.name); | 4536 usedElements.members.add(node.name); |
| 4536 if (isIdentifierRead) { | 4537 if (isIdentifierRead) { |
| 4537 usedElements.readMembers.add(node.name); | 4538 usedElements.readMembers.add(node.name); |
| 4538 } | 4539 } |
| 4539 } | 4540 } |
| 4540 } | 4541 } |
| 4541 } | 4542 } |
| 4542 | 4543 |
| 4543 /** | 4544 /** |
| 4544 * Marks an [Element] of [node] as used in the library. | 4545 * Marks an [Element] of [node] as used in the library. |
| (...skipping 10865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15410 nonFields.add(node); | 15411 nonFields.add(node); |
| 15411 return null; | 15412 return null; |
| 15412 } | 15413 } |
| 15413 | 15414 |
| 15414 @override | 15415 @override |
| 15415 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); | 15416 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); |
| 15416 | 15417 |
| 15417 @override | 15418 @override |
| 15418 Object visitWithClause(WithClause node) => null; | 15419 Object visitWithClause(WithClause node) => null; |
| 15419 } | 15420 } |
| OLD | NEW |