Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 799993002: Issue 21850. Fix for incremental resolving field formal parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 3143 matching lines...) Expand 10 before | Expand all | Expand 10 after
3154 _functionTypesToFix[i].typeArguments = typeArguments; 3154 _functionTypesToFix[i].typeArguments = typeArguments;
3155 } 3155 }
3156 _functionTypesToFix = null; 3156 _functionTypesToFix = null;
3157 _currentHolder.addType(element); 3157 _currentHolder.addType(element);
3158 className.staticElement = element; 3158 className.staticElement = element;
3159 _fieldMap = null; 3159 _fieldMap = null;
3160 holder.validate(); 3160 holder.validate();
3161 return null; 3161 return null;
3162 } 3162 }
3163 3163
3164 /**
3165 * Implementation of this method should be synchronized with
3166 * [visitClassDeclaration].
3167 */
3168 void visitClassDeclarationIncrementally(ClassDeclaration node) {
3169 //
3170 // Process field declarations before constructors and methods so that field
3171 // formal parameters can be correctly resolved to their fields.
3172 //
3173 ClassElement classElement = node.element;
3174 _buildFieldMap(classElement.fields);
3175 }
3176
3164 @override 3177 @override
3165 Object visitClassTypeAlias(ClassTypeAlias node) { 3178 Object visitClassTypeAlias(ClassTypeAlias node) {
3166 ElementHolder holder = new ElementHolder(); 3179 ElementHolder holder = new ElementHolder();
3167 _functionTypesToFix = new List<FunctionTypeImpl>(); 3180 _functionTypesToFix = new List<FunctionTypeImpl>();
3168 _visitChildren(holder, node); 3181 _visitChildren(holder, node);
3169 SimpleIdentifier className = node.name; 3182 SimpleIdentifier className = node.name;
3170 ClassElementImpl element = new ClassElementImpl.forNode(className); 3183 ClassElementImpl element = new ClassElementImpl.forNode(className);
3171 element.abstract = node.abstractKeyword != null; 3184 element.abstract = node.abstractKeyword != null;
3172 element.typedef = true; 3185 element.typedef = true;
3173 List<TypeParameterElement> typeParameters = holder.typeParameters; 3186 List<TypeParameterElement> typeParameters = holder.typeParameters;
(...skipping 13194 matching lines...) Expand 10 before | Expand all | Expand 10 after
16368 * library. 16381 * library.
16369 */ 16382 */
16370 final HashSet<String> members = new HashSet<String>(); 16383 final HashSet<String> members = new HashSet<String>();
16371 16384
16372 /** 16385 /**
16373 * Names of resolved or unresolved class members that are read in the 16386 * Names of resolved or unresolved class members that are read in the
16374 * library. 16387 * library.
16375 */ 16388 */
16376 final HashSet<String> readMembers = new HashSet<String>(); 16389 final HashSet<String> readMembers = new HashSet<String>();
16377 } 16390 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | pkg/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698