| 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 'ast.dart'; | 10 import 'ast.dart'; |
| (...skipping 11440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11451 node.accept(_elementResolver); | 11451 node.accept(_elementResolver); |
| 11452 node.accept(_typeAnalyzer); | 11452 node.accept(_typeAnalyzer); |
| 11453 } finally { | 11453 } finally { |
| 11454 _typeAnalyzer.thisType = outerType == null ? null : outerType.type; | 11454 _typeAnalyzer.thisType = outerType == null ? null : outerType.type; |
| 11455 enclosingClass = outerType; | 11455 enclosingClass = outerType; |
| 11456 _enclosingClassDeclaration = null; | 11456 _enclosingClassDeclaration = null; |
| 11457 } | 11457 } |
| 11458 return null; | 11458 return null; |
| 11459 } | 11459 } |
| 11460 | 11460 |
| 11461 /** |
| 11462 * Implementation of this method should be synchronized with |
| 11463 * [visitClassDeclaration]. |
| 11464 */ |
| 11465 visitClassDeclarationIncrementally(ClassDeclaration node) { |
| 11466 // |
| 11467 // Resolve the metadata in the library scope. |
| 11468 // |
| 11469 if (node.metadata != null) { |
| 11470 node.metadata.accept(this); |
| 11471 } |
| 11472 _enclosingClassDeclaration = node; |
| 11473 // |
| 11474 // Continue the class resolution. |
| 11475 // |
| 11476 enclosingClass = node.element; |
| 11477 _typeAnalyzer.thisType = |
| 11478 enclosingClass == null ? null : enclosingClass.type; |
| 11479 node.accept(_elementResolver); |
| 11480 node.accept(_typeAnalyzer); |
| 11481 } |
| 11482 |
| 11461 @override | 11483 @override |
| 11462 Object visitComment(Comment node) { | 11484 Object visitComment(Comment node) { |
| 11463 if (node.parent is FunctionDeclaration || | 11485 if (node.parent is FunctionDeclaration || |
| 11464 node.parent is ConstructorDeclaration || | 11486 node.parent is ConstructorDeclaration || |
| 11465 node.parent is MethodDeclaration) { | 11487 node.parent is MethodDeclaration) { |
| 11466 if (!identical(node, _commentBeforeFunction)) { | 11488 if (!identical(node, _commentBeforeFunction)) { |
| 11467 _commentBeforeFunction = node; | 11489 _commentBeforeFunction = node; |
| 11468 return null; | 11490 return null; |
| 11469 } | 11491 } |
| 11470 } | 11492 } |
| (...skipping 4793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16264 * library. | 16286 * library. |
| 16265 */ | 16287 */ |
| 16266 final HashSet<String> members = new HashSet<String>(); | 16288 final HashSet<String> members = new HashSet<String>(); |
| 16267 | 16289 |
| 16268 /** | 16290 /** |
| 16269 * Names of resolved or unresolved class members that are read in the | 16291 * Names of resolved or unresolved class members that are read in the |
| 16270 * library. | 16292 * library. |
| 16271 */ | 16293 */ |
| 16272 final HashSet<String> readMembers = new HashSet<String>(); | 16294 final HashSet<String> readMembers = new HashSet<String>(); |
| 16273 } | 16295 } |
| OLD | NEW |